For Dashboard Designers Reference MapView
Thursday, April 25, 2024 10:25 AMMapView
Label: :IA_Function
Property: type: MapView
Inherits from: Function and View
The MapView Function renders a Map with locations.
Google Maps
The MapView is based on Google Maps. It requires an API key to function. Click here to start creating your own key. You can set the Google Maps API key on the Settings page.
Function parameters
Key | Description | Default value | Possible values |
---|---|---|---|
addressSearch.enabled |
Enabled input field for searching an address | false |
Boolean |
addressSearch.placeholder |
Placeholder for address search input | Search address |
String |
addressSearch.text |
Pre-entered value on address search input | String | |
autoFit |
Zoom and center on markers or GeoJSON features | true |
Boolean |
markerAnimation |
Define marker animation on map to disable animation value should be null. markers animation property will overwrite this. | DROP |
Can be null or Animation constants from google maps |
center.lat |
Geographic latitude of the point which should be in the center of the map | 0 | Real number |
center.long |
Geographic longitude of the point which should be in the center of the map | 0 | Real number |
markers.lat |
Latitudes of all markers | Array of numbers | |
markers.long |
Longitudes of all markers | Array of numbers | |
markers.animation |
Animation of all markers | Animation constants from google maps | |
markers.title |
Titles of all markers | Array of strings | |
markers.info |
Popup content of all markers | Array of strings | |
markers.icon |
Icons of all markers | Array of strings | |
markers.spiderfiableIcon |
Icons of all markers when spiderfiableble | Array of strings | |
markers.unspiderfiableIcon |
Icons of all markers when unspiderfiable | Defaults to markers.icon |
Array of strings |
markers.spiderfiedIcon |
Icons of all markers when spiderfied | Defaults to markers.icon |
Array of strings |
markers.{...} |
Custom properties of all markers | Array | |
geoJSON |
GeoJson data structure | Object | |
geoJSONStyle |
GeoJSON general styling see documentation. This is the base styling applied to all GeoJSON features. It can be customized by the style property of a feature. |
Object | |
spiderfier.active |
Enables the spiderfier functionality (nicely rearrange aglomerated markers) | true |
Boolean |
spiderfier.circleSpiralSwitchover |
Lowest number of markers that will be fanned out into a spiral instead of a circle. | 9 | Number |
spiderfier.ignoreMapClick |
If set to true , markers will not be unspiderfied when the map is clicked. |
false |
Boolean |
spiderfier.keepSpiderfied |
Keeps the spiderfied markers spiderfied when clicked. | false |
Boolean |
spiderfier.legWeight |
Thickness of the lines joining spiderfied markers to their original location. | 1.5 | Number |
spiderfier.nearbyDistance |
Pixel radius within which a marker is considered to be overlapping a clicked marker. | 20 | Number |
zoom |
Zoom-in level on the map (the bigger the number the closer to the ground). $autoFit: true with markers or geoJSON on the map will override this value. |
Real number |
Outgoing triggers
Type: mapClick
Occurrence: When the user clicks on map.
Additional event properties (besides the inherited properties):
Key | Description | Possible values |
---|---|---|
location |
Clicked Latitude and Longtitude | Object with lat and lng value |
x |
Clicked Screen X position | Number |
y |
Clicked Screen Y position | Number |
Type: markerClick
Occurrence: When the user clicks a marker.
Additional event properties (besides the inherited properties):
Key | Description | Possible values |
---|---|---|
marker |
The clicked marker. | Object with properties stored in the marker |
Type: markerRightClick
Occurrence: When the user right-clicks a marker.
Additional event properties (besides the inherited properties):
Key | Description | Possible values |
---|---|---|
marker |
The right-clicked marker. | Object with properties stored in the marker |
Type: markerTitleClick
Occurrence: When the user clicks the title of a marker.
Additional event properties (besides the inherited properties):
Key | Description | Possible values |
---|---|---|
marker |
The marker of the clicked title. | Object with properties stored in the marker |
Type: featureClick
Occurrence: When the user clicks a feature from geoJSON.
Additional event properties (besides the inherited properties):
Key | Description | Possible values |
---|---|---|
feature |
The clicked feature. | Object with properties stored in the feature |
Type: featureRightClick
Occurrence: When the user right clicks a feature from geoJSON.
Additional event properties (besides the inherited properties):
Key | Description | Possible values |
---|---|---|
feature |
The clicked feature. | Object with properties stored in the feature |
location |
Clicked Latitude and Longtitude | Object with lat and lng value |
Type: mapRightClick
Occurrence: When the user right clicks on map.
Additional event properties (besides the inherited properties):
Key | Description | Possible values |
---|---|---|
location |
Clicked Latitude and Longtitude | Object with lat and lng value |
x |
Clicked Screen X position | Number |
y |
Clicked Screen Y position | Number |
Type: boundsChanged
Occurrence: When the user clicks a feature from geoJSON.
Additional event properties (besides the inherited properties):
Key | Description | Possible values |
---|---|---|
bounds |
Bounds data of visible map | Object with properties of bound {east: float, north: float, south: float, west: float} |
center |
Center of visible map | Object with lat and long value |
zoom |
Current zoom value of map | Real number |
Type: addressSelected
Occurrence: When the user clicks an option in address search input field.
Additional event properties (besides the inherited properties):
Key | Description | Possible values |
---|---|---|
location |
Address Latitude and Longtitude | Object with lat and long value |
info |
Name of address | String |
zoom |
Zoom value of address bounds | Real number |
Example
Below is an example for a query providing input to a MapView. Click the image to open the corresponding public Diagram. Clicking the nodes and relation in the Diagram shows their properties.