dymaptic.GeoBlazor.Core
dymaptic.GeoBlazor.Core.Components
LocatorSearchSource Class
The following properties define a source pointing to a
url that represents a locator service, which may be used to geocode locations
with a Search widget instance.
ArcGIS Maps SDK for JavaScript
public class LocatorSearchSource : dymaptic.GeoBlazor.Core.Components.SearchSource
Inheritance System.Object 🡒 Microsoft.AspNetCore.Components.ComponentBase 🡒 MapComponent 🡒 SearchSource 🡒 LocatorSearchSource
Constructors
LocatorSearchSource() Constructor
Parameterless constructor for use as a Razor Component.
public LocatorSearchSource();
LocatorSearchSource(string, string, Nullable, IReadOnlyList, string, Nullable, SearchSourceFilter, GetResultsHandler, GetSuggestionsHandler, Nullable, Nullable, Nullable, Nullable, Nullable, string, IReadOnlyList, string, Nullable, PopupTemplate, string, Nullable, Symbol, string, string, string, Nullable, 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 LocatorSearchSource(string? url=null, string? apiKey=null, System.Nullable<bool> autoNavigate=null, System.Collections.Generic.IReadOnlyList<string>? categories=null, string? countryCode=null, System.Nullable<double> defaultZoomScale=null, dymaptic.GeoBlazor.Core.Model.SearchSourceFilter? filter=null, dymaptic.GeoBlazor.Core.Functions.GetResultsHandler? getResultsHandler=null, dymaptic.GeoBlazor.Core.Functions.GetSuggestionsHandler? getSuggestionsHandler=null, System.Nullable<bool> localSearchDisabled=null, System.Nullable<dymaptic.GeoBlazor.Core.Enums.LocatorSearchLocationType> locationType=null, System.Nullable<int> maxResults=null, System.Nullable<double> maxSuggestions=null, System.Nullable<int> minSuggestCharacters=null, string? name=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, string? searchTemplate=null, string? singleLineFieldName=null, string? suffix=null, System.Nullable<bool> suggestionsEnabled=null, System.Nullable<bool> withinViewEnabled=null, System.Nullable<double> zoomScale=null);
Parameters
url
System.String
URL to the ArcGIS Server REST resource that represents a locator service.
ArcGIS Maps SDK for JavaScript
apiKey
System.String
An authorization string used to access a resource or service.
ArcGIS Maps SDK for JavaScript
autoNavigate
System.Nullable<System.Boolean>
Indicates whether to automatically navigate to the
selected result once selected.
default true
ArcGIS Maps SDK for JavaScript
categories
System.Collections.Generic.IReadOnlyList<System.String>
A string array which limits the results to one
or more categories.
ArcGIS Maps SDK for JavaScript
countryCode
System.String
Constricts search results to a specified country code.
ArcGIS Maps SDK for JavaScript
defaultZoomScale
System.Nullable<System.Double>
Sets the scale of the MapView or SceneView
for the resulting search result, if the locator service doesn’t return an extent with a scale.
default null
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
localSearchDisabled
System.Nullable<System.Boolean>
This property controls prioritization of Search widget result
candidates depending on the view scale.
default false
ArcGIS Maps SDK for JavaScript
locationType
System.Nullable<LocatorSearchLocationType>
Defines the type of location, either street
or rooftop
, of the point returned from the
World Geocoding Service.
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
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
searchTemplate
System.String
A template string used to display multiple
fields in a defined order when results are displayed.
ArcGIS Maps SDK for JavaScript
singleLineFieldName
System.String
The field name of the Single Line Address
Field in the REST services directory for the locator service.
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
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
LocatorSearchSource.ApiKey Property
An authorization string used to access a resource or service. API keys are generated and managed in the ArcGIS Developer dashboard. An API key is tied explicitly to an ArcGIS account; it is also used to monitor service usage. Setting a fine-grained API key on a specific class overrides the global API key.
public string? ApiKey { get; set; }
Property Value
LocatorSearchSource.Categories Property
A string array which limits the results to one
or more categories.
ArcGIS Maps SDK for JavaScript
public System.Collections.Generic.IReadOnlyList<string>? Categories { get; set; }
Property Value
System.Collections.Generic.IReadOnlyList<System.String>
LocatorSearchSource.CountryCode Property
Constricts search results to a specified country code. For example, US for United States or SE for Sweden. Only applies to the World Geocode Service.
public string? CountryCode { get; set; }
Property Value
LocatorSearchSource.DefaultZoomScale Property
Sets the scale of the MapView or SceneView for the resulting search result, if the locator service doesn’t return an extent with a scale. An example of this is using the Use current location option in the Search bar.
If you want to override the scale returned by the locator service, use zoomScale instead.
public System.Nullable<double> DefaultZoomScale { get; set; }
Property Value
System.Nullable<System.Double>
LocatorSearchSource.LocalSearchDisabled Property
This property controls prioritization of Search widget result candidates depending on the view scale.
When this property is false (the default value), the location parameter is included in the request when the scale of the MapView or SceneView is less than or equal to 300,000. This prioritizes result candidates based on their distance from a specified point (the center of the view).
When this property is true, the location parameter is never included in the request, no matter the scale of the MapView or SceneView.
Default value is False.
public System.Nullable<bool> LocalSearchDisabled { get; set; }
Property Value
System.Nullable<System.Boolean>
LocatorSearchSource.LocationType Property
Defines the type of location, either street or rooftop, of the point returned from the World Geocoding Service.
public System.Nullable<dymaptic.GeoBlazor.Core.Enums.LocatorSearchLocationType> LocationType { get; set; }
Property Value
System.Nullable<LocatorSearchLocationType>
LocatorSearchSource.Name Property
The name of the source for display.
ArcGIS Maps SDK for JavaScript
public string? Name { get; set; }
Property Value
LocatorSearchSource.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
LocatorSearchSource.SingleLineFieldName Property
The field name of the Single Line Address Field in the REST services directory for the locator service. Common values are SingleLine and SingleLineFieldName.
public string? SingleLineFieldName { get; set; }
Property Value
LocatorSearchSource.Type Property
The type of source.
public override dymaptic.GeoBlazor.Core.Enums.SearchSourceType Type { get; }
Property Value
LocatorSearchSource.Url Property
URL to the ArcGIS Server REST resource that represents a locator service.
ArcGIS Maps SDK for JavaScript
public string Url { get; set; }
Property Value
Methods
LocatorSearchSource.AddToCategories(string[]) Method
Asynchronously adds elements to the Categories property.
public System.Threading.Tasks.Task AddToCategories(params string[] values);
Parameters
values
System.String[]
The elements to add.
Returns
LocatorSearchSource.GetApiKey() Method
Asynchronously retrieve the current value of the ApiKey property.
public System.Threading.Tasks.Task<string?> GetApiKey();
Returns
System.Threading.Tasks.Task<System.String>
LocatorSearchSource.GetCategories() Method
Asynchronously retrieve the current value of the Categories property.
public System.Threading.Tasks.Task<System.Collections.Generic.IReadOnlyList<string>?> GetCategories();
Returns
System.Threading.Tasks.Task<System.Collections.Generic.IReadOnlyList<System.String>>
LocatorSearchSource.GetCountryCode() Method
Asynchronously retrieve the current value of the CountryCode property.
public System.Threading.Tasks.Task<string?> GetCountryCode();
Returns
System.Threading.Tasks.Task<System.String>
LocatorSearchSource.GetDefaultZoomScale() Method
Asynchronously retrieve the current value of the DefaultZoomScale property.
public System.Threading.Tasks.Task<System.Nullable<double>> GetDefaultZoomScale();
Returns
System.Threading.Tasks.Task<System.Nullable<System.Double>>
LocatorSearchSource.GetLocalSearchDisabled() Method
Asynchronously retrieve the current value of the LocalSearchDisabled property.
public System.Threading.Tasks.Task<System.Nullable<bool>> GetLocalSearchDisabled();
Returns
System.Threading.Tasks.Task<System.Nullable<System.Boolean>>
LocatorSearchSource.GetLocationType() Method
Asynchronously retrieve the current value of the LocationType property.
public System.Threading.Tasks.Task<System.Nullable<dymaptic.GeoBlazor.Core.Enums.LocatorSearchLocationType>> GetLocationType();
Returns
System.Threading.Tasks.Task<System.Nullable<LocatorSearchLocationType>>
LocatorSearchSource.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>
LocatorSearchSource.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>
LocatorSearchSource.GetSingleLineFieldName() Method
Asynchronously retrieve the current value of the SingleLineFieldName property.
public System.Threading.Tasks.Task<string?> GetSingleLineFieldName();
Returns
System.Threading.Tasks.Task<System.String>
LocatorSearchSource.GetUrl() Method
Asynchronously retrieve the current value of the Url property.
public System.Threading.Tasks.Task<string?> GetUrl();
Returns
System.Threading.Tasks.Task<System.String>
LocatorSearchSource.RemoveFromCategories(string[]) Method
Asynchronously remove an element from the Categories property.
public System.Threading.Tasks.Task RemoveFromCategories(params string[] values);
Parameters
values
System.String[]
The elements to remove.
Returns
LocatorSearchSource.SetApiKey(string) Method
Asynchronously set the value of the ApiKey property after render.
public System.Threading.Tasks.Task SetApiKey(string? value);
Parameters
value
System.String
The value to set.
Returns
LocatorSearchSource.SetCategories(IReadOnlyList) Method
Asynchronously set the value of the Categories property after render.
public System.Threading.Tasks.Task SetCategories(System.Collections.Generic.IReadOnlyList<string>? value);
Parameters
value
System.Collections.Generic.IReadOnlyList<System.String>
The value to set.
Returns
LocatorSearchSource.SetCountryCode(string) Method
Asynchronously set the value of the CountryCode property after render.
public System.Threading.Tasks.Task SetCountryCode(string? value);
Parameters
value
System.String
The value to set.
Returns
LocatorSearchSource.SetDefaultZoomScale(Nullable) Method
Asynchronously set the value of the DefaultZoomScale property after render.
public System.Threading.Tasks.Task SetDefaultZoomScale(System.Nullable<double> value);
Parameters
value
System.Nullable<System.Double>
The value to set.
Returns
LocatorSearchSource.SetLocalSearchDisabled(Nullable) Method
Asynchronously set the value of the LocalSearchDisabled property after render.
public System.Threading.Tasks.Task SetLocalSearchDisabled(System.Nullable<bool> value);
Parameters
value
System.Nullable<System.Boolean>
The value to set.
Returns
LocatorSearchSource.SetLocationType(Nullable) Method
Asynchronously set the value of the LocationType property after render.
public System.Threading.Tasks.Task SetLocationType(System.Nullable<dymaptic.GeoBlazor.Core.Enums.LocatorSearchLocationType> value);
Parameters
value
System.Nullable<LocatorSearchLocationType>
The value to set.
Returns
LocatorSearchSource.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
LocatorSearchSource.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
LocatorSearchSource.SetSingleLineFieldName(string) Method
Asynchronously set the value of the SingleLineFieldName property after render.
public System.Threading.Tasks.Task SetSingleLineFieldName(string? value);
Parameters
value
System.String
The value to set.
Returns
LocatorSearchSource.SetUrl(string) Method
Asynchronously set the value of the Url property after render.
public System.Threading.Tasks.Task SetUrl(string value);
Parameters
value
System.String
The value to set.
Returns
LocatorSearchSource.ValidateRequiredGeneratedChildren() Method
Validates source-generated child components.
public override void ValidateRequiredGeneratedChildren();
Implements ValidateRequiredGeneratedChildren()