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

Defines the fluent API for configuring the Kendo UI Map

Definition

Constructors

Initializes a new instance of the MapBuilder class.

C#
public MapBuilder(Map component)
Parameters:componentMap

Methods

The map center. Coordinates are listed as [Latitude, Longitude].

C#
public MapBuilder Center(params double[] value)
Parameters:valuedouble[]

The value for Center

Returns:

MapBuilder

Returns the current MapBuilder instance.

Example:
C#
@(Html.Kendo().Map()
.Name("map")
.Center(30.268107, -97.744821)
)

The configuration of built-in map controls.

C#
public MapBuilder Controls(Action<MapControlsSettingsBuilder> configurator)
Parameters:configuratorAction<MapControlsSettingsBuilder>

The MapControlsSettingsBuilder for the controls setting.

Returns:

MapBuilder

Returns the current instance of MapBuilder .

Configures the client-side events.

C#
public MapBuilder Events(Action<MapEventBuilder> configurator)
Parameters:configuratorAction<MapEventBuilder>

The client events action.

Returns:

MapBuilder

Returns the current MapBuilder instance.

Example:
C#
@(Html.Kendo().Map()
.Name("Map")
.Events(events =&gt; events
.BeforeReset("onBeforeReset")
)
)

The default configuration for map layers by type.

C#
public MapBuilder LayerDefaults(Action<MapLayerDefaultsSettingsBuilder> configurator)
Parameters:configuratorAction<MapLayerDefaultsSettingsBuilder>

The MapLayerDefaultsSettingsBuilder for the layerdefaults setting.

Returns:

MapBuilder

Returns the current instance of MapBuilder .

The configuration of the map layers. The layer type is determined by the value of the type field.

C#
public MapBuilder Layers(Action<MapLayerFactory> configurator)
Parameters:configuratorAction<MapLayerFactory>

The MapLayerFactory for the layers setting.

Returns:

MapBuilder

Returns the current instance of MapBuilder .

The default options for all markers.

C#
public MapBuilder MarkerDefaults(Action<MapMarkerDefaultsSettingsBuilder> configurator)
Parameters:configuratorAction<MapMarkerDefaultsSettingsBuilder>

The MapMarkerDefaultsSettingsBuilder for the markerdefaults setting.

Returns:

MapBuilder

Returns the current instance of MapBuilder .

Static markers to display on the map.

C#
public MapBuilder Markers(Action<MapMarkerFactory> configurator)
Parameters:configuratorAction<MapMarkerFactory>

The MapMarkerFactory for the markers setting.

Returns:

MapBuilder

Returns the current instance of MapBuilder .

The maximum zoom level. Typical web maps use zoom levels from 0 (whole world) to 19 (sub-meter features).

C#
public MapBuilder MaxZoom(double value)
Parameters:valuedouble

The value for MaxZoom

Returns:

MapBuilder

Returns the current MapBuilder instance.

Example:
C#
@(Html.Kendo().Map()
.Name("map")
.MaxZoom(15)
)

Allows localization of the strings that are used in the widget.

C#
public MapBuilder Messages(Action<MapMessagesSettingsBuilder> configurator)
Parameters:configuratorAction<MapMessagesSettingsBuilder>

The MapMessagesSettingsBuilder for the messages setting.

Returns:

MapBuilder

Returns the current instance of MapBuilder .

The size of the map in pixels at zoom level 0.

C#
public MapBuilder MinSize(double value)
Parameters:valuedouble

The value for MinSize

Returns:

MapBuilder

Returns the current MapBuilder instance.

Example:
C#
@(Html.Kendo().Map()
.Name("map")
.MinSize(200)
)

The minimum zoom level. Typical web maps use zoom levels from 0 (whole world) to 19 (sub-meter features).

C#
public MapBuilder MinZoom(double value)
Parameters:valuedouble

The value for MinZoom

Returns:

MapBuilder

Returns the current MapBuilder instance.

Example:
C#
@(Html.Kendo().Map()
.Name("map")
.MinZoom(3)
)

Controls whether the user can pan the map.

C#
public MapBuilder Pannable(bool value)
Parameters:valuebool

The value for Pannable

Returns:

MapBuilder

Returns the current MapBuilder instance.

Example:
C#
@(Html.Kendo().Map()
.Name("map")
.Pannable(false)
)

Specifies whether the map should wrap around the east-west edges.

C#
public MapBuilder Wraparound(bool value)
Parameters:valuebool

The value for Wraparound

Returns:

MapBuilder

Returns the current MapBuilder instance.

Example:
C#
@(Html.Kendo().Map()
.Name("map")
.Wraparound(false)
)

The initial zoom level.Typical web maps use zoom levels from 0 (whole world) to 19 (sub-meter features).The map size is derived from the zoom level and minScale options: size = (2 ^ zoom) * minSize

C#
public MapBuilder Zoom(double value)
Parameters:valuedouble

The value for Zoom

Returns:

MapBuilder

Returns the current MapBuilder instance.

Example:
C#
@(Html.Kendo().Map()
.Name("map")
.Zoom(3)
)

Controls whether the map zoom level can be changed by the user.

C#
public MapBuilder Zoomable(bool value)
Parameters:valuebool

The value for Zoomable

Returns:

MapBuilder

Returns the current MapBuilder instance.

Example:
C#
@(Html.Kendo().Map()
.Name("map")
.Zoomable(false)
)