-
-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
feat(location): introduce a public API for location providers #41255
base: master
Are you sure you want to change the base?
Conversation
Currently each app does location search & geocoding itself, and it's limited to OpenStreetMap's public Nominatim service. This will allow people to install other app providers, such as Google Maps, Pelias, OpenCage, Photon, etc. This will also allow some providers to provide autocomplete support. Signed-off-by: Thomas Citharel <tcit@tcit.fr>
try { | ||
return $provider->geocode($longitude, $latitude, $options); | ||
} catch (RuntimeException $e) { | ||
$this->logger->warning("Failed to geocode coords {$longitude}:${latitude} using provider {$provider->getName()}", ['exception' => $e]); |
Check failure
Code scanning / Psalm
UndefinedInterfaceMethod Error
try { | ||
return $provider->search($address, $options); | ||
} catch (RuntimeException $e) { | ||
$this->logger->warning("Failed to search for location {$address} using provider {$provider->getName()}", ['exception' => $e]); |
Check failure
Code scanning / Psalm
UndefinedInterfaceMethod Error
return $provider->autocomplete($address, $options); | ||
} | ||
} catch (RuntimeException $e) { | ||
$this->logger->warning("Failed to autocomplete location {$address} using provider {$provider->getName()}", ['exception' => $e]); |
Check failure
Code scanning / Psalm
UndefinedInterfaceMethod Error
Summary
Currently each app does location search & geocoding itself, and it's limited to OpenStreetMap's public Nominatim service. This will allow people to install other app providers, such as Google Maps, Pelias, OpenCage, Photon, etc. This will also allow some providers to provide autocomplete support.
TODO
Checklist