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

MapEventBuilder

Methods

BeforeReset(System.String)

Defines the handler of the BeforeReset client-side event. The event triggers immediately before the Map is reset. Usually, the event is used for cleanup by layer implementers.

For more information see BeforeReset event.

Parameters

handler - System.String

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

Example


             @(Html.Kendo().Map()
               .Name("map")
               .Events(events => events.BeforeReset("onBeforeReset"))
             )

Click(System.String)

Defines the handler of the Click client-side event. The event triggers when the user clicks on the Map.

For more information see Click event.

Parameters

handler - System.String

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

Example


             @(Html.Kendo().Map()
               .Name("map")
               .Events(events => events.Click("onClick"))
             )

MarkerActivate(System.String)

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

For more information see MarkerActivate event.

Parameters

handler - System.String

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

Example


             @(Html.Kendo().Map()
               .Name("map")
               .Events(events => events.MarkerActivate("onMarkerActivate"))
             )

MarkerCreated(System.String)

Defines the handler of the MarkerCreated client-side event. The event triggers when a marker has been created and is about to be displayed. Canceling the event will prevent the marker from being shown. Use the MarkerActivate event to access the marker DOM element.

For more information see MarkerCreated event.

Parameters

handler - System.String

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

Example


             @(Html.Kendo().Map()
               .Name("map")
               .Events(events => events.MarkerCreated("onMarkerCreated"))
             )

MarkerClick(System.String)

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

For more information see MarkerClick event.

Parameters

handler - System.String

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

Example


             @(Html.Kendo().Map()
               .Name("map")
               .Events(events => events.MarkerClick("onMarkerClick"))
             )

Pan(System.String)

Defines the handler of the Pan client-side event. The event triggers while the Map viewport is being moved.

For more information see Pan event.

Parameters

handler - System.String

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

Example


             @(Html.Kendo().Map()
               .Name("map")
               .Events(events => events.Pan("onPan"))
             )

PanEnd(System.String)

Defines the handler of the PanEnd client-side event. The event triggers after the Map viewport has been moved.

For more information see PanEnd event.

Parameters

handler - System.String

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

Example


             @(Html.Kendo().Map()
               .Name("map")
               .Events(events => events.PanEnd("onPanEnd"))
             )

Reset(System.String)

Defines the handler of the Reset client-side event. The event triggers when the Map is reset. It typically occurs on the initial load and after a zoom/center change.

For more information see Reset event.

Parameters

handler - System.String

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

Example


             @(Html.Kendo().Map()
               .Name("map")
               .Events(events => events.Reset("onReset"))
             )

ShapeClick(System.String)

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

For more information see ShapeClick event.

Parameters

handler - System.String

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

Example


             @(Html.Kendo().Map()
               .Name("map")
               .Events(events => events.ShapeClick("onShapeClick"))
             )

ShapeCreated(System.String)

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

For more information see ShapeCreated event.

Parameters

handler - System.String

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

Example


             @(Html.Kendo().Map()
               .Name("map")
               .Events(events => events.ShapeCreated("onShapeCreated"))
             )

ShapeFeatureCreated(System.String)

Defines the handler of the ShapeFeatureCreated client-side event. The event triggers when the GeoJSON feature object is created on a shape layer.

For more information see ShapeFeatureCreated event.

Parameters

handler - System.String

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

Example


             @(Html.Kendo().Map()
               .Name("map")
               .Events(events => events.ShapeFeatureCreated("onShapeFeatureCreated"))
             )

ShapeMouseEnter(System.String)

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

For more information see ShapeMouseEnter event.

Parameters

handler - System.String

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

Example


             @(Html.Kendo().Map()
               .Name("map")
               .Events(events => events.ShapeMouseEnter("onShapeMouseEnter"))
             )

ShapeMouseLeave(System.String)

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

For more information see ShapeMouseLeave event.

Parameters

handler - System.String

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

Example


             @(Html.Kendo().Map()
               .Name("map")
               .Events(events => events.ShapeMouseLeave("onShapeMouseLeave"))
             )

ZoomStart(System.String)

Defines the handler of the ZoomStart client-side event. The event triggers when the Map zoom level is about to change. Canceling the event will prevent the user's action.

For more information see ZoomStart event.

Parameters

handler - System.String

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

Example


             @(Html.Kendo().Map()
               .Name("map")
               .Events(events => events.ZoomStart("onZoomStart"))
             )

ZoomEnd(System.String)

Defines the handler of the ZoomEnd client-side event. The event triggers when the Map zoom level has changed.

For more information see ZoomEnd event.

Parameters

handler - System.String

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

Example


             @(Html.Kendo().Map()
               .Name("map")
               .Events(events => events.ZoomEnd("onZoomEnd"))
             )

In this article
Not finding the help you need?