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

Kendo UI Map TagHelper MapTagHelper class.

Definition

Namespace:Kendo.Mvc.TagHelpers

Assembly:Kendo.Mvc.dll

Syntax:

C#
[HtmlTargetElement("kendo-map")]
[RestrictChildren("controls", new string[] { "layer-defaults", "layers", "marker-defaults", "markers", "messages" })]
public class MapTagHelper : TagHelperBase, ITagHelper, ITagHelperComponent

Inheritance: objectTagHelperTagHelperBaseMapTagHelper

Implements: ITagHelperITagHelperComponent

Inherited Members TagHelperBase.MinimumValidatorTagHelperBase.MaximumValidatorTagHelperBase.Init(TagHelperContext)TagHelperBase.Process(TagHelperContext, TagHelperOutput)TagHelperBase.GetInitializator()TagHelperBase.VerifySettings()TagHelperBase.SerializeTemplates()TagHelperBase.GenerateId(TagHelperOutput)TagHelperBase.CreateHandler(string)TagHelperBase.GetRangeValidationParameter<TValue>(ModelExplorer, string)TagHelperBase.ExtractEditFormat(string)TagHelperBase.ToDictionaryHandler(IDictionary<string, string>)TagHelperBase.AddSelfToTemplate(TagHelperContext)TagHelperBase.ViewContextTagHelperBase.GeneratorTagHelperBase.InitializerTagHelperBase.WriterTagHelperBase.ScriptAttributesTagHelperBase.NameTagHelperBase.IdTagHelperBase.SelectorTagHelperBase.IdPrefixTagHelperBase.IsInClientTemplateTagHelperBase.DeferredTagHelperBase.AsModuleTagHelper.Orderobject.GetType()object.MemberwiseClone()object.ToString()object.Equals(object)object.Equals(object, object)object.ReferenceEquals(object, object)object.GetHashCode()...

Example:

csharp
@addTagHelper *, Kendo.Mvc

<kendo-map name="map" center="@(new double[] { 37.7749, -122.4194 })">
</kendo-map>

Constructors

Initializes a new instance of the MapTagHelper class.

C#
public MapTagHelper(IKendoHtmlGenerator generator)
Parameters:generatorIKendoHtmlGenerator

Properties

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

C#
public double[] Center { get; set; }

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

C#
public double? MaxZoom { get; set; }

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

C#
public double? MinSize { get; set; }

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

C#
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.

C#
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.

C#
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.

C#
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.

C#
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.

C#
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.

C#
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.

C#
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.

C#
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.

C#
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.

C#
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.

C#
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.

C#
public string OnShapeFeatureCreated { get; set; }

The name of the JavaScript function that will handle the shapeMouseEnter event. Fired when the mouse enters a shape.

C#
public string OnShapeMouseEnter { get; set; }

The name of the JavaScript function that will handle the shapeMouseLeave event. Fired when the mouse leaves a shape.

C#
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.

C#
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.

C#
public string OnZoomStart { get; set; }

Controls whether the user can pan the map.

C#
public bool? Pannable { get; set; }

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

C#
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

C#
public double? Zoom { get; set; }

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

C#
public bool? Zoomable { get; set; }

Methods

Gets the initialization script.

C#
protected override string GetInitializationScript()
Returns:

string

The initialization script.

Overrides: TagHelperBase.GetInitializationScript()

C#
public override Task ProcessAsync(TagHelperContext context, TagHelperOutput output)
Parameters:contextTagHelperContextoutputTagHelperOutputReturns:

Task

Overrides: TagHelper.ProcessAsync(TagHelperContext, TagHelperOutput)

Serializes the defined settings.

C#
public override IDictionary<string, object> Serialize()
Returns:

IDictionary<string, object>

Overrides: TagHelperBase.Serialize()

SerializeEvents method.

C#
protected override Dictionary<string, object> SerializeEvents()
Returns:

Dictionary<string, object>

Overrides: TagHelperBase.SerializeEvents()

SerializeSettings method.

C#
protected override Dictionary<string, object> SerializeSettings()
Returns:

Dictionary<string, object>

Overrides: TagHelperBase.SerializeSettings()

Writes the HTML output.

C#
protected override void WriteHtml(TagHelperOutput output)
Parameters:outputTagHelperOutput

The TagHelper output.

Overrides: TagHelperBase.WriteHtml(TagHelperOutput)