Example of Dynamic Markers in React Maps Component

/
/
DynamicMarker

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...

Image Not Found
Image Not Found
Image Not Found
Image Not Found
Image Not Found
Image Not Found
Image Not Found
Image Not Found
Image Not Found
Image Not Found
Image Not Found
Image Not Found

Click on the maps to add marker/navigation line

Properties
Marker
Line
Connecting line
Marker type
Width

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.

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.

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.