SiMapComponent documentation¶
selector
si-map
Input Properties¶
Name | Type | Default | Description |
---|---|---|---|
alwaysShowLabels ¶ | boolean | false | Show the label permanently next to the point. Normally the label is shown on hover or click. By enabling this it will always be visible next to the marker. |
autoZoomClusterClick ¶ | boolean | true | When disabled, clusters will no longer automatically be zoomed to on click. |
autoZoomFeatureClick ¶ | boolean | false | When enabled, features will be automatically zoom to on click. |
cluster ¶ | boolean | false | Enable or disable clustering of points on the map. |
clusterClickZoom ¶ | number | DEFAULT_CLUSTER_CLICK_ZOOM | Max zoom level for clicking on a cluster on the map. Defaults to 15. |
clusterDistance ¶ | number | DEFAULT_CLUSTER_DISTANCE | Defines range in which points are clustered. In pixels. |
clusterPopoverComponent ¶ | Type <any > | Custom popover component for clustering | |
displayPopoverOnClick ¶ | boolean | true | Option to switch on/off the display of popover when clicked. Default set to true (on). |
displayPopoverOnHover ¶ | boolean | false | Option to switch on/off popover when hovered. Default is set to false (off) |
displayTooltipOnClusterHover ¶ | boolean | false | Option to switch on/off the display of tooltip while hovering over cluster. |
displayTooltipOnHover ¶ | boolean | false | Option to switch on/off the display of tooltip while hovering over single point. |
featureClickZoom ¶ | number | DEFAULT_FEATURE_CLICK_ZOOM | Max zoom level which is used when clicking on feature on the map. Defaults to 15. |
featureSelectZoom ¶ | number | DEFAULT_FEATURE_SELECT_ZOOM | Zoom level when calling the select() method on the component. Defaults to 10. |
fitClusterPadding ¶ | [ number , number , number , number ] | [20, 20, 20, 20] | Padding (in pixels) applied to the map view when zooming to a cluster, preventing points from being clipped at the edges. Specified as [top, right, bottom, left]. |
fitGeoJsonPadding ¶ | number [] | [20, 20, 20, 20] | For GeoJson, padding (in pixels) to be cleared to fit the GeoJson inside the view after a click on it. Values in the array are: [top, right, bottom, left]. |
fitPointPadding ¶ | number [] | [20, 20, 20, 20] | For Point geometry, padding (in pixels) to be cleared to fit the point inside the view after a click on it. Values in the array are: [top, right, bottom, left]. |
geoJson ¶ | any | Payload of a geo-JSON object. | |
geoJsonProjection ¶ | string | 'EPSG:3857' | Projection format used to render the geo-JSON payload. |
globalZoom ¶ | number | DEFAULT_GLOBAL_ZOOM | Max zoom level on load or when clicking the reset button. Defaults to 5. |
groupColors ¶ | (Record <number , string > | ColorPalette ) | 'status' | Defines which colors should be used when points are grouped. Grouping means that points are painted with their group color and they are displayed as series in donut chart inside cluster. |
maptilerKey ¶ | string | Provide your key for MapTiler, this will use the default siemens element styles which can be used in both light and dark mode. Shouldn't be used together with styleJson. | |
markerAnimation ¶ | boolean | false | Enable or disable animation of markers. |
maxLabelLineLength ¶ | number | 20 | Maximum number of characters per line for always displayed labels of a point. If the label exceeds this limit, it will be wrapped or trimmed. If set to 0, label trimming will be disabled. This setting is effective only when alwaysShowLabels is enabled. Important: Changing this is not recommended in most cases and may cause issues with positioning of the labels. |
maxLabelLines ¶ | number | 3 | Maximum number of lines for always displayed labels of a point. If the label exceeds this limit, it will be trimmed. This setting is effective only when alwaysShowLabels is enabled and maxLabelLineLength is not 0. Important: Changing this is not recommended in most cases and may cause issues with positioning of the labels. |
multiWorld ¶ | boolean | true | Show multiple worlds, including points that cross the 180th meridian. |
nativeProperties ¶ | OverlayNativeProperties | - overlay: Layer for popup element, an element to be displayed over the map and attached to a single map location. - controls: List of controls to activate for map, additional controls like full screen, etc. can be added here. | |
points ¶ | MapPoint [] | Points to be rendered on the map as features. | |
popoverCloseOnClick ¶ | boolean | true | Close the popover on click |
popoverComponent ¶ | Type <any > | Custom popover component | |
popoverComponentProps ¶ | any | Custom popover component | |
styleFunction ¶ | StyleLike | Callback function to add custom styling to the drawn geo-JSON features. | |
styleJson ¶ | any | Type of background map, for example 'https://api.maptiler.com/maps/voyager/style.json?key=xxx' (Token key is required). The styleJson defines the tiler source and the used styles for different layers, should only be used if the siemens default styles by using maptilerKey isn't good enough. | |
moreText | TranslatableString | $localize`:@@SI_MAPS.TOOLTIP_MORE_TEXT:and {{length}} more...` | Cutoff text for tooltips, when cluster combines more than 4 features Deprecated: Use SiMapTooltipComponent instead to set the moreText input e.g. <si-map ...><si-map-tooltip [moreText]="'KEY_MORE'" /></si-map> . |
Output Properties¶
Name | Type | Description |
---|---|---|
pointsChange ¶ | MapPoint [] | Points to be rendered on the map as features. |
pointsRefreshed ¶ | void | Emitted when the points are available as features. So consumers can call methods like zoomToPoints() on the actual point list. |
pointsSelected ¶ | MapPoint [] | Emitted when points on the map are selected or de-selected |
Attributes and Methods¶
Name | Type | Default | Description |
---|---|---|---|
clear() ¶ | () => void | ||
closePopup() ¶ | () => boolean | Close popup | |
createOverlay(...) ¶ | (container: HTMLElement , position: Positioning , nativeProperties: OverlayNativeProperties , isTooltip: boolean ) => Overlay | Create overlay for tooltip and popover Parameters
| |
displayTooltip(...) ¶ | (feats: FeatureLike []) => void | Display tooltip on hovering over feature type of Feature. Parameters
| |
featureCallback(...) ¶ | (feat: FeatureLike , clusterHolder: ClusterHolder ) => (undefined | Feature <Geometry >[]) | Return features inside feature object in case of cluster enabled/disabled Parameters
| |
featureClick(...) ¶ | (feature: Feature , event: any , zoom: boolean ) => void | API for feature clicking with extra properties. Parameters | |
features ¶ | Feature <Geometry >[] | [] | |
hideOverlays() ¶ | () => void | ||
init() ¶ | () => void | Initialize map and it's layers | |
isClicked ¶ | boolean | false | |
map | Map | OpenLayers map instance. | |
mapboxStyles(...) ¶ | (styleJSON: any ) => void | Set mapbox styles Parameters
| |
onClusterClick(...) ¶ | (event: MapBrowserEvent ) => void | Clicking on cluster event Parameters
| |
onFeatureHover(...) ¶ | (event: MapBrowserEvent ) => void | On feature hovering show tooltip and change cursor style Parameters
| |
onThemeSwitch(...) ¶ | (dark: boolean ) => void | Parameters
| |
onThemeSwitchInternal(...) ¶ | (event: Event ) => void | Parameters
| |
popoverOverlay ¶ | Overlay | ||
refresh(...) ¶ | (points: MapPoint [], zoomToFeatures: boolean = true ) => void | Refresh points with new set of points Parameters | |
select(...) ¶ | (point: MapPoint , maxZoomLevel: number ) => void | Selecting the certain point on map with API Parameters | |
selected | Feature <Geometry > | ||
setGeoJsonLayer() ¶ | () => void | Setting up the geoJson layer | |
setMapStyle(...) ¶ | (dark: boolean , key: string , styleJSON: string ) => void | Set Map style Parameters | |
showClusterTooltipContent(...) ¶ | (features: Feature <Geometry >[], cluster: Feature <Geometry >) => boolean | Sends data into cluster tooltip based on number of Parameters | |
showTooltipContent(...) ¶ | (feature: Feature ) => boolean | Show tooltip with content on hover over feature Parameters
| |
targetFeature | Feature <Geometry > | ||
tooltipOverlay ¶ | Overlay | ||
zoomCluster(...) ¶ | (clusterFeatures: Feature <Geometry >[]) => void | Zoom to cluster features Parameters | |
zoomToFeatures(...) ¶ | (features: Feature <Geometry >[], zoomLevel: number , shouldAnimate: boolean = true ) => void | Zoom to features, gets coordinates of features and creates bounding extent Parameters | |
zoomToGeoJson(...) ¶ | (coordinate: Coordinate , zoomLevel: number , shouldAnimate: boolean = true ) => void | Zoom to GeoJson using coordinates of point of click Parameters
| |
zoomToPoints(...) ¶ | (points: MapPoint [], zoomLevel: number , shouldAnimate: boolean = true ) => void | Zoom to features, gets coordinates of points and creates bounding extent Parameters | |
onResize() | () => void | Deprecated: has no effect and will be removed in v48 |
Types Documentation¶
Variable |
---|
Variable |
---|
Variable |
---|
Variable |
---|
Variable |
---|
|
| ||||||||
|
import imported from ol |
---|
Represents a translatable string. This can either be a translation key, e.g. ACTIONS.EDIT that will be automatically translated when displayed on the UI or a pre-translated string, e.g. Edit . Equivalent to a normal string in usage and functionality. |
---|
import imported from ol |
---|
import imported from ol |
---|
import imported from ol |
---|
import imported from ol |
---|
| ||||||
|
import imported from ol |
---|
|
import imported from ol |
---|
import imported from ol |
---|
import imported from ol |
---|
import imported from ol |
---|
Function |
---|
import imported from ol |
---|
Class for grouping functionality | ||||||
---|---|---|---|---|---|---|
| ||||||
| ||||||
| ||||||
|
import imported from ol |
---|
import imported from ol |
---|
|
import imported from ol |
---|
import imported from ol |
---|
import imported from ol |
---|
import imported from ol |
---|
import imported from ol |
---|
import imported from ol |
---|
import imported from ol |
---|
import imported from ol |
---|
import imported from ol |
---|
|
| ||||||||||||||||
| ||||||||||||||||
| ||||||||||||||||
|
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
| |||||||||||||||||
| |||||||||||||||||
|
Wrapper around an actual translation framework which is meant to be used internally by Element. Applications must not use this service. Use injectSiTranslateService to get an instance of the translation service. | |||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| |||||||||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||||||||
|
Except where otherwise noted, content on this site is licensed under MIT License.