dymaptic.GeoBlazor.Core
dymaptic.GeoBlazor.Core.Components.Layers
GeoJSONLayer Class
The GeoJSONLayer class is used to create a layer based on GeoJSON. GeoJSON is a format for encoding a variety of
geographic data structures. The GeoJSON data must comply with the RFC 7946 specification which states that the
coordinates are in SpatialReference.WGS84.
ArcGIS
JS API
</a>
public class GeoJSONLayer : dymaptic.GeoBlazor.Core.Components.Layers.Layer
Inheritance System.Object 🡒 Microsoft.AspNetCore.Components.ComponentBase 🡒 MapComponent 🡒 Layer 🡒 GeoJSONLayer
Example
Constructors
GeoJSONLayer() Constructor
Parameterless constructor for using as a razor component
public GeoJSONLayer();
GeoJSONLayer(string, string, string, Nullable, Nullable, Nullable) Constructor
Constructs a new GeoJSONLayer in code with parameters
public GeoJSONLayer(string? url=null, string? copyright=null, string? title=null, System.Nullable<double> opacity=null, System.Nullable<bool> visible=null, System.Nullable<dymaptic.GeoBlazor.Core.Components.Layers.ListMode> listMode=null);
Parameters
url
System.String
The url for the GeoJSON source data.
copyright
System.String
A copyright string to identify ownership of the data.
title
System.String
The title of the layer used to identify it in places such as the Legend and LayerList widgets.
opacity
System.Nullable<System.Double>
The opacity of the layer.
visible
System.Nullable<System.Boolean>
Indicates if the layer is visible in the View. When false, the layer may still be added to a Map instance that is
referenced in a view, but its features will not be visible in the view.
listMode
System.Nullable<ListMode>
Indicates how the layer should display in the LayerList widget. The possible values are listed below.
Properties
GeoJSONLayer.Copyright Property
A copyright string to identify ownership of the data.
public string? Copyright { get; set; }
Property Value
GeoJSONLayer.LayerType Property
Used internally to identify the sub type of Layer
public override string LayerType { get; }
Property Value
GeoJSONLayer.Renderer Property
The Renderer that defines how the GeoJSON data will be displayed.
public dymaptic.GeoBlazor.Core.Components.Renderers.Renderer? Renderer { get; set; }
Property Value
GeoJSONLayer.SpatialReference Property
The SpatialReference to render the GeoJSON data.
public dymaptic.GeoBlazor.Core.Components.Geometries.SpatialReference? SpatialReference { get; set; }
Property Value
GeoJSONLayer.Url Property
The url for the GeoJSON source data.
public string? Url { get; set; }
Property Value
Methods
GeoJSONLayer.RegisterChildComponent(MapComponent) Method
Called from dymaptic.GeoBlazor.Core.Components.MapComponent.OnAfterRenderAsync(System.Boolean) 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
Exceptions
InvalidChildElementException
Throws if the current child is not a valid sub-component to the parent.
GeoJSONLayer.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