Example of Marker in ASP.NET MVC Maps Control
This sample visualizes the top 25 populated cities in the world by displaying the markers in their locations.
Bind markers shape from data source
|
|
Bind markers color from data source
|
|
In this example, you can see how to render the markers in a map. Markers are used to indicate or mark a particular
location on the map with desired symbols. Also, options have been provided to bind the shapes and colors to the
markers based on the continent from the data source. This is achieved using the shapeValuePath
and colorValuePath
properties of the marker.
Tooltip is enabled in this example. To see the tooltip in action, hover the mouse over a marker or tap a marker in touch enabled devices.
Injecting Module
Maps component features are segregated into individual feature-wise modules. To use a marker, inject the
Marker
module using the Maps.Inject(Marker)
method.