Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Which default locator service should be used in Search component? #274

Open
yo1995 opened this issue Mar 13, 2023 · 0 comments
Open

Which default locator service should be used in Search component? #274

yo1995 opened this issue Mar 13, 2023 · 0 comments

Comments

@yo1995
Copy link
Contributor

yo1995 commented Mar 13, 2023

/// Uses a Locator to provide search and suggest results. Most configuration should be done on the
/// `GeocodeParameters` directly.
public class LocatorSearchSource: ObservableObject, SearchSource {
/// Creates a locator search source.
/// - Parameters:
/// - name: The name to show when presenting this source in the UI.
/// - locatorTask: The `LocatorTask` to use for searching.
/// - maximumResults: The maximum results to return when performing a search. Most sources default to `6`.
/// - maximumSuggestions: The maximum suggestions to return. Most sources default to `6`.
public init(
name: String = "Locator",
locatorTask: LocatorTask = LocatorTask(
url: URL(
string: "https://geocode.arcgis.com/arcgis/rest/services/World/GeocodeServer"
)!
),
maximumResults: Int = 6,
maximumSuggestions: Int = 6
) {

We are currently using the public service for the default locator. However, in 2021 we started to move away from the public service endpoints and use the "Citra" API-metered services instead. See examples in Esri/arcgis-runtime-samples-ios#1055 and Esri/arcgis-runtime-samples-ios#1075. i.e.,

old/public
https://geocode.arcgis.com/arcgis/rest/services/World/GeocodeServer
new/Citra
https://geocode-api.arcgis.com/arcgis/rest/services/World/GeocodeServer

However, this would require API key/Auth for the toolkit. Sometimes user may not want to set the global API key to the environment, so it could be a hassle for some usecases.

  • A similar discussion for the public vs Citra route solving service: common-samples/issues/2653
  • There is a discussion in swift-kotlin-sync channel, and this suggestion is from @rchintapalli
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant