New to Telerik UI for ASP.NET MVC? Start a free 30-day trial

Defines the fluent API for configuring the MapMarker settings.

Definition

Namespace:Kendo.Mvc.UI.Fluent

Assembly:Kendo.Mvc.dll

Syntax:

C#
public class MapMarkerBuilder

Inheritance: objectMapMarkerBuilder

Inherited Members object.GetType()object.MemberwiseClone()object.ToString()object.Equals(object)object.Equals(object, object)object.ReferenceEquals(object, object)object.GetHashCode()...

Constructors

C#
public MapMarkerBuilder(MapMarker settings)
Parameters:settingsMapMarker

Methods

Sets the HTML attributes of the Map marker.

C#
public virtual MapMarkerBuilder HtmlAttributes(IDictionary<string, object> attributes)
Parameters:attributesIDictionary<string, object>

The HTML attributes.

Returns:

MapMarkerBuilder

Example:
C#
@(Html.Kendo().Map()
.Name("map")
.Markers(markers =&gt;
{
markers.Add()
.HtmlAttributes(new Dictionary&lt;string, object&gt;() { ["style"] = "color: red;" });
})
)

Sets the HTML attributes of the Map marker.

C#
public virtual MapMarkerBuilder HtmlAttributes(object attributes)
Parameters:attributesobject

The HTML attributes.

Returns:

MapMarkerBuilder

Example:
C#
@(Html.Kendo().Map()
.Name("map")
.Markers(markers =&gt;
{
markers.Add()
.HtmlAttributes(new { style = "color: red;" });
})
)

Defines the marker location on the Map. The coordinates are listed as [Latitude, Longitude].

C#
public MapMarkerBuilder Location(params double[] value)
Parameters:valuedouble[]

The value that configures the marker location.

Returns:

MapMarkerBuilder

Example:
C#
@(Html.Kendo().Map()
.Name("map")
.Markers(markers =&gt;
{
markers.Add().Location(30.268107, -97.744821);
})
)

Defines the marker shape. The marker shapes are implemented as CSS classes on the marker element ("span.k-marker").

C#
public MapMarkerBuilder Shape(MapMarkersShape value)
Parameters:valueMapMarkersShape

The enum value that configures the marker shape.

Returns:

MapMarkerBuilder

Example:
C#
@(Html.Kendo().Map()
.Name("map")
.Markers(markers =&gt;
{
markers.Add().Shape(MapMarkersShape.PinTarget);
})
)

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".

C#
public MapMarkerBuilder Shape(string name)
Parameters:namestring

The name of the marker shape.

Returns:

MapMarkerBuilder

Example:
C#
@(Html.Kendo().Map()
.Name("map")
.Markers(markers =&gt;
{
markers.Add().Shape("pinTarget");
})
)

Defines the marker title. It is displayed as a browser tooltip.

C#
public MapMarkerBuilder Title(string value)
Parameters:valuestring

The value that configures the title.

Returns:

MapMarkerBuilder

Example:
C#
@(Html.Kendo().Map()
.Name("map")
.Markers(markers =&gt;
{
markers.Add().Title("POI");
})
)

Defines the tooltip options for the marker.

C#
public MapMarkerBuilder Tooltip(Action<MapMarkerTooltipBuilder> configurator)
Parameters:configuratorAction<MapMarkerTooltipBuilder>

The action that configures the tooltip settings.

Returns:

MapMarkerBuilder

Example:
C#
@(Html.Kendo().Map()
.Name("map")
.Markers(markers =&gt;
{
markers.Add()
.Tooltip(tooltip =&gt; tooltip.Content("City X").AutoHide(true));
})
)