layout: default title: KMLLayer parent: Core Classes —

dymaptic.GeoBlazor.Core

dymaptic.GeoBlazor.Core.Components.Layers

KMLLayer Class

The KMLLayer class is used to create a layer based on a KML file (.kml, .kmz). KML is an XML-based file format used
to represent geographic features.
ArcGIS Maps SDK for JavaScript

public class KMLLayer : dymaptic.GeoBlazor.Core.Components.Layers.Layer

Inheritance System.Object 🡒 Microsoft.AspNetCore.Components.ComponentBase 🡒 MapComponent 🡒 Layer 🡒 KMLLayer

Constructors

KMLLayer() Constructor

Parameterless constructor for use as a razor component

public KMLLayer();

KMLLayer(string, PortalItem) Constructor

Constructor for use in code

public KMLLayer(string? url=null, dymaptic.GeoBlazor.Core.Components.PortalItem? portalItem=null);

Parameters

url System.String

The url for the KML Layer source data.

portalItem PortalItem

The portal item for the KML Layer source data.

Properties

KMLLayer.LayerType Property

Used internally to identify the sub type of Layer

public override string LayerType { get; }

Property Value

System.String

KMLLayer.PortalItem Property

The portal item for the KML Layer source data.

public dymaptic.GeoBlazor.Core.Components.PortalItem? PortalItem { get; set; }

Property Value

PortalItem

KMLLayer.Url Property

The url for the KML Layer source data.

public string? Url { get; set; }

Property Value

System.String

Methods

KMLLayer.RegisterChildComponent(MapComponent) Method

Called from dymaptic.GeoBlazor.Core.Components.MapComponent.OnInitializedAsync to “Register” the current component with it’s parent.

public override System.Threading.Tasks.Task RegisterChildComponent(dymaptic.GeoBlazor.Core.Components.MapComponent child);

Parameters

child MapComponent

The calling, child component to register

Returns

System.Threading.Tasks.Task

Exceptions

InvalidChildElementException
Throws if the current child is not a valid sub-component to the parent.

Remarks

This method is an implementation detail and should not be called directly by consumers. In future versions, this may be changed to an internal method. If you see no other way to register a child component, please open an issue on GitHub.

KMLLayer.UnregisterChildComponent(MapComponent) Method

Undoes the “Registration” of a child with its parent.

public override System.Threading.Tasks.Task UnregisterChildComponent(dymaptic.GeoBlazor.Core.Components.MapComponent child);

Parameters

child MapComponent

The child to unregister

Returns

System.Threading.Tasks.Task

Remarks

This method is an implementation detail and should not be called directly by consumers. In future versions, this may be changed to an internal method.