Example of Dynamic markers in Javascript Maps Control

/
/
Dynamic markers

This sample shows how custom markers and lines can be dynamically added to our maps with UI interaction. Marker or line can be chosen from the properties panel.

More Details...

Click on the maps to add marker/navigation line

Marker
Line
Connecting line
Marker type
Width
Description

Using UI interaction, the markers or line can be added as follows: You can get the currently clicked geo location by passing "PointerEvent" or "MouseEvent" argument and layer index to the "getGeoLocation" method. Then, use that geo position to place the marker or line in the appropriate position. Injecting Module The features of maps component are segregated into individual feature-wise modules. To use navigation lines and marker, you need to inject the NavigationLine and Marker module using the Maps.Inject(NavigationLine, Marker) method. More information on maps can be found in this documentation section.