New to Telerik UI for ASP.NET Core? Download free 30-day trial

MapMarkerBuilder

Methods

HtmlAttributes(System.Object)

Sets the HTML attributes of the Map marker.

Parameters

attributes - System.Object

The HTML attributes.

Example


             @(Html.Kendo().Map()
               .Name("map")
               .Markers(markers =>
               {
                  markers.Add()
                    .HtmlAttributes(new { style = "color: red;" });
                })
             )

HtmlAttributes(System.Collections.Generic.IDictionary)

Sets the HTML attributes of the Map marker.

Parameters

attributes - System.Collections.Generic.IDictionary<String,Object>

The HTML attributes.

Example


             @(Html.Kendo().Map()
               .Name("map")
               .Markers(markers =>
               {
                  markers.Add()
                    .HtmlAttributes(new Dictionary<string, object>() { ["style"] = "color: red;" });
                })
             )

Shape(System.String)

Sets the marker shape name. The available pre-defined marker shapes are "pin" and "pinTarget".

Parameters

name - System.String

The name of the marker shape.

Example


             @(Html.Kendo().Map()
               .Name("map")
               .Markers(markers =>
               {
                  markers.Add().Shape("pin");
                })
             )

Tooltip(System.Action)

Sets the tooltip options of the Map marker.

Parameters

configurator - System.Action<MapMarkerTooltipBuilder>

The action that configures the tooltip settings.

Example


             @(Html.Kendo().Map()
               .Name("map")
               .Markers(markers =>
               {
                  markers.Add()
                  .Tooltip(tooltip => tooltip.Content("City X").AutoHide(true));
                })
             )

Location(System.Double[])

The marker location on the map. Coordinates are listed as [Latitude, Longitude].

Parameters

value - System.Double[]

The value for Location

Title(System.String)

The marker title. Displayed as browser tooltip.

Parameters

value - System.String

The value for Title

Shape(Kendo.Mvc.UI.MapMarkersShape)

The marker shape. Supported shapes are "pin" and "pinTarget".

Parameters

value - MapMarkersShape

The value for Shape

In this article
Not finding the help you need?