layout: default title: SearchSource parent: Core Classes —

dymaptic.GeoBlazor.Core

dymaptic.GeoBlazor.Core.Objects

SearchSource Class

The following properties define generic sources properties for use in the Search widget. Please see the subclasses that extend this class for more information about working with Search widget sources.
ArcGIS Maps SDK for JavaScript

public class SearchSource : dymaptic.GeoBlazor.Core.Components.MapComponent

Inheritance System.Object 🡒 Microsoft.AspNetCore.Components.ComponentBase 🡒 MapComponent 🡒 SearchSource

Derived
LayerSearchSource
LocatorSearchSource

Properties

SearchSource.AutoNavigate Property

Indicates whether to automatically navigate to the selected result once selected.

public System.Nullable<bool> AutoNavigate { get; set; }

Property Value

System.Nullable<System.Boolean>

SearchSource.GetResultsHandler Property

Function used to get search results. See GetResultsHandler for the function definition. When resolved, returns an object containing an array of search results.

public System.Func<dymaptic.GeoBlazor.Core.Objects.GetResultsParameters,System.Threading.Tasks.Task<System.Collections.Generic.IList<dymaptic.GeoBlazor.Core.Objects.SearchResult>>>? GetResultsHandler { get; set; }

Property Value

System.Func<GetResultsParameters,System.Threading.Tasks.Task<System.Collections.Generic.IList<SearchResult>>>

SearchSource.GetSuggestionsHandler Property

Function used to get search suggestions. See GetSuggestionsParameters for the function definition. When resolved, returns an object containing an array of suggest results.

public System.Func<dymaptic.GeoBlazor.Core.Objects.GetSuggestionsParameters,System.Threading.Tasks.Task<System.Collections.Generic.IList<dymaptic.GeoBlazor.Core.Objects.SuggestResult>>>? GetSuggestionsHandler { get; set; }

Property Value

System.Func<GetSuggestionsParameters,System.Threading.Tasks.Task<System.Collections.Generic.IList<SuggestResult>>>

SearchSource.HasGetResultsHandler Property

Indicates for the JavaScript engine whether to set up the GetResults handler

public bool HasGetResultsHandler { get; }

Property Value

System.Boolean

SearchSource.HasGetSuggestionsHandler Property

Indicates for the JavaScript engine whether to set up the GetSuggestions handler

public bool HasGetSuggestionsHandler { get; }

Property Value

System.Boolean

SearchSource.MaxResults Property

Indicates the maximum number of search results to return. Default value is 6.

public System.Nullable<int> MaxResults { get; set; }

Property Value

System.Nullable<System.Int32>

SearchSource.MinSuggestCharacters Property

Indicates the minimum number of characters required before querying for a suggestion. Default value is 1.

public System.Nullable<int> MinSuggestCharacters { get; set; }

Property Value

System.Nullable<System.Int32>

SearchSource.Name Property

The name of the source for display.

public string? Name { get; set; }

Property Value

System.String

SearchSource.OutFields Property

Specifies the fields returned with the search results.

public System.Collections.Generic.IEnumerable<string>? OutFields { get; set; }

Property Value

System.Collections.Generic.IEnumerable<System.String>

SearchSource.Placeholder Property

Used as a hint for the source input text.

public string? Placeholder { get; set; }

Property Value

System.String

SearchSource.PopupEnabled Property

Indicates whether to display a Popup when a selected result is clicked.

public System.Nullable<bool> PopupEnabled { get; set; }

Property Value

System.Nullable<System.Boolean>

SearchSource.PopupTemplate Property

The popup template used to display search results. If no popup is needed, set the source’s popupTemplate to null.

public dymaptic.GeoBlazor.Core.Components.Popups.PopupTemplate? PopupTemplate { get; set; }

Property Value

PopupTemplate

Remarks

This property should be set in instances where there is no existing PopupTemplate configured. For example, feature sources will default to any existing popupTemplate configured on the layer.

SearchSource.Prefix Property

Specify this to prefix the user’s input of the search text.

public string? Prefix { get; set; }

Property Value

System.String

SearchSource.ResultGraphicEnabled Property

Indicates whether to show a graphic on the map for the selected source using the resultSymbol.

public System.Nullable<bool> ResultGraphicEnabled { get; set; }

Property Value

System.Nullable<System.Boolean>

SearchSource.ResultSymbol Property

The symbol used to display the result.

public dymaptic.GeoBlazor.Core.Components.Symbols.Symbol? ResultSymbol { get; set; }

Property Value

Symbol

Remarks

This property only applies when the layer/locator/source is not part of the map.

SearchSource.SearchSourceObjectReference Property

The .NET object reference to this class for calling from JavaScript.

public Microsoft.JSInterop.DotNetObjectReference<dymaptic.GeoBlazor.Core.Objects.SearchSource> SearchSourceObjectReference { get; }

Property Value

Microsoft.JSInterop.DotNetObjectReference<SearchSource>

SearchSource.SearchTemplate Property

A template string used to display multiple fields in a defined order when results are displayed.

public string? SearchTemplate { get; set; }

Property Value

System.String

Remarks

Example: “{County}, {State}”

SearchSource.Suffix Property

Specify this to add a suffix to the user’s input for the search value.

public string? Suffix { get; set; }

Property Value

System.String

SearchSource.SuggestionsEnabled Property

Indicates whether to display suggestions as the user enters input text in the widget. Default value is true.

public System.Nullable<bool> SuggestionsEnabled { get; set; }

Property Value

System.Nullable<System.Boolean>

SearchSource.Type Property

The type of source.

public virtual string Type { get; }

Property Value

System.String

SearchSource.WithinViewEnabled Property

Indicates whether to constrain the search results to the view’s extent. Default value is false.

public System.Nullable<bool> WithinViewEnabled { get; set; }

Property Value

System.Nullable<System.Boolean>

SearchSource.ZoomScale Property

The set zoom scale for the resulting search result. This scale is automatically honored. Default value is null.

public System.Nullable<double> ZoomScale { get; set; }

Property Value

System.Nullable<System.Double>

Methods

SearchSource.OnJavaScriptGetResults(GetResultsParameters) Method

JavaScript-invokable method for internal use.

public System.Threading.Tasks.Task<System.Collections.Generic.IList<dymaptic.GeoBlazor.Core.Objects.SearchResult>> OnJavaScriptGetResults(dymaptic.GeoBlazor.Core.Objects.GetResultsParameters resultsParams);

Parameters

resultsParams GetResultsParameters

Returns

System.Threading.Tasks.Task<System.Collections.Generic.IList<SearchResult>>

SearchSource.OnJavaScriptGetSuggestions(GetSuggestionsParameters) Method

JavaScript-invokable method for internal use.

public System.Threading.Tasks.Task<System.Collections.Generic.IList<dymaptic.GeoBlazor.Core.Objects.SuggestResult>> OnJavaScriptGetSuggestions(dymaptic.GeoBlazor.Core.Objects.GetSuggestionsParameters suggestionsParams);

Parameters

suggestionsParams GetSuggestionsParameters

Returns

System.Threading.Tasks.Task<System.Collections.Generic.IList<SuggestResult>>

SearchSource.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

System.Threading.Tasks.Task

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.

SearchSource.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

System.Threading.Tasks.Task

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.