GeoBlazor Pro
dymaptic.GeoBlazor.Pro
dymaptic.GeoBlazor.Pro.Components.Layers
ProGeoJSONLayer Class
Advanced GeoBlazor Parser for GeoJSON Layers that supports additional properties like in the OpenStreetMap GeoJSON CSS spec and the Mapbox SimpleStyle spec.
public class ProGeoJSONLayer : dymaptic.GeoBlazor.Core.Components.Layers.GeoJSONLayer
Inheritance System.Object 🡒 Microsoft.AspNetCore.Components.ComponentBase 🡒 MapComponent 🡒 Layer 🡒 GeoJSONLayer 🡒 ProGeoJSONLayer
Constructors
ProGeoJSONLayer() Constructor
Parameterless constructor for use as a Razor Component.
public ProGeoJSONLayer();
ProGeoJSONLayer(string, string, string, string, Nullable, Nullable, Nullable, string, IAttributeTableTemplate, Nullable, Dictionary<string,object>, string, string, Nullable, DisplayFilterInfo, Nullable, Effect, GeoJSONLayerElevationInfo, FeatureEffect, IFeatureReduction, IReadOnlyList, Extent, Nullable, Nullable, IReadOnlyList
Constructor for use in C# code. Use named parameters (e.g., item1: value1, item2: value2) to set properties in any order.
public ProGeoJSONLayer(string url, string sourceJSON="", string? copyright=null, string? title=null, System.Nullable<double> opacity=null, System.Nullable<bool> visible=null, System.Nullable<dymaptic.GeoBlazor.Core.Enums.ListMode> listMode=null, string? arcGISLayerId=null, dymaptic.GeoBlazor.Core.Interfaces.IAttributeTableTemplate? attributeTableTemplate=null, System.Nullable<dymaptic.GeoBlazor.Core.Enums.BlendMode> blendMode=null, System.Collections.Generic.Dictionary<string,object>? customParameters=null, string? definitionExpression=null, string? displayField=null, System.Nullable<bool> displayFilterEnabled=null, dymaptic.GeoBlazor.Core.Components.DisplayFilterInfo? displayFilterInfo=null, System.Nullable<bool> editingEnabled=null, dymaptic.GeoBlazor.Core.Model.Effect? effect=null, dymaptic.GeoBlazor.Core.Components.GeoJSONLayerElevationInfo? elevationInfo=null, dymaptic.GeoBlazor.Core.Components.FeatureEffect? featureEffect=null, dymaptic.GeoBlazor.Core.Interfaces.IFeatureReduction? featureReduction=null, System.Collections.Generic.IReadOnlyList<dymaptic.GeoBlazor.Core.Components.Field>? fields=null, dymaptic.GeoBlazor.Core.Components.Geometries.Extent? fullExtent=null, System.Nullable<dymaptic.GeoBlazor.Core.Enums.SimpleGeometryType> geometryType=null, System.Nullable<bool> isBasemapReferenceLayer=null, System.Collections.Generic.IReadOnlyList<dymaptic.GeoBlazor.Core.Components.Label>? labelingInfo=null, System.Nullable<bool> labelsVisible=null, System.Nullable<bool> legendEnabled=null, System.Nullable<double> maxScale=null, System.Nullable<double> minScale=null, string? objectIdField=null, System.Collections.Generic.IReadOnlyList<dymaptic.GeoBlazor.Core.Components.OrderByInfo>? orderBy=null, System.Collections.Generic.IReadOnlyList<string>? outFields=null, System.Nullable<bool> persistenceEnabled=null, System.Nullable<bool> popupEnabled=null, dymaptic.GeoBlazor.Core.Components.Popups.PopupTemplate? popupTemplate=null, dymaptic.GeoBlazor.Core.Components.PortalItem? portalItem=null, System.Nullable<double> refreshInterval=null, dymaptic.GeoBlazor.Core.Components.Renderers.Renderer? renderer=null, System.Nullable<bool> screenSizePerspectiveEnabled=null, dymaptic.GeoBlazor.Core.Components.SpatialReference? spatialReference=null, System.Collections.Generic.IReadOnlyList<dymaptic.GeoBlazor.Core.Interfaces.IFeatureTemplate>? templates=null, dymaptic.GeoBlazor.Core.Components.TimeExtent? timeExtent=null, dymaptic.GeoBlazor.Core.Components.TimeInfo? timeInfo=null, dymaptic.GeoBlazor.Core.Components.TimeInterval? timeOffset=null, dymaptic.GeoBlazor.Core.Components.TrackInfo? trackInfo=null, System.Nullable<bool> useViewTime=null, dymaptic.GeoBlazor.Core.Components.TimeExtent? visibilityTimeExtent=null, System.Nullable<bool> applyStyles=null);
Parameters
url
System.String
The URL of the GeoJSON file. ArcGIS Maps SDK for JavaScript
sourceJSON
System.String
The GeoJSON content as a string. Can be set directly or fetched from the Url property.
copyright
System.String
Copyright information for the layer. ArcGIS Maps SDK for JavaScript
title
System.String
The title of the layer used to identify it in places such as the LayerList widget. ArcGIS Maps SDK for JavaScript
opacity
System.Nullable<System.Double>
The opacity of the layer. default 1 ArcGIS Maps SDK for JavaScript
visible
System.Nullable<System.Boolean>
Indicates if the layer is visible in the View. default true ArcGIS Maps SDK for JavaScript
listMode
System.Nullable<ListMode>
Indicates how the layer should display in the LayerList widget. default “show” ArcGIS Maps SDK for JavaScript
arcGISLayerId
System.String
The unique ID assigned to the layer. ArcGIS Maps SDK for JavaScript
attributeTableTemplate
IAttributeTableTemplate
This property is used to configure the associated layer’s FeatureTable. ArcGIS Maps SDK for JavaScript
blendMode
System.Nullable<BlendMode>
Blend modes are used to blend layers together to create an interesting effect in a layer, or even to produce what seems like a new layer. default normal ArcGIS Maps SDK for JavaScript
customParameters
System.Collections.Generic.Dictionary<System.String,System.Object>
A list of custom parameters appended to the URL of all resources fetched by the layer. ArcGIS Maps SDK for JavaScript
definitionExpression
System.String
The SQL where clause used to filter features on the client. ArcGIS Maps SDK for JavaScript
displayField
System.String
The name of the layer’s primary display field. ArcGIS Maps SDK for JavaScript
displayFilterEnabled
System.Nullable<System.Boolean>
displayFilterInfo
DisplayFilterInfo
editingEnabled
System.Nullable<System.Boolean>
Indicates if the layer is editable. default false ArcGIS Maps SDK for JavaScript
effect
Effect
Effect provides various filter functions that can be performed on the layer to achieve different visual effects similar to how image filters work. default null ArcGIS Maps SDK for JavaScript
elevationInfo
GeoJSONLayerElevationInfo
Specifies how features are placed on the vertical axis (z). ArcGIS Maps SDK for JavaScript
featureEffect
FeatureEffect
The featureEffect can be used to draw attention features of interest. ArcGIS Maps SDK for JavaScript
featureReduction
IFeatureReduction
Configures the method for reducing the number of features in the view. ArcGIS Maps SDK for JavaScript
fields
System.Collections.Generic.IReadOnlyList<Field>
An array of fields in the layer. ArcGIS Maps SDK for JavaScript
fullExtent
Extent
The full extent of the layer. ArcGIS Maps SDK for JavaScript
geometryType
System.Nullable<SimpleGeometryType>
The geometry type of features in the layer. ArcGIS Maps SDK for JavaScript
isBasemapReferenceLayer
System.Nullable<System.Boolean>
Indicates whether the layer is a basemap reference layer. Default value: false.
labelingInfo
System.Collections.Generic.IReadOnlyList<Label>
The label definition for this layer, specified as an array of LabelClass. ArcGIS Maps SDK for JavaScript
labelsVisible
System.Nullable<System.Boolean>
Indicates whether to display labels for this layer. default true ArcGIS Maps SDK for JavaScript
legendEnabled
System.Nullable<System.Boolean>
Indicates whether the layer will be included in the legend. default true ArcGIS Maps SDK for JavaScript
maxScale
System.Nullable<System.Double>
The maximum scale (most zoomed in) at which the layer is visible in the view. default 0 ArcGIS Maps SDK for JavaScript
minScale
System.Nullable<System.Double>
The minimum scale (most zoomed out) at which the layer is visible in the view. default 0 ArcGIS Maps SDK for JavaScript
objectIdField
System.String
The name of a field containing a unique value or identifier for each feature in the layer. ArcGIS Maps SDK for JavaScript
orderBy
System.Collections.Generic.IReadOnlyList<OrderByInfo>
Determines the order in which features are drawn in the view. default null ArcGIS Maps SDK for JavaScript
outFields
System.Collections.Generic.IReadOnlyList<System.String>
An array of field names from the geoJSON file to include with each feature. default null ArcGIS Maps SDK for JavaScript
persistenceEnabled
System.Nullable<System.Boolean>
Enable persistence of the layer in a WebMap or WebScene. default true ArcGIS Maps SDK for JavaScript
popupEnabled
System.Nullable<System.Boolean>
Indicates whether to display popups when features in the layer are clicked. default true ArcGIS Maps SDK for JavaScript
popupTemplate
PopupTemplate
The popup template for the layer. ArcGIS Maps SDK for JavaScript
portalItem
PortalItem
The portal item referencing the geojson file from which the GeoJSONLayer is loaded. ArcGIS Maps SDK for JavaScript
refreshInterval
System.Nullable<System.Double>
Refresh interval of the layer in minutes. default 0 ArcGIS Maps SDK for JavaScript
renderer
Renderer
The renderer assigned to the layer. ArcGIS Maps SDK for JavaScript
screenSizePerspectiveEnabled
System.Nullable<System.Boolean>
Apply perspective scaling to screen-size point symbols in a SceneView. default true ArcGIS Maps SDK for JavaScript
spatialReference
SpatialReference
The spatial reference of the layer. default SpatialReference.WGS84 ArcGIS Maps SDK for JavaScript
templates
System.Collections.Generic.IReadOnlyList<IFeatureTemplate>
An array of feature templates defined in the layer. ArcGIS Maps SDK for JavaScript
timeExtent
TimeExtent
The layer’s time extent. ArcGIS Maps SDK for JavaScript
timeInfo
TimeInfo
TimeInfo provides information such as date fields that store start and end time for each feature and the fullTimeExtent for the layer. default null ArcGIS Maps SDK for JavaScript
timeOffset
TimeInterval
A temporary offset of the time data based on a certain TimeInterval. default null ArcGIS Maps SDK for JavaScript
trackInfo
TrackInfo
Allows you to render track data for a layer, including a track line, previous observations, and latest observations. ArcGIS Maps SDK for JavaScript
useViewTime
System.Nullable<System.Boolean>
Determines if the layer will update its temporal data based on the view’s timeExtent. default true ArcGIS Maps SDK for JavaScript
visibilityTimeExtent
TimeExtent
Specifies a fixed time extent during which a layer should be visible. default null ArcGIS Maps SDK for JavaScript
applyStyles
System.Nullable<System.Boolean>
If the GeoJSON source contains style information such as in the OpenStreetMap GeoJSON CSS spec or the Mapbox SimpleStyle spec, this property must be set to determine whether to apply those styles to the features.
Properties
ProGeoJSONLayer.ApplyStyles Property
If the GeoJSON source contains style information such as in the OpenStreetMap GeoJSON CSS spec or the Mapbox SimpleStyle spec, this property must be set to determine whether to apply those styles to the features.
public System.Nullable<bool> ApplyStyles { get; set; }
Property Value
System.Nullable<System.Boolean>
ProGeoJSONLayer.Features Property
The deserialized collection of Graphic features parsed from the GeoJSON content.
public System.Collections.Generic.IReadOnlyList<dymaptic.GeoBlazor.Core.Components.Graphic> Features { get; }
Property Value
System.Collections.Generic.IReadOnlyList<Graphic>
ProGeoJSONLayer.HttpClient Property
HttpClient for fetching GeoJSON content from a URL.
public System.Net.Http.HttpClient HttpClient { get; set; }
Property Value
ProGeoJSONLayer.SourceJSON Property
The GeoJSON content as a string. Can be set directly or fetched from the Url property.
public string? SourceJSON { get; set; }
Property Value
ProGeoJSONLayer.Type Property
Used internally to identify the sub type of Layer
public override dymaptic.GeoBlazor.Core.Enums.LayerType Type { get; }
Property Value
ProGeoJSONLayer.Url Property
The URL of the GeoJSON file. ArcGIS Maps SDK for JavaScript
public override string Url { get; set; }
Property Value
Methods
ProGeoJSONLayer.Load() Method
Loads the resources referenced by this class. This method automatically executes for a View and all of the resources it references in Map if the view is constructed with a map instance. This method must be called by the developer when accessing a resource that will not be loaded in a View. The load() method only triggers the loading of the resource the first time it is called. The subsequent calls return the same promise.
public override System.Threading.Tasks.Task Load();
Returns
ProGeoJSONLayer.Load(IJSRuntime, JsModuleManager, CancellationToken) Method
Loads the resources referenced by this class. This method automatically executes for a View and all of the resources it references in Map if the view is constructed with a map instance. This method must be called by the developer when accessing a resource that will not be loaded in a View. The load() method only triggers the loading of the resource the first time it is called. The subsequent calls return the same promise.
public override System.Threading.Tasks.Task Load(Microsoft.JSInterop.IJSRuntime jsRuntime, dymaptic.GeoBlazor.Core.JsModuleManager jsModuleManager, System.Threading.CancellationToken cancellationToken);
Parameters
jsRuntime
Microsoft.JSInterop.IJSRuntime
The dependency-injected Blazor IJSRuntime instance to connect to JavaScript.
jsModuleManager
JsModuleManager
The dependency-injected GeoBlazor JsModuleManager instance to load JavaScript modules.
cancellationToken
System.Threading.CancellationToken
A cancellation token to cancel the operation.
Returns
ProGeoJSONLayer.Load(CancellationToken) Method
Loads the resources referenced by this class. This method automatically executes for a View and all of the resources it references in Map if the view is constructed with a map instance. This method must be called by the developer when accessing a resource that will not be loaded in a View. The load() method only triggers the loading of the resource the first time it is called. The subsequent calls return the same promise.
public override System.Threading.Tasks.Task Load(System.Threading.CancellationToken cancellationToken);
Parameters
cancellationToken
System.Threading.CancellationToken
Returns
Remarks
It’s possible to provide a signal to stop being interested into a Loadable instance load status. When the signal is aborted, the instance does not stop its loading process, only cancelLoad can abort it.
ProGeoJSONLayer.ParseJSON() Method
Method for pre-parsing the GeoJSON content from the Url or SourceJSON properties before sending to ArcGIS. This is called automatically when the ProGeoJSONLayer is added in markup or when layer.Load() is called. If the layer is added to the map in code, this method or load should be called first.
public System.Threading.Tasks.Task ParseJSON();