marker

Version compatibility

marker was introduced in version 4.82.0 of the JourneyApps Runtime.

Overview

A marker can visually highlight a specific location on a map within either the capture-coordinates or display-coordinates UI component.

Example - Binding Multiple Markers

Below is an example of using capture-coordinates along with multiple custom markers.

main.view.xml
<var name="current_location" type="location" />
<var name="map_center" type="location" />
<var name="high_school" type="location" />
<var name="food" type="location" />

<capture-coordinates label="My Location" bind="current_location" allow-zoom="true" allow-dragging="true" >  
    <marker bind="map_center" icon="fa-user"/>
    <marker bind="high_school" icon="fa-graduation-cap" />
    <marker bind="food" icon="fa-utensils" />
</capture-coordinates>

Standard Attributes

bind

bind

bind can be replaced with latitude and longitude.

label

Optional

Type: string (static text, a format string or the return value of a JS/TS function)

Default: unset

Text to display above the marker in a floating bubble. Text is displayed once a user interacts with the marker.

View XML using marker:

View JS using marker:

View XML using marker-query:

View JS using marker-query:

Also see:

label

latitude and longitude

Optional

Type: location

Default: unset

Specifies at which latitude and longitude the marker will be positioned on the map. Use latitude and longitude from the location variable/field to specify the marker location.

latitude and longitude can be replaced with bind.

View XML using marker:

View JS using marker:

View XML using marker-query:

View JS using marker-query:

Advanced Attributes

color

Optional

Type: string - can be a named color or #HEX value

Default: unset

Specify the color of the marker background.

View XML using marker:

View JS using marker:

View XML using marker-query:

View JS using marker-query:

icon

Optional

Type: string

Default: fa-circle

Specify the icon shown in the marker. Find a list of available icons here.

View XML using marker:

View JS using marker:

View XML using marker-query:

View JS using marker-query:

icon-color

Optional

Type: string - can be a named color or #HEX value

Default: unset

Specify the color of the icon.

View XML using marker:

View JS using marker:

View XML using marker-query:

View JS using marker-query:

on-press

on-press

show-if and hide-if

show-ifhide-if

Last updated