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

Kendo UI MapLayer TagHelper MapLayerTagHelper class.

Definition

Namespace:Kendo.Mvc.TagHelpers

Assembly:Kendo.Mvc.dll

Syntax:

C#
[HtmlTargetElement("layer", ParentTag = "layers", TagStructure = TagStructure.NormalOrSelfClosing)]
[RestrictChildren("tooltip", new string[] { "map-style", "datasource", "url-template", "attribution" })]
[SuppressTagRendering]
public class MapLayerTagHelper : TagHelperCollectionItemBase, ITagHelper, ITagHelperComponent, IDataBoundWidget<DataSourceTagHelper>, IMapToolTipParent<MapTooltipTagHelper>, IMapStyleParent<MapStyleSettingsTagHelper>, ITemplateComponent

Inheritance: objectTagHelperTagHelperChildBaseTagHelperCollectionItemBaseMapLayerTagHelper

Implements: IDataBoundWidget<DataSourceTagHelper>IMapStyleParent<MapStyleSettingsTagHelper>IMapToolTipParent<MapTooltipTagHelper>ITagHelperITagHelperComponentITemplateComponent...

Inherited Members TagHelperChildBase.Init(TagHelperContext)TagHelperChildBase.AddSelfToContext(TagHelperContext)TagHelperChildBase.CreateHandler(string)TagHelperChildBase.IdPrefixTagHelper.Process(TagHelperContext, TagHelperOutput)TagHelper.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">
    <layers>
        <layer attribution="&copy; Example Attribution"></layer>
    </layers>
</kendo-map>

Constructors

Initializes a new instance of the MapLayerTagHelper class.

C#
public MapLayerTagHelper()

Properties

The attribution for the layer. String values are HTML-encoded by default. To render trusted HTML, pass an object with a text property and set encoded: false.

C#
[HtmlAttributeName("attribution")]
public string AttributionValue { get; set; }

If set to false the layer will not bind to the data source during initialization. In this case data binding will occur when the change event of the data source is fired. By default the widget will bind to the data source specified in the configuration.

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

The culture to be used for the bing map tiles.

C#
public string Culture { get; set; }

The id of the existing DataSource component that will be used as the data source for the layer.

C#
public string DatasourceId { get; set; }

Specifies the extent of the region covered by this layer. The layer will be hidden when the specified area is out of view.Accepts a four-element array that specifies the extent covered by this layer: North-West lat, longitude, South-East latitude, longitude.If not specified, the layer is always visible.

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

The bing map tile types. Possible options.

C#
public MapLayersImagerySet? ImagerySet { get; set; }

The API key for the layer. Currently supported only for Bing (tm) tile layers.

C#
public string Key { get; set; }

The data item field which contains the marker (symbol) location. The field should be an array with two numbers - latitude and longitude in decimal degrees.Requires the dataSource option to be set.Only applicable to "marker" and "bubble" layers.

C#
public string LocationField { get; set; }

The maximum symbol size for bubble layer symbols.

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

The maximum zoom level at which to show this layer.

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

The minimum symbol size for bubble layer symbols.

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

The minimum zoom level at which to show this layer.

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

The opacity for the layer.

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

The default marker shape for all marker layers. Marker shapes are implemented as CSS classes on the marker element (span.k-marker). For example "pinTarget" is rendered as "k-marker-pin-target.

C#
public MapMarkersShape? Shape { get; set; }

A list of subdomains to use for loading tiles. Alternating between different subdomains allows more requests to be executed in parallel.

C#
public string[] Subdomains { get; set; }

The default symbol for bubble layers

C#
public MapSymbol? Symbol { get; set; }

The default symbol for bubble layers

C#
public string SymbolHandler { get; set; }

Configures the templates for the component.

C#
[HtmlAttributeNotBound]
public IDictionary<string, string> Templates { get; }

Implements: ITemplateComponent.Templates

The size of the image tile in pixels.

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

The data item field which contains the marker title. Requires the dataSource option to be set.

C#
public string TitleField { get; set; }

The layer type. Supported types are "tile", "bing", "shape", "marker" and "bubble".

C#
public MapLayerType? Type { get; set; }

The URL template for tile layers. Template variables: x - X coordinate of the tile; y - Y coordinate of the tile; zoom - zoom level or subdomain - Subdomain for this tile. See subdomains.

C#
public string UrlTemplate { get; set; }

The URL template for tile layers. Template variables: x - X coordinate of the tile; y - Y coordinate of the tile; zoom - zoom level or subdomain - Subdomain for this tile. See subdomains. This option expects the name of a JavaScript function that will be called to return the template.

C#
public string UrlTemplateHandler { get; set; }

The URL template for tile layers. Template variables: x - X coordinate of the tile; y - Y coordinate of the tile; zoom - zoom level or subdomain - Subdomain for this tile. See subdomains. This option expects the ID of the script element that contains the template.

C#
public string UrlTemplateId { get; set; }

The URL template for tile layers. Template variables: x - X coordinate of the tile; y - Y coordinate of the tile; zoom - zoom level or subdomain - Subdomain for this tile. See subdomains. This option expects the IHtmlContent instance containing the created HTML.

C#
public IHtmlContent UrlTemplateView { get; set; }

The value field for bubble layer symbols. The data item field should be a number.

C#
public string ValueField { get; set; }

The zIndex for this layer.Layers are normally stacked in declaration order (last one is on top).

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

Methods

Adds the current TagHelper instance to its parent TagHelper.

C#
protected override void AddSelfToParent(TagHelperContext context)
Parameters:contextTagHelperContext

The TagHelper context.

Overrides: TagHelperChildBase.AddSelfToParent(TagHelperContext)

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

Task

Overrides: TagHelperChildBase.ProcessAsync(TagHelperContext, TagHelperOutput)

Serializes the defined settings.

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

Dictionary<string, object>