dymaptic.GeoBlazor.Core
dymaptic.GeoBlazor.Core.Components
LayerSearchSource Class
The following properties define a
Layer-based source whose
features may be searched by a Search widget instance.
ArcGIS Maps SDK for JavaScript
public class LayerSearchSource : dymaptic.GeoBlazor.Core.Components.SearchSource
Inheritance System.Object 🡒 Microsoft.AspNetCore.Components.ComponentBase 🡒 MapComponent 🡒 SearchSource 🡒 LayerSearchSource
Constructors
LayerSearchSource() Constructor
Parameterless constructor for use as a Razor Component.
public LayerSearchSource();
LayerSearchSource(Nullable, string, Nullable, SearchSourceFilter, GetResultsHandler, GetSuggestionsHandler, Layer, Nullable, Nullable, Nullable, string, IReadOnlyList, IReadOnlyList, string, Nullable, PopupTemplate, string, Nullable, Symbol, IReadOnlyList, string, string, Nullable, string, Nullable, Nullable) Constructor
Constructor for use in C# code. Use named parameters (e.g., item1: value1, item2: value2) to set properties in any order.
public LayerSearchSource(System.Nullable<bool> autoNavigate=null, string? displayField=null, System.Nullable<bool> exactMatch=null, dymaptic.GeoBlazor.Core.Model.SearchSourceFilter? filter=null, dymaptic.GeoBlazor.Core.Functions.GetResultsHandler? getResultsHandler=null, dymaptic.GeoBlazor.Core.Functions.GetSuggestionsHandler? getSuggestionsHandler=null, dymaptic.GeoBlazor.Core.Components.Layers.Layer? layer=null, System.Nullable<int> maxResults=null, System.Nullable<double> maxSuggestions=null, System.Nullable<int> minSuggestCharacters=null, string? name=null, System.Collections.Generic.IReadOnlyList<string>? orderByFields=null, System.Collections.Generic.IReadOnlyList<string>? outFields=null, string? placeholder=null, System.Nullable<bool> popupEnabled=null, dymaptic.GeoBlazor.Core.Components.Popups.PopupTemplate? popupTemplate=null, string? prefix=null, System.Nullable<bool> resultGraphicEnabled=null, dymaptic.GeoBlazor.Core.Components.Symbols.Symbol? resultSymbol=null, System.Collections.Generic.IReadOnlyList<string>? searchFields=null, string? searchTemplate=null, string? suffix=null, System.Nullable<bool> suggestionsEnabled=null, string? suggestionTemplate=null, System.Nullable<bool> withinViewEnabled=null, System.Nullable<double> zoomScale=null);
Parameters
autoNavigate
System.Nullable<System.Boolean>
Indicates whether to automatically navigate to the
selected result once selected.
default true
ArcGIS Maps SDK for JavaScript
displayField
System.String
The results are displayed using this field.
ArcGIS Maps SDK for JavaScript
exactMatch
System.Nullable<System.Boolean>
Indicates to only return results that match the
search value exactly.
default false
ArcGIS Maps SDK for JavaScript
filter
SearchSourceFilter
For filtering suggests or search results.
ArcGIS Maps SDK for JavaScript
getResultsHandler
GetResultsHandler(Nullable<bool>, Point, Nullable<int>, Nullable<int>, SpatialReference, SuggestResult, Nullable<Guid>)
Function used to get search results.
default null
ArcGIS Maps SDK for JavaScript
getSuggestionsHandler
GetSuggestionsHandler(Nullable<int>, Nullable<int>, SpatialReference, string, Nullable<Guid>)
Function used to get search suggestions.
default null
ArcGIS Maps SDK for JavaScript
layer
Layer
The layer queried in the search.
ArcGIS Maps SDK for JavaScript
maxResults
System.Nullable<System.Int32>
Indicates the maximum number of search results to return.
default 6
ArcGIS Maps SDK for JavaScript
maxSuggestions
System.Nullable<System.Double>
Indicates the maximum number of suggestions
to return for the widget’s input.
default 6
ArcGIS Maps SDK for JavaScript
minSuggestCharacters
System.Nullable<System.Int32>
Indicates the minimum number of characters
required before querying for a suggestion.
default 1
ArcGIS Maps SDK for JavaScript
name
System.String
The name of the source for display.
ArcGIS Maps SDK for JavaScript
orderByFields
System.Collections.Generic.IReadOnlyList<System.String>
One or more field names used to order the query results.
ArcGIS Maps SDK for JavaScript
outFields
System.Collections.Generic.IReadOnlyList<System.String>
Specifies the fields returned with the search results.
ArcGIS Maps SDK for JavaScript
placeholder
System.String
Used as a hint for the source input text.
ArcGIS Maps SDK for JavaScript
popupEnabled
System.Nullable<System.Boolean>
Indicates whether to display a
Popup when a selected result is clicked.
ArcGIS Maps SDK for JavaScript
popupTemplate
PopupTemplate
The popup template used to display search results.
ArcGIS Maps SDK for JavaScript
prefix
System.String
Specify this to prefix the user’s input of the search text.
ArcGIS Maps SDK for JavaScript
resultGraphicEnabled
System.Nullable<System.Boolean>
Indicates whether to show a graphic on the
map for the selected source using the resultSymbol.
ArcGIS Maps SDK for JavaScript
resultSymbol
Symbol
The symbol used to display the result.
ArcGIS Maps SDK for JavaScript
searchFields
System.Collections.Generic.IReadOnlyList<System.String>
An array of string values representing the
names of fields in the feature layer to search.
ArcGIS Maps SDK for JavaScript
searchTemplate
System.String
A template string used to display multiple
fields in a defined order when results are displayed.
ArcGIS Maps SDK for JavaScript
suffix
System.String
Specify this to add a suffix to the user’s input for the search value.
ArcGIS Maps SDK for JavaScript
suggestionsEnabled
System.Nullable<System.Boolean>
Indicates whether to display suggestions
as the user enters input text in the widget.
default true
ArcGIS Maps SDK for JavaScript
suggestionTemplate
System.String
A template string used to display multiple
fields in a defined order
when suggestions are displayed.
ArcGIS Maps SDK for JavaScript
withinViewEnabled
System.Nullable<System.Boolean>
Indicates whether to constrain the search
results to the view’s extent.
default false
ArcGIS Maps SDK for JavaScript
zoomScale
System.Nullable<System.Double>
The set zoom scale for the resulting search result.
default null
ArcGIS Maps SDK for JavaScript
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.Layer Property
The relevant Layer for the MapComponent. Not always applicable to every component type.
public override dymaptic.GeoBlazor.Core.Components.Layers.Layer? Layer { get; set; }
Implements Layer
Property Value
LayerSearchSource.Name Property
The name of the source for display.
ArcGIS Maps SDK for JavaScript
public string? Name { get; set; }
Property Value
LayerSearchSource.OrderByFields Property
One or more field names used to order the query results.
ArcGIS Maps SDK for JavaScript
public System.Collections.Generic.IReadOnlyList<string>? OrderByFields { get; set; }
Property Value
System.Collections.Generic.IReadOnlyList<System.String>
LayerSearchSource.SearchFields Property
An array of string values representing the
names of fields in the feature layer to search.
ArcGIS Maps SDK for JavaScript
public System.Collections.Generic.IReadOnlyList<string>? SearchFields { get; set; }
Property Value
System.Collections.Generic.IReadOnlyList<System.String>
LayerSearchSource.SearchTemplate Property
A template string used to display multiple
fields in a defined order when results are displayed.
ArcGIS Maps SDK for JavaScript
public string? SearchTemplate { get; set; }
Property Value
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 dymaptic.GeoBlazor.Core.Enums.SearchSourceType Type { get; }
Property Value
Methods
LayerSearchSource.AddToOrderByFields(string[]) Method
Asynchronously adds elements to the OrderByFields property.
public System.Threading.Tasks.Task AddToOrderByFields(params string[] values);
Parameters
values
System.String[]
The elements to add.
Returns
LayerSearchSource.AddToSearchFields(string[]) Method
Asynchronously adds elements to the SearchFields property.
public System.Threading.Tasks.Task AddToSearchFields(params string[] values);
Parameters
values
System.String[]
The elements to add.
Returns
LayerSearchSource.GetDisplayField() Method
Asynchronously retrieve the current value of the DisplayField property.
public System.Threading.Tasks.Task<string?> GetDisplayField();
Returns
System.Threading.Tasks.Task<System.String>
LayerSearchSource.GetExactMatch() Method
Asynchronously retrieve the current value of the ExactMatch property.
public System.Threading.Tasks.Task<System.Nullable<bool>> GetExactMatch();
Returns
System.Threading.Tasks.Task<System.Nullable<System.Boolean>>
LayerSearchSource.GetLayer() Method
Asynchronously retrieve the current value of the Layer property.
public System.Threading.Tasks.Task<dymaptic.GeoBlazor.Core.Components.Layers.Layer?> GetLayer();
Returns
System.Threading.Tasks.Task<Layer>
LayerSearchSource.GetName() Method
Asynchronously retrieve the current value of the Name property.
public System.Threading.Tasks.Task<string?> GetName();
Returns
System.Threading.Tasks.Task<System.String>
LayerSearchSource.GetOrderByFields() Method
Asynchronously retrieve the current value of the OrderByFields property.
public System.Threading.Tasks.Task<System.Collections.Generic.IReadOnlyList<string>?> GetOrderByFields();
Returns
System.Threading.Tasks.Task<System.Collections.Generic.IReadOnlyList<System.String>>
LayerSearchSource.GetSearchFields() Method
Asynchronously retrieve the current value of the SearchFields property.
public System.Threading.Tasks.Task<System.Collections.Generic.IReadOnlyList<string>?> GetSearchFields();
Returns
System.Threading.Tasks.Task<System.Collections.Generic.IReadOnlyList<System.String>>
LayerSearchSource.GetSearchTemplate() Method
Asynchronously retrieve the current value of the SearchTemplate property.
public System.Threading.Tasks.Task<string?> GetSearchTemplate();
Returns
System.Threading.Tasks.Task<System.String>
LayerSearchSource.GetSuggestionTemplate() Method
Asynchronously retrieve the current value of the SuggestionTemplate property.
public System.Threading.Tasks.Task<string?> GetSuggestionTemplate();
Returns
System.Threading.Tasks.Task<System.String>
LayerSearchSource.RegisterChildComponent(MapComponent) Method
Called from dymaptic.GeoBlazor.Core.Components.MapComponent.OnInitializedAsync to “Register” the current component with its 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.RemoveFromOrderByFields(string[]) Method
Asynchronously remove an element from the OrderByFields property.
public System.Threading.Tasks.Task RemoveFromOrderByFields(params string[] values);
Parameters
values
System.String[]
The elements to remove.
Returns
LayerSearchSource.RemoveFromSearchFields(string[]) Method
Asynchronously remove an element from the SearchFields property.
public System.Threading.Tasks.Task RemoveFromSearchFields(params string[] values);
Parameters
values
System.String[]
The elements to remove.
Returns
LayerSearchSource.SetDisplayField(string) Method
Asynchronously set the value of the DisplayField property after render.
public System.Threading.Tasks.Task SetDisplayField(string? value);
Parameters
value
System.String
The value to set.
Returns
LayerSearchSource.SetExactMatch(Nullable) Method
Asynchronously set the value of the ExactMatch property after render.
public System.Threading.Tasks.Task SetExactMatch(System.Nullable<bool> value);
Parameters
value
System.Nullable<System.Boolean>
The value to set.
Returns
LayerSearchSource.SetLayer(Layer) Method
Asynchronously set the value of the Layer property after render.
public System.Threading.Tasks.Task SetLayer(dymaptic.GeoBlazor.Core.Components.Layers.Layer? value);
Parameters
value
Layer
The value to set.
Returns
LayerSearchSource.SetName(string) Method
Asynchronously set the value of the Name property after render.
public System.Threading.Tasks.Task SetName(string? value);
Parameters
value
System.String
The value to set.
Returns
LayerSearchSource.SetOrderByFields(IReadOnlyList) Method
Asynchronously set the value of the OrderByFields property after render.
public System.Threading.Tasks.Task SetOrderByFields(System.Collections.Generic.IReadOnlyList<string>? value);
Parameters
value
System.Collections.Generic.IReadOnlyList<System.String>
The value to set.
Returns
LayerSearchSource.SetSearchFields(IReadOnlyList) Method
Asynchronously set the value of the SearchFields property after render.
public System.Threading.Tasks.Task SetSearchFields(System.Collections.Generic.IReadOnlyList<string>? value);
Parameters
value
System.Collections.Generic.IReadOnlyList<System.String>
The value to set.
Returns
LayerSearchSource.SetSearchTemplate(string) Method
Asynchronously set the value of the SearchTemplate property after render.
public System.Threading.Tasks.Task SetSearchTemplate(string? value);
Parameters
value
System.String
The value to set.
Returns
LayerSearchSource.SetSuggestionTemplate(string) Method
Asynchronously set the value of the SuggestionTemplate property after render.
public System.Threading.Tasks.Task SetSuggestionTemplate(string? value);
Parameters
value
System.String
The value to set.
Returns
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.
LayerSearchSource.ValidateRequiredChildren() Method
When a MapView is prepared to render, this will check to make sure that all properties with the RequiredPropertyAttribute are provided.
public override void ValidateRequiredChildren();
Implements ValidateRequiredChildren()
Exceptions
MissingRequiredChildElementException
The consumer needs to provide the missing child component
MissingRequiredOptionsChildElementException
The consumer needs to provide ONE of the options of child components
LayerSearchSource.ValidateRequiredGeneratedChildren() Method
Validates source-generated child components.
public override void ValidateRequiredGeneratedChildren();
Implements ValidateRequiredGeneratedChildren()