GeoBlazor Pro
dymaptic.GeoBlazor.Pro
dymaptic.GeoBlazor.Pro.Components
ElevationSampler Class
A cache of elevation values created from an elevation service or the GroundView
used for synchronously querying elevation information for geometries.
This class does not have a constructor. You can create an instance of this class by using
ElevationLayer.createElevationSampler()
or Ground.createElevationSampler() methods.
The elevation sampler created from the Ground will sample data from the first elevation layer that has data available.
To control the layer used for elevation sampling and the sampling resolution, use
ElevationLayer.createElevationSampler().
<pre>
map.ground.load() .then(function() { // create an elevation sampler from a given extentreturn view.map.ground.createElevationSampler(extent); }) .then(function(elevationSampler) { // use the elevation sampler to get z-values for a point, multipoint or polyline geometrylet zEnrichedGeometry = elevationSampler.queryElevation(geometry); });
</pre>
An instance of this class is also available in GroundView.elevationSampler.
This can be used when the elevation values need to reflect the elevation currently displayed in the view.
<pre>
let elevationSampler = view.groundView.elevationSampler; // listen for elevation changes in the view elevationSampler.on('changed', function() { // enrich geometry with z-values from the elevation displayed in the viewlet zEnrichedGeometry = elevationSampler.queryElevation(point); });
</pre>
public class ElevationSampler : dymaptic.GeoBlazor.Core.Components.MapComponent,
dymaptic.GeoBlazor.Core.Interfaces.IElevationSampler,
dymaptic.GeoBlazor.Core.Interfaces.IMapComponent,
dymaptic.GeoBlazor.Core.Interfaces.IMeshUtilsSource
Inheritance System.Object 🡒 Microsoft.AspNetCore.Components.ComponentBase 🡒 dymaptic.GeoBlazor.Core.Components.MapComponent 🡒 ElevationSampler
Implements dymaptic.GeoBlazor.Core.Interfaces.IElevationSampler, dymaptic.GeoBlazor.Core.Interfaces.IMapComponent, dymaptic.GeoBlazor.Core.Interfaces.IMeshUtilsSource
Constructors
ElevationSampler() Constructor
Parameterless constructor for use as a Razor Component.
public ElevationSampler();
Properties
ElevationSampler.DemResolution Property
The minimum and maximum resolution of the data in the sampler.
ArcGIS Maps SDK for JavaScript
public dymaptic.GeoBlazor.Pro.Components.ElevationSamplerDemResolution? DemResolution { get; set; }
Property Value
ElevationSampler.Extent Property
The extent within which the sampler can be queried.
ArcGIS Maps SDK for JavaScript
public dymaptic.GeoBlazor.Core.Components.Geometries.Extent? Extent { get; set; }
Property Value
dymaptic.GeoBlazor.Core.Components.Geometries.Extent
ElevationSampler.HasChangedListener Property
Used in JavaScript layer to determine if the event listener is registered.
public bool HasChangedListener { get; }
Property Value
ElevationSampler.NoDataValue Property
The value that is used to represent areas where there is no data available.
ArcGIS Maps SDK for JavaScript
public System.Nullable<double> NoDataValue { get; set; }
Property Value
System.Nullable<System.Double>
ElevationSampler.OnChanged Property
Fires when the data in the sampler has changed. This event is only relevant for dynamic elevation samplers
such as the elevation sampler on the GroundView.
public Microsoft.AspNetCore.Components.EventCallback<dymaptic.GeoBlazor.Pro.Events.ElevationSamplerChangedEvent> OnChanged { get; set; }
Property Value
Microsoft.AspNetCore.Components.EventCallback<ElevationSamplerChangedEvent>
ElevationSampler.SpatialReference Property
The spatial reference of the sampler.
ArcGIS Maps SDK for JavaScript
public dymaptic.GeoBlazor.Core.Components.SpatialReference? SpatialReference { get; set; }
Property Value
dymaptic.GeoBlazor.Core.Components.SpatialReference
Methods
ElevationSampler.ElevationAt(double, double) Method
Get elevation for a coordinate specified in the spatial reference of the sampler.
param y The y coordinate.
ArcGIS Maps SDK for JavaScript
public System.Threading.Tasks.Task<System.Nullable<double>> ElevationAt(double x, double y);
Parameters
The x coordinate.
The y coordinate.
Returns
System.Threading.Tasks.Task<System.Nullable<System.Double>>
ElevationSampler.GetDemResolution() Method
Asynchronously retrieve the current value of the DemResolution property.
public System.Threading.Tasks.Task<dymaptic.GeoBlazor.Pro.Components.ElevationSamplerDemResolution?> GetDemResolution();
Returns
System.Threading.Tasks.Task<ElevationSamplerDemResolution>
ElevationSampler.GetExtent() Method
Asynchronously retrieve the current value of the Extent property.
public System.Threading.Tasks.Task<dymaptic.GeoBlazor.Core.Components.Geometries.Extent?> GetExtent();
Returns
System.Threading.Tasks.Task<dymaptic.GeoBlazor.Core.Components.Geometries.Extent>
ElevationSampler.GetNoDataValue() Method
Asynchronously retrieve the current value of the NoDataValue property.
public System.Threading.Tasks.Task<System.Nullable<double>> GetNoDataValue();
Returns
System.Threading.Tasks.Task<System.Nullable<System.Double>>
ElevationSampler.GetSpatialReference() Method
Asynchronously retrieve the current value of the SpatialReference property.
public System.Threading.Tasks.Task<dymaptic.GeoBlazor.Core.Components.SpatialReference?> GetSpatialReference();
Returns
System.Threading.Tasks.Task<dymaptic.GeoBlazor.Core.Components.SpatialReference>
ElevationSampler.OnJsChanged(IJSStreamReference) Method
JavaScript-Invokable Method for internal use only.
public System.Threading.Tasks.Task OnJsChanged(Microsoft.JSInterop.IJSStreamReference jsStreamRef);
Parameters
jsStreamRef
Microsoft.JSInterop.IJSStreamReference
Returns
ElevationSampler.QueryElevation(Geometry) Method
Query elevation for a Point, Polyline or
Multipoint geometry.
ArcGIS Maps SDK for JavaScript
public System.Threading.Tasks.Task<dymaptic.GeoBlazor.Core.Components.Geometries.Geometry?> QueryElevation(dymaptic.GeoBlazor.Core.Components.Geometries.Geometry geometry);
Parameters
geometry
dymaptic.GeoBlazor.Core.Components.Geometries.Geometry
The geometry to use for sampling elevation data.
Returns
System.Threading.Tasks.Task<dymaptic.GeoBlazor.Core.Components.Geometries.Geometry>