Annotations in ASP.NET Core Maps Component

18 Nov 20181 minute to read

Annotations are used to mark the specific area of interest in the Maps with texts, shapes, or images. Any number of annotations can be added to the Maps component.

Annotation

By using the Content property of MapsAnnotation, text content or id of an element or an HTML string can be specified to render a new HTML element in Maps.

Annotation

Annotation customization

Changing the z-index

The stack order of an annotation element can be changed using theĀ ZIndex property in the MapsAnnotation.

Annotation zindex

Positioning an annotation

Annotations can be placed anywhere in the Maps by specifying pixel or percentage values to the X and Y properties in the MapsAnnotation.

Annotation zindex

Alignment of an annotation

Annotations can be aligned using the HorizontalAlignment and VerticalAlignment properties in the MapsAnnotation. The possible values can be Center, Far, Near and None.

Annotation zindex

Multiple Annotation

Multiple annotations can be added to the Maps by adding Multiple MapsAnnotation in the MapsAnnotations and customization for the annotations can be done with the MapsAnnotation.

Annotation zindex