layout: default title: LayerSearchSource parent: Core Classes —
dymaptic.GeoBlazor.Core
dymaptic.GeoBlazor.Core.Objects
LayerSearchSource Class
The following properties define a Layer-based source whose features may be searched by a Search widget instance.
For string field searches, there is no leading wildcard. This effectively makes exactMatch true, which will remove unnecessary search results and suggestions.
ArcGIS Maps SDK for JavaScript
public class LayerSearchSource : dymaptic.GeoBlazor.Core.Objects.SearchSource
Inheritance System.Object 🡒 Microsoft.AspNetCore.Components.ComponentBase 🡒 MapComponent 🡒 SearchSource 🡒 LayerSearchSource
Remarks
Layers created from client-side graphics are not supported.
Properties
LayerSearchSource.DisplayField Property
The results are displayed using this field. Defaults to the layer’s displayField or the first string field.
public string? DisplayField { get; set; }
Property Value
LayerSearchSource.ExactMatch Property
Indicates to only return results that match the search value exactly. This property only applies to string field searches. exactMatch is always true when searching fields of type number. Default Value is false.
public System.Nullable<bool> ExactMatch { get; set; }
Property Value
System.Nullable<System.Boolean>
LayerSearchSource.Filter Property
For filtering suggests or search results. Setting a value here takes precedence over withinViewEnabled. Please see the object specification table below for details.
public dymaptic.GeoBlazor.Core.Objects.LayerSearchSourceFilter? Filter { get; set; }
Property Value
LayerSearchSource.Layer Property
The layer queried in the search. This is required. The layer can be a map/feature service feature layer(s), SceneLayers with an associated feature layer, BuildingComponentSublayer with an associated feature layer, GeoJSONLayer, CSVLayer or OGCFeatureLayer. See the SceneLayer Guide page on how to publish SceneLayers with associated feature layers.
public dymaptic.GeoBlazor.Core.Components.Layers.Layer? Layer { get; set; }
Property Value
Remarks
You may either specify a LayerId for an existing map layer, or nest a new FeatureLayer inside this Search Source.
Feature layers created from client-side graphics are not supported.
LayerSearchSource.LayerId Property
The Id for the layer queried in the search. This is required. The layer can be a map/feature service feature layer(s), SceneLayers with an associated feature layer, BuildingComponentSublayer with an associated feature layer, GeoJSONLayer, CSVLayer or OGCFeatureLayer. See the SceneLayer Guide page on how to publish SceneLayers with associated feature layers.
public System.Nullable<System.Guid> LayerId { get; set; }
Property Value
Remarks
You may either specify a LayerId for an existing map layer, or nest a new FeatureLayer inside this Search Source.
Feature layers created from client-side graphics are not supported.
LayerSearchSource.OrderByFields Property
One or more field names used to order the query results. Specfiy ASC (ascending) or DESC (descending) after the field name to control the order. The default order is ASC.
public System.Collections.Generic.IEnumerable<string>? OrderByFields { get; set; }
Property Value
System.Collections.Generic.IEnumerable<System.String>
LayerSearchSource.SearchFields Property
An array of string values representing the names of fields in the feature layer to search.
public System.Collections.Generic.IEnumerable<string>? SearchFields { get; set; }
Property Value
System.Collections.Generic.IEnumerable<System.String>
LayerSearchSource.SuggestionTemplate Property
A template string used to display multiple fields in a defined order when suggestions are displayed. This takes precedence over displayField. Field names in the template must have the following format: {FieldName}. An example suggestionTemplate could look something like: Name: {OWNER}, Parcel: {PARCEL_ID}.
public string? SuggestionTemplate { get; set; }
Property Value
LayerSearchSource.Type Property
The type of source.
public override string Type { get; }
Property Value
Methods
LayerSearchSource.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
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.
LayerSearchSource.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
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.