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

Defines the fluent API for configuring the Telerik UI for ASP.NET MVC Map client-events.

Definition

Constructors

C#
public MapEventBuilder(IDictionary<string, object> events)
Parameters:eventsIDictionary<string, object>

Methods

Defines the handler of the BeforeReset client-side event. Fired immediately before the map is reset. This event is typically used for cleanup by layer implementers.

C#
public MapEventBuilder BeforeReset(string handler)
Parameters:handlerstring

The name of the JavaScript function that will handle the BeforeReset event.

Returns:

MapEventBuilder

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

Defines the handler of the Click client-side event. Fired when the user clicks on the map.

C#
public MapEventBuilder Click(string handler)
Parameters:handlerstring

The name of the JavaScript function that will handle the Click event.

Returns:

MapEventBuilder

Example:
C#
@(Html.Kendo().Map()
.Name("map")
.Events(events =&gt; events.Click("onClick"))
)

Defines the handler of the KendoKeydown client-side event. Triggered when the user presses a keyboard key while the Map is focused.The event handler function context (available via the this keyword) will be set to the widget instance.

C#
public MapEventBuilder KendoKeydown(string handler)
Parameters:handlerstring

The name of the JavaScript function that will handle the KendoKeydown event.

Returns:

MapEventBuilder

Defines the handler of the MarkerActivate client-side event. Fired when a marker has been displayed and has a DOM element assigned.

C#
public MapEventBuilder MarkerActivate(string handler)
Parameters:handlerstring

The name of the JavaScript function that will handle the MarkerActivate event.

Returns:

MapEventBuilder

Example:
C#
@(Html.Kendo().Map()
.Name("map")
.Events(events =&gt; events.MarkerActivate("onMarkerActivate"))
)

Defines the handler of the MarkerClick client-side event. Fired when a marker has been clicked or tapped.

C#
public MapEventBuilder MarkerClick(string handler)
Parameters:handlerstring

The name of the JavaScript function that will handle the MarkerClick event.

Returns:

MapEventBuilder

Example:
C#
@(Html.Kendo().Map()
.Name("map")
.Events(events =&gt; events.MarkerClick("onMarkerClick"))
)

Defines the handler of the MarkerCreated client-side event. Fired when a marker has been created and is about to be displayed. Cancelling the event will prevent the marker from being shown.Use markerActivate if you need to access the marker DOM element.

C#
public MapEventBuilder MarkerCreated(string handler)
Parameters:handlerstring

The name of the JavaScript function that will handle the MarkerCreated event.

Returns:

MapEventBuilder

Example:
C#
@(Html.Kendo().Map()
.Name("map")
.Events(events =&gt; events.MarkerCreated("onMarkerCreated"))
)

Defines the handler of the Pan client-side event. Fired while the map viewport is being moved.

C#
public MapEventBuilder Pan(string handler)
Parameters:handlerstring

The name of the JavaScript function that will handle the Pan event.

Returns:

MapEventBuilder

Example:
C#
@(Html.Kendo().Map()
.Name("map")
.Events(events =&gt; events.Pan("onPan"))
)

Defines the handler of the PanEnd client-side event. Fires after the map viewport has been moved.

C#
public MapEventBuilder PanEnd(string handler)
Parameters:handlerstring

The name of the JavaScript function that will handle the PanEnd event.

Returns:

MapEventBuilder

Example:
C#
@(Html.Kendo().Map()
.Name("map")
.Events(events =&gt; events.PanEnd("onPanEnd"))
)

Defines the handler of the Reset client-side event. Fired when the map is reset. This typically occurs on initial load and after a zoom/center change.

C#
public MapEventBuilder Reset(string handler)
Parameters:handlerstring

The name of the JavaScript function that will handle the Reset event.

Returns:

MapEventBuilder

Example:
C#
@(Html.Kendo().Map()
.Name("map")
.Events(events =&gt; events.Reset("onReset"))
)

Defines the handler of the ShapeClick client-side event. Fired when a shape is clicked or tapped.

C#
public MapEventBuilder ShapeClick(string handler)
Parameters:handlerstring

The name of the JavaScript function that will handle the ShapeClick event.

Returns:

MapEventBuilder

Example:
C#
@(Html.Kendo().Map()
.Name("map")
.Events(events =&gt; events.ShapeClick("onShapeClick"))
)

Defines the handler of the ShapeCreated client-side event. Fired when a shape is created, but is not rendered yet.

C#
public MapEventBuilder ShapeCreated(string handler)
Parameters:handlerstring

The name of the JavaScript function that will handle the ShapeCreated event.

Returns:

MapEventBuilder

Example:
C#
@(Html.Kendo().Map()
.Name("map")
.Events(events =&gt; events.ShapeCreated("onShapeCreated"))
)

Defines the handler of the ShapeFeatureCreated client-side event. Fired when a GeoJSON Feature is created on a shape layer.

C#
public MapEventBuilder ShapeFeatureCreated(string handler)
Parameters:handlerstring

The name of the JavaScript function that will handle the ShapeFeatureCreated event.

Returns:

MapEventBuilder

Example:
C#
@(Html.Kendo().Map()
.Name("map")
.Events(events =&gt; events.ShapeFeatureCreated("onShapeFeatureCreated"))
)

Defines the handler of the ShapeMouseEnter client-side event. Fired when the mouse enters a shape.

C#
public MapEventBuilder ShapeMouseEnter(string handler)
Parameters:handlerstring

The name of the JavaScript function that will handle the ShapeMouseEnter event.

Returns:

MapEventBuilder

Example:
C#
@(Html.Kendo().Map()
.Name("map")
.Events(events =&gt; events.ShapeMouseEnter("onShapeMouseEnter"))
)

Defines the handler of the ShapeMouseLeave client-side event. Fired when the mouse leaves a shape.

C#
public MapEventBuilder ShapeMouseLeave(string handler)
Parameters:handlerstring

The name of the JavaScript function that will handle the ShapeMouseLeave event.

Returns:

MapEventBuilder

Example:
C#
@(Html.Kendo().Map()
.Name("map")
.Events(events =&gt; events.ShapeMouseLeave("onShapeMouseLeave"))
)

Defines the handler of the ZoomEnd client-side event. Fired when the map zoom level has changed.

C#
public MapEventBuilder ZoomEnd(string handler)
Parameters:handlerstring

The name of the JavaScript function that will handle the ZoomEnd event.

Returns:

MapEventBuilder

Example:
C#
@(Html.Kendo().Map()
.Name("map")
.Events(events =&gt; events.ZoomEnd("onZoomEnd"))
)

Defines the handler of the ZoomStart client-side event. Fired when the map zoom level is about to change. Cancelling the event will prevent the user action.

C#
public MapEventBuilder ZoomStart(string handler)
Parameters:handlerstring

The name of the JavaScript function that will handle the ZoomStart event.

Returns:

MapEventBuilder

Example:
C#
@(Html.Kendo().Map()
.Name("map")
.Events(events =&gt; events.ZoomStart("onZoomStart"))
)