Show / Hide Table of Contents

Class LocatorSearchSource

Basic search source implementation for generic locators.

Inheritance
Object
LocatorSearchSource
Implements
ISearchSource
Namespace: Esri.ArcGISRuntime.Toolkit.Maui
Assembly: Esri.ArcGISRuntime.Toolkit.Maui.dll
Syntax
public class LocatorSearchSource : ISearchSource

Constructors

| Improve this Doc View Source

LocatorSearchSource(LocatorTask)

Initializes a new instance of the LocatorSearchSource class. CreateDefaultSourceAsync(CancellationToken) to create a source configured for use with the Esri World Geocoder.

Declaration
public LocatorSearchSource(LocatorTask locator)
Parameters
Type Name Description
LocatorTask locator

Locator to be used.

Properties

| Improve this Doc View Source

DefaultCalloutDefinition

Gets or sets the default callout definition to use with results.

Declaration
public CalloutDefinition? DefaultCalloutDefinition { get; set; }
Property Value
Type Description
Nullable<CalloutDefinition>
| Improve this Doc View Source

DefaultSymbol

Gets or sets the default symbol to use when displaying results.

Declaration
public Symbology.Symbol? DefaultSymbol { get; set; }
Property Value
Type Description
Nullable<Symbology.Symbol>
| Improve this Doc View Source

DefaultZoomScale

Gets or sets the default zoom scale to be used for results from this source.

Declaration
public double DefaultZoomScale { get; set; }
Property Value
Type Description
Double
Remarks

This value should be ignored when the underlying provider (e.g. LocatorTask) provides a viewpoint. Otherwise this zoom scale should be used to create the viewpoint for point results.

| Improve this Doc View Source

DisplayName

Gets or sets the name of the locator. Defaults to the locator's name, or "locator" if not set.

Declaration
public string DisplayName { get; set; }
Property Value
Type Description
String
| Improve this Doc View Source

GeocodeParameters

Gets the geocode parameters, which can be used to configure search behavior.

Declaration
public GeocodeParameters GeocodeParameters { get; }
Property Value
Type Description
GeocodeParameters
Remarks

, , and are set by LocatorSearchSource automatically on search. is set to "*" when the Locator is loaded for the first time.

| Improve this Doc View Source

LoadTask

Gets the task used to perform initial locator setup.

Declaration
protected Task LoadTask { get; }
Property Value
Type Description
Task
| Improve this Doc View Source

Locator

Gets the underlying locator.

Declaration
public LocatorTask Locator { get; }
Property Value
Type Description
LocatorTask
| Improve this Doc View Source

MaximumResults

Gets or sets the maximum number of results to return for a search. Default is 6.

Declaration
public int MaximumResults { get; set; }
Property Value
Type Description
Int32
| Improve this Doc View Source

MaximumSuggestions

Gets or sets the maximum number of suggestions to return. Default is 6.

Declaration
public int MaximumSuggestions { get; set; }
Property Value
Type Description
Int32
| Improve this Doc View Source

Placeholder

Gets or sets the placeholder to show when this search source is selected for use.

Declaration
public string Placeholder { get; set; }
Property Value
Type Description
String
| Improve this Doc View Source

PreferredSearchLocation

Declaration
public MapPoint? PreferredSearchLocation { get; set; }
Property Value
Type Description
Nullable<MapPoint>
| Improve this Doc View Source

SearchArea

Gets or sets the area to be used as a constraint for searches and suggestions.

Declaration
public Geometry.Geometry? SearchArea { get; set; }
Property Value
Type Description
Nullable<Geometry.Geometry>
| Improve this Doc View Source

SubtitleAttributeKey

Gets or sets the attribute key to use as the subtitle when returning results. Key must be included in .

Declaration
public string SubtitleAttributeKey { get; set; }
Property Value
Type Description
String
| Improve this Doc View Source

SuggestParameters

Gets the suggestion parameters, which can be used to configure suggestion behavior.

Declaration
public SuggestParameters SuggestParameters { get; }
Property Value
Type Description
SuggestParameters
Remarks

and are set automatically on search.

Methods

| Improve this Doc View Source

CreateDefaultSourceAsync(CancellationToken)

Creates a LocatorSearchSource configured for use with the Esri World Geocoder service.

Declaration
public static async Task<LocatorSearchSource> CreateDefaultSourceAsync(CancellationToken cancellationToken = default(CancellationToken))
Parameters
Type Name Description
CancellationToken cancellationToken

Token used for cancellation.

Returns
Type Description
Task<LocatorSearchSource>
Remarks

This method will re-use a static LocatorTask instance to improve performance.

| Improve this Doc View Source

NotifyDeselected(SearchResult)

This search source does not track selection state.

Declaration
public virtual void NotifyDeselected(SearchResult result)
Parameters
Type Name Description
SearchResult result
| Improve this Doc View Source

NotifySelected(SearchResult)

This search source does not track selection state.

Declaration
public virtual void NotifySelected(SearchResult result)
Parameters
Type Name Description
SearchResult result
| Improve this Doc View Source

RepeatSearchAsync(String, Envelope, CancellationToken)

Repeats the last search, with results restricted to the current visible area.

Declaration
public virtual async Task<IList<SearchResult>> RepeatSearchAsync(string queryString, Envelope queryExtent, CancellationToken cancellationToken = default(CancellationToken))
Parameters
Type Name Description
String queryString

Text to be used for the query.

Envelope queryExtent

Extent used to limit the results.

CancellationToken cancellationToken

Token used to cancel search.

Returns
Type Description
Task<IList<SearchResult>>

Task returning a list of results.

| Improve this Doc View Source

SearchAsync(SearchSuggestion, CancellationToken)

Gets a list of search results for the given suggestions.

Declaration
public virtual async Task<IList<SearchResult>> SearchAsync(SearchSuggestion suggestion, CancellationToken cancellationToken = default(CancellationToken))
Parameters
Type Name Description
SearchSuggestion suggestion

Suggestion to use for the search.

CancellationToken cancellationToken

Token used to cancel searches.

Returns
Type Description
Task<IList<SearchResult>>

Task returning a list of results.

| Improve this Doc View Source

SearchAsync(String, CancellationToken)

Gets a list of search results for the given query.

Declaration
public virtual async Task<IList<SearchResult>> SearchAsync(string queryString, CancellationToken cancellationToken = default(CancellationToken))
Parameters
Type Name Description
String queryString

Text of the query.

CancellationToken cancellationToken

Token used to cancel requests (e.g. because the search was changed or canceled).

Returns
Type Description
Task<IList<SearchResult>>

Task returning list of search results.

| Improve this Doc View Source

SuggestAsync(String, CancellationToken)

Gets a list of suggestions for the given query.

Declaration
public virtual async Task<IList<SearchSuggestion>> SuggestAsync(string queryString, CancellationToken cancellationToken = default(CancellationToken))
Parameters
Type Name Description
String queryString

Text of the query.

CancellationToken cancellationToken

Token used to cancel requests (e.g. because the search text has changed).

Returns
Type Description
Task<IList<SearchSuggestion>>

Task returning a list of suggestions.

Implements

ISearchSource
  • Improve this Doc
  • View Source
In This Article
Back to top Generated by DocFX