layout: default title: FeatureLayerView parent: Core Classes —
dymaptic.GeoBlazor.Core
dymaptic.GeoBlazor.Core.Components.Layers
FeatureLayerView Class
The FeatureLayerView is responsible for rendering a FeatureLayer’s features as graphics in the View. The methods in
the FeatureLayerView provide developers with the ability to query and highlight graphics in the view. See the code
snippets in the methods below for examples of how to access client-side graphics from the view.
ArcGIS Maps SDK for JavaScript
public class FeatureLayerView : dymaptic.GeoBlazor.Core.Components.Layers.LayerView
Inheritance System.Object 🡒 LayerView 🡒 FeatureLayerView
Properties
FeatureLayerView.FeatureEffect Property
The featureEffect can be used to draw attention features of interest.
public dymaptic.GeoBlazor.Core.Components.Layers.FeatureEffect? FeatureEffect { get; set; }
Property Value
FeatureLayerView.Filter Property
The attribute, geometry, and time extent filter. Only the features that satisfy the filter are displayed on the
view.
public dymaptic.GeoBlazor.Core.Components.Layers.FeatureFilter? Filter { get; set; }
Property Value
Methods
FeatureLayerView.CreateQuery() Method
Creates query parameter object that can be used to fetch features as they are being displayed. It sets the query
parameter’s outFields property to [“*”] and returnGeometry to true. The output spatial reference
outSpatialReference is set to the spatial reference of the view. Parameters of the filter currently applied to the
layerview are also incorporated in the returned query object. The results will include geometries of features and
values for availableFields.
public System.Threading.Tasks.Task<dymaptic.GeoBlazor.Core.Objects.Query> CreateQuery();
Returns
System.Threading.Tasks.Task<Query>
FeatureLayerView.Highlight(Graphic) Method
Highlights the given feature(s).
public System.Threading.Tasks.Task<dymaptic.GeoBlazor.Core.Components.Layers.HighlightHandle> Highlight(dymaptic.GeoBlazor.Core.Components.Layers.Graphic graphic);
Parameters
graphic
Graphic
The Graphic to highlight.
Returns
System.Threading.Tasks.Task<HighlightHandle>
A handle that allows the highlight to be removed later.
FeatureLayerView.Highlight(int) Method
Highlights the given feature(s).
public System.Threading.Tasks.Task<dymaptic.GeoBlazor.Core.Components.Layers.HighlightHandle> Highlight(int objectId);
Parameters
objectId
System.Int32
The ObjectID of the graphic to highlight.
Returns
System.Threading.Tasks.Task<HighlightHandle>
A handle that allows the highlight to be removed later.
FeatureLayerView.Highlight(IEnumerable) Method
Highlights the given feature(s).
public System.Threading.Tasks.Task<dymaptic.GeoBlazor.Core.Components.Layers.HighlightHandle> Highlight(System.Collections.Generic.IEnumerable<dymaptic.GeoBlazor.Core.Components.Layers.Graphic> graphics);
Parameters
graphics
System.Collections.Generic.IEnumerable<Graphic>
The graphics to highlight.
Returns
System.Threading.Tasks.Task<HighlightHandle>
A handle that allows the highlight to be removed later.
FeatureLayerView.Highlight(IEnumerable) Method
Highlights the given feature(s).
public System.Threading.Tasks.Task<dymaptic.GeoBlazor.Core.Components.Layers.HighlightHandle> Highlight(System.Collections.Generic.IEnumerable<int> objectIds);
Parameters
objectIds
System.Collections.Generic.IEnumerable<System.Int32>
The ObjectIDs of the graphics to highlight.
Returns
System.Threading.Tasks.Task<HighlightHandle>
A handle that allows the highlight to be removed later.
FeatureLayerView.OnQueryFeaturesStreamCallback(IJSStreamReference, Guid) Method
Internal use callback from JavaScript
public System.Threading.Tasks.Task OnQueryFeaturesStreamCallback(Microsoft.JSInterop.IJSStreamReference streamReference, System.Guid queryId);
Parameters
streamReference
Microsoft.JSInterop.IJSStreamReference
queryId
System.Guid
Returns
FeatureLayerView.QueryExtent(Query, CancellationToken) Method
Executes a Query against features available for drawing in the layerView and returns the Extent of features that
satisfy the query. Valid only for hosted feature services on arcgis.com and for ArcGIS Server 10.3.1 and later. If
query parameters are not provided, the extent and count of all features available for drawing are returned.
To query for the extent of features directly from a Feature Service rather than those visible in the view, you must
use the QueryExtent(Query, CancellationToken) method.
public System.Threading.Tasks.Task<dymaptic.GeoBlazor.Core.Components.Layers.ExtentQueryResult> QueryExtent(dymaptic.GeoBlazor.Core.Objects.Query query, System.Threading.CancellationToken cancellationToken=default(System.Threading.CancellationToken));
Parameters
query
Query
Specifies the attributes and spatial filter of the query. When no parameters are passed to this method, all
features in the client are returned. To only return features visible in the view, set the geometry parameter in the
query object to the view’s extent.
cancellationToken
System.Threading.CancellationToken
A cancellation token that can be used to cancel the query operation.
Returns
System.Threading.Tasks.Task<ExtentQueryResult>
Remarks
Spatial queries are executed against quantized geometries in the layerView. The resolution of layerView geometries,
is only as precise as the scale resolution of the view. Therefore, the results of the same query could be different
when executed at different scales. This also means that geometries returned from any layerView query will likewise
be at the same scale resolution of the view.
Spatial queries have the same limitations as those listed in the projection engine documentation.
Spatial queries are not currently supported if the FeatureLayerView has any of the following SpatialReferences:
GDM 2000 (4742) – Malaysia,
Gusterberg (Ferro) (8042) – Austria/Czech Republic,
ISN2016 (8086) - Iceland,
SVY21 (4757) - Singapore
FeatureLayerView.QueryFeatureCount(Query, CancellationToken) Method
Executes a Query against features available for drawing in the layerView and returns the number of features that
satisfy the query. If query parameters are not provided, the count of all features available for drawing is
returned.
To query for the count of features directly from a Feature Service rather than those visible in the view, you must
use the QueryFeatureCount(Query, CancellationToken) method.
public System.Threading.Tasks.Task<int> QueryFeatureCount(dymaptic.GeoBlazor.Core.Objects.Query? query=null, System.Threading.CancellationToken cancellationToken=default(System.Threading.CancellationToken));
Parameters
query
Query
Specifies the attributes and spatial filter of the query. When no parameters are passed to this method, all
features in the client are returned. To only return features visible in the view, set the geometry parameter in the
query object to the view’s extent.
cancellationToken
System.Threading.CancellationToken
A cancellation token that can be used to cancel the query operation.
Returns
System.Threading.Tasks.Task<System.Int32>
Remarks
Spatial queries are executed against quantized geometries in the layerView. The resolution of layerView geometries,
is only as precise as the scale resolution of the view. Therefore, the results of the same query could be different
when executed at different scales. This also means that geometries returned from any layerView query will likewise
be at the same scale resolution of the view.
Spatial queries have the same limitations as those listed in the projection engine documentation.
Spatial queries are not currently supported if the FeatureLayerView has any of the following SpatialReferences:
GDM 2000 (4742) – Malaysia,
Gusterberg (Ferro) (8042) – Austria/Czech Republic,
ISN2016 (8086) - Iceland,
SVY21 (4757) - Singapore
FeatureLayerView.QueryFeatures(Query, CancellationToken) Method
Executes a Query against features available for drawing in the layerView and returns a FeatureSet. If query
parameters are not provided, all features available for drawing are returned along with their attributes that are
available on the client. For client-side attribute queries, relevant fields should exist in availableFields list
for the query to be successful.
To execute a query against all the features in a feature service rather than only those in the client, you must use
the QueryFeatures(Query, CancellationToken) method.
public System.Threading.Tasks.Task<dymaptic.GeoBlazor.Core.Components.Layers.FeatureSet?> QueryFeatures(dymaptic.GeoBlazor.Core.Objects.Query? query=null, System.Threading.CancellationToken cancellationToken=default(System.Threading.CancellationToken));
Parameters
query
Query
Specifies the attributes and spatial filter of the query. When this parameter is not passed to queryFeatures()
method, all features available for drawing are returned along with their attributes that are available on the
client. To only return features visible in the view, set the geometry parameter in the query object to the view’s
extent.
cancellationToken
System.Threading.CancellationToken
A cancellation token that can be used to cancel the query operation.
Returns
System.Threading.Tasks.Task<FeatureSet>
Remarks
Attribute values used in attribute queries executed against layerViews are case sensitive.
Spatial queries are executed against quantized geometries in the layerView. The resolution of layerView geometries,
is only as precise as the scale resolution of the view. Therefore, the results of the same query could be different
when executed at different scales. This also means that geometries returned from any layerView query will likewise
be at the same scale resolution of the view.
Spatial queries have the same limitations as those listed in the projection engine documentation.
Spatial queries are not currently supported if the FeatureLayerView has any of the following SpatialReferences:
GDM 2000 (4742) – Malaysia,
Gsterberg (Ferro) (8042) – Austria/Czech Republic,
ISN2016 (8086) - Iceland,
SVY21 (4757) - Singapore
FeatureLayerView.QueryObjectIds(Query, CancellationToken) Method
Executes a Query against features available for drawing in the layerView and returns array of the ObjectIDs of
features that satisfy the input query. If query parameters are not provided, the ObjectIDs of all features
available for drawing are returned.
To query for ObjectIDs of features directly from a Feature Service rather than those visible in the view, you must
use the QueryObjectIds(Query, CancellationToken) method.
public System.Threading.Tasks.Task<int[]> QueryObjectIds(dymaptic.GeoBlazor.Core.Objects.Query query, System.Threading.CancellationToken cancellationToken=default(System.Threading.CancellationToken));
Parameters
query
Query
Specifies the attributes and spatial filter of the query. When no parameters are passed to this method, all
features in the client are returned. To only return features visible in the view, set the geometry parameter in the
query object to the view’s extent.
cancellationToken
System.Threading.CancellationToken
A cancellation token that can be used to cancel the query operation.
Returns
System.Threading.Tasks.Task<System.Int32[]>
FeatureLayerView.SetFeatureEffect(FeatureEffect) Method
Sets the FeatureEffect for this view.
public System.Threading.Tasks.Task SetFeatureEffect(dymaptic.GeoBlazor.Core.Components.Layers.FeatureEffect? featureEffect);
Parameters
featureEffect
FeatureEffect
The new effect (or null to clear) to apply to this view.
Returns
FeatureLayerView.SetFilter(FeatureFilter) Method
Sets the FeatureFilter for this view.
public System.Threading.Tasks.Task SetFilter(dymaptic.GeoBlazor.Core.Components.Layers.FeatureFilter? filter);
Parameters
filter
FeatureFilter
The new filter (or null to clear) to apply to this view.