Example of Labels in ASP.NET MVC Maps Control

Maps
Features
Labels

This sample visualizes the names of all the states in USA in data labels. Options have been provided to change the intersect action and smart labels mode of the data labels.

;
Mas...MinnesotaMontanaNorth Dakota IdahoWashingtonArizonaCaliforniaColoradoNevadaNew MexicoOregonUtahWyomingArkansasIowaKansasMissouriNebraskaOklahomaSouth DakotaLouisia...TexasC... V...Alaba...FloridaGeorgiaMiss...Sout...IllinoisIndi...KentuckyNorth CarolinaOhioTennesseeVirginiaWisconsinWest ... New YorkPennsylva...MaineMichiganAlaska
Properties
Show Labels
Smart label mode
Intersect action

In this example, you can see how to render the data labels for each shape in a map. Data labels are used to display the values of the shapes. You can use the autoFill property in the shapeSettings to apply the default palette colors to the shapes.

Tooltip is enabled in this example. To see the tooltip in action, hover the mouse over a shape or tap a shape in touch enabled devices.


Injecting Module

Maps component features are segregated into individual feature-wise modules. To use a data label, inject the DataLabel module using the Maps.Inject(DataLabel) method.

;
Transform your ASP.NET MVC web apps today with Syncfusion® ASP.NET MVC components
85+ high-performance and responsive UI components
Dedicated support
Hassle-free licensing
TRY IT FOR FREE
opens in a new tab