Skip to main content
Version: 4.60

map

A map layer is used to create an interactive map that can be used to visualize markers and routes.

Field Configurations

KeyTypeDescriptionDefault Value
"clickReaction"MapClickReactionReaction on tapping a marker"actionsAndInfo"
"enableClustering"BooleanDefines if nearby markers should be grouped into a single marker.false
"filterOptions"ObjectDefines options for filters, contains filterType (single,multi) and filterStyle (default,button). Only used if filterType or filterStyle is not set."filterType: multi, filterSyle: default"
"filterSetting"StringDefines the key for saving filter in the _settings database table if saveSettings action is performed.null
"filterStyle"StringDefines the style of the filter.null
"filterType"StringDefines how the parameters of the query used for filtering are transferred."regex"
"filters"FiltersDefines a list of the filters for the map content.null
"hideFilters"BooleanDefines whether the filters are hidden.false
"iconType"StringDisplays only the marker's icon instead of displaying it inside of a regular marker. Possible values is complete and inside (iOS only).null
"initialPosition"InitialPositionList of the possible value for configuring initial position on the map.null
"instantSearch"BooleanDefines if the search is performed on each character input.false
"itemActions"ArrayList of the actions which will be fired when the marker is interacted with. Going to be evaluated only if data comes from database table.null
"makeRouteOfMarkers"BooleanDefines whether route should be created from markers.false
"mapStyle"StringDefines the style of the map (Android only). For possible values see: https://developers.google.com/maps/documentation/android-sdk/style-reference.null
"mapType"MapTypeType of the map"system"
"markerColor"ColorDefines the default color for custom markers. This color will be used if no color is provided in the configuration of a custom marker.null
"markerIcon"StringURL to an icon to use as a map markernull
"markers"MarkersDefines the list of markers for the map.null
"minSearchCharacters"NumberDefines the minimum number of characters required for the search to be performed.0
"onRectChange"StringEvent which will get fired when the current zoomed rectangle changes.null
"query"StringDefines the name of the query (defined in the specified database table) which is executed to retrieve the content for the map layer.null
"queryParams"Arraynull
"route"RouteList of the waypoints for the route.null
"routeColor"StringDefines the color of the route line that is created from markers and displayed on the map.null
"routeLatField"StringDefnes the name of the database table's column that which retrieves the latitude for the routing point."lat"
"routeLineColor"StringDefines the color of the line of the route that is created from markers (iOS only, for Android use routeColor)"#1996fa"
"routeLineWidth"NumberDefines thickness of the line of the route that is created from markers (iOS only).3
"routeLonField"StringDefnes the name of the database table's column that which retrieves the longitude for the routing point."lon"
"routeQuery"StringDefines the name of the query (defined in the specified database table) which is executed to retrieve data for displaying a polyline object on the map.null
"routeQueryParams"ArrayA list of query paramaters for displaying a route on a map layer.null
"routeTable"StringDefines the database table to display a polyline object on the map.null
"searchEnabled"BooleanDefines whether the searching functionality is enabled for the map.false
"searchHint"StringDefines the search hint text that is displayed in the searching bar.null
"searchSetting"StringDefines the key for saving search in the _settings database table if saveSettings action is performed.null
"searchType"StringDefines how the parameters of the query used for searching are transferred."regex"
"selectedMarkerColor"StringDefines the default color for the selected custom marker. This color will be used if no color is provided in the configuration of a custom marker.null
"selectedMarkerIcon"StringURL to an icon to use as a selected map markernull
"showLocationAuthorizationAlert"BooleanDefines whether an 'alert' dialog window is shown if the user has not provided permissions for the app to use their location (iOS only).true
"showPointsOfInterest"Boolean(iOS only) Defines wwhether points of interest such as shops, etc. are marked with a pin.true
"showTraffic"BooleanDefines whether current traffic is shown.false
"showUserLocation"BooleanDefines whether the user's position should be displayed on the map.true
"styles"StringDefines additional style or styles of the filter.null
"table"StringDefines the name of the database table that serves as the source for markers that are displayed on the map.null
"transportType"StringDefines the type of transport."none"
"valueMap"ValueMapList of the possible values that are using query results for it's configuration.null
"visiblePaddingBottom"StringDefines the bottom padding for the map.null
"visiblePaddingLeft"StringDefines the left padding for the map.null
"visiblePaddingRight"StringDefines the right padding for the map.null
"visiblePaddingTop"StringDefines the top padding for the map.null
"zoomAnimated"BooleanDefines whether the initial zoom should be animated (iOS only).null
"zoomControls"BooleanDefines whether the map should display zoom buttons (Android only).null
"zoomOnUpdate"BooleanDetermines if the map should change its zoom when the pins change.true
"zoomedRadius"NumberDefines the amount of meters from the center of zoomedRegions to the upper left point of the layer. Used for consistent zoom over both Android and iOS.null
"zoomedRegions"MapZoomedRegionDefines the zoom of the map after loading."all"

Inherited

From Base Layer

Base Layer

Field Configurations

KeyTypeDescriptionDefault Value
"_value"Value[PREVIEW] Dynamic value of the layer.null
"accessibilityAppendState"StringDefines this layer appends its state to the accessibility text.null
"accessibilityText"StringText for accessibility navigation. Can be translated.null
"actions"ActionListList of actions, which will be executed when the layer is tapped.null
"borderColor"ColorThe color of the border in hex color value.null
"borderRadius"UnitSizeThe radius applies to all corners; with a borderWidth of 0 the border is not drawn and radius is set anyway.0
"borderWidth"UnitSizeThe width of the border.0
"bottomLeftRadius"UnitSizeRadius for the bottom left corner.0
"bottomRightRadius"UnitSizeRadius for the bottom right corner.0
"classes"ArrayList of classes for layer styles.null
"conditions"ConditionsList of conditions to alter the layer state.null
"constraints"ConstraintsA list of constraints defining the position of the layer in a layout.null
"consumesKeyboard"BooleanThis layer will be used to shrink, if a keyboard is shown.null
"dataKey"StringName for assigning data to this layer.null
"focusColor"ColorThe highlight color of this layer when it is focused. Mainly used on TV. If no color is provided, the pressedColor will be used.null
"hidden"BooleanIndicates whether the layer is hidden. Default: false.false
"isAccessibilityElement"StringDefines if this layer is important for accessibility navigation. The default depends on the layer type.null
"layerRotation"NumberThe layer is rotated by the specified degree.0
"name"StringUnique name in the layout. Used for alignment or actions.null
"opacity"NumberThe opacity of the layer.1
"overInsetBottom"BooleanDetermines if this layer ignores the save space at the bottom of the device.false
"overInsetTop"BooleanDetermines if this layer ignores the save space at the top of the device.false
"pressedColor"ColorThe highlight color of this layer when it is pressed. Mainly used on TV. If no color is provided, the focusColor will be used.null
"safeArea"SafeAreaTypeObjectDetermines the safe area behaviour.null
"shadowElevation"NumberThe elevation of this layer for casting shadows.0
"state"StringThe state the layer will use as default."default"
"states"LayerStatesA list of named states that affect the appearance of the layer.null
"topLeftRadius"UnitSizeRadius for the top left corner.0
"topRightRadius"UnitSizeRadius for the top right corner.0
"touchFeedback"TouchFeedbackDetermines if the layer should show a touch feedback if touched."visible"
"trackingKey"StringDefines a key for a scroll event.null
"type"LayerTypeThe type of the layernull
"value"Value(Initial) value of the layer.null

Examples

Example 1: Create a basic map

Goal: Creates a map with two markers, preselects the "Train Station" and displays a related message based on the marker with which the user has interacted.

To achieve this the following code can be used:

{
"type": "map",
"transportType": "auto",
"markers": [
{
"text": "Bahnhof",
"color": "#00ff00",
"latitude": 50.579443,
"longitude": 8.662399,
"selected": true,
"actions": [
{
"type": "showMessage",
"params": {
"text": "Bahnhof clicked"
}
}
]
},
{
"text": "Kino",
"color": "#ff0000",
"latitude": 50.584207,
"longitude": 8.679269,
"actions": [
{
"type": "showMessage",
"params": {
"text": "Kino clicked"
}
}
]
}
],
"classes": [
"fullSize"
]
}

The locations of the markers are specified by indicating the corresponding coordinates in latitude and longitude.

Result:

Screenshot of the app showing the results of the sample code from Example 1. Screenshot of the app showing the results of the sample code from Example 1.
A map layer has been created