MapMarkerBuilder
Methods
Location(System.Double[])
Defines the marker location on the Map. The coordinates are listed as [Latitude, Longitude].
Parameters
value - System.Double[]
The value that configures the marker location.
Example
@(Html.Kendo().Map()
.Name("map")
.Markers(markers =>
{
markers.Add().Location(30.268107, -97.744821);
})
)
Title(System.String)
Defines the marker title. It is displayed as a browser tooltip.
Parameters
value - System.String
The value that configures the title.
Example
@(Html.Kendo().Map()
.Name("map")
.Markers(markers =>
{
markers.Add().Title("POI");
})
)
Shape(Kendo.Mvc.UI.MapMarkersShape)
Defines the marker shape. The marker shapes are implemented as CSS classes on the marker element ("span.k-marker").
Parameters
value - MapMarkersShape
The enum value that configures the marker shape.
Example
@(Html.Kendo().Map()
.Name("map")
.Markers(markers =>
{
markers.Add().Shape(MapMarkersShape.PinTarget);
})
)
Shape(System.String)
Defines the marker shape. The marker shapes are implemented as CSS classes on the marker element ("span.k-marker"). The available 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("pinTarget");
})
)
Tooltip(System.Action)
Defines the tooltip options for the 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));
})
)
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;" });
})
)