MapTagHelper
Kendo UI Map TagHelper MapTagHelper class.
Definition
Namespace:Kendo.Mvc.TagHelpers
Assembly:Kendo.Mvc.dll
Syntax:
[HtmlTargetElement("kendo-map")]
[RestrictChildren("controls", new string[] { "layer-defaults", "layers", "marker-defaults", "markers", "messages" })]
public class MapTagHelper : TagHelperBase, ITagHelper, ITagHelperComponent
Inheritance: objectTagHelperTagHelperBaseMapTagHelper
Implements:
Inherited Members
Example:
@addTagHelper *, Kendo.Mvc
<kendo-map name="map" center="@(new double[] { 37.7749, -122.4194 })">
</kendo-map>
Child Tags
Constructors
Initializes a new instance of the MapTagHelper class.
Properties
The map center. Coordinates are listed as [Latitude, Longitude].
public double[] Center { get; set; }
The maximum zoom level. Typical web maps use zoom levels from 0 (whole world) to 19 (sub-meter features).
public double? MaxZoom { get; set; }
The size of the map in pixels at zoom level 0.
public double? MinSize { get; set; }
The minimum zoom level. Typical web maps use zoom levels from 0 (whole world) to 19 (sub-meter features).
public double? MinZoom { get; set; }
The name of the JavaScript function that will handle the beforeReset event. Fired immediately before the map is reset. This event is typically used for cleanup by layer implementers.
public string OnBeforeReset { get; set; }
The name of the JavaScript function that will handle the click event. Fired when the user clicks on the map.
public string OnClick { get; set; }
The name of the JavaScript function that will handle the kendoKeydown 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.
public string OnKendoKeydown { get; set; }
The name of the JavaScript function that will handle the markerActivate event. Fired when a marker has been displayed and has a DOM element assigned.
public string OnMarkerActivate { get; set; }
The name of the JavaScript function that will handle the markerClick event. Fired when a marker has been clicked or tapped.
public string OnMarkerClick { get; set; }
The name of the JavaScript function that will handle the markerCreated 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.
public string OnMarkerCreated { get; set; }
The name of the JavaScript function that will handle the pan event. Fired while the map viewport is being moved.
public string OnPan { get; set; }
The name of the JavaScript function that will handle the panEnd event. Fires after the map viewport has been moved.
public string OnPanEnd { get; set; }
The name of the JavaScript function that will handle the reset event. Fired when the map is reset. This typically occurs on initial load and after a zoom/center change.
public string OnReset { get; set; }
The name of the JavaScript function that will handle the shapeClick event. Fired when a shape is clicked or tapped.
public string OnShapeClick { get; set; }
The name of the JavaScript function that will handle the shapeCreated event. Fired when a shape is created, but is not rendered yet.
public string OnShapeCreated { get; set; }
The name of the JavaScript function that will handle the shapeFeatureCreated event. Fired when a GeoJSON Feature is created on a shape layer.
public string OnShapeFeatureCreated { get; set; }
The name of the JavaScript function that will handle the shapeMouseEnter event. Fired when the mouse enters a shape.
public string OnShapeMouseEnter { get; set; }
The name of the JavaScript function that will handle the shapeMouseLeave event. Fired when the mouse leaves a shape.
public string OnShapeMouseLeave { get; set; }
The name of the JavaScript function that will handle the zoomEnd event. Fired when the map zoom level has changed.
public string OnZoomEnd { get; set; }
The name of the JavaScript function that will handle the zoomStart event. Fired when the map zoom level is about to change. Cancelling the event will prevent the user action.
public string OnZoomStart { get; set; }
Specifies whether the map should wrap around the east-west edges.
public bool? Wraparound { get; set; }
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
public double? Zoom { get; set; }
Methods
Gets the initialization script.
protected override string GetInitializationScript()
The initialization script.
Overrides:
public override Task ProcessAsync(TagHelperContext context, TagHelperOutput output)
Overrides:
Serializes the defined settings.
public override IDictionary<string, object> Serialize()
Overrides:
SerializeEvents method.
protected override Dictionary<string, object> SerializeEvents()
Overrides:
SerializeSettings method.
protected override Dictionary<string, object> SerializeSettings()
Overrides:
Writes the HTML output.
protected override void WriteHtml(TagHelperOutput output)
The TagHelper output.
Overrides: