From e8a3e0dc0852544d27697e1aecf600f928cdc922 Mon Sep 17 00:00:00 2001 From: sebalis Date: Fri, 4 Aug 2023 19:18:53 +0200 Subject: [PATCH] update Nominatim provider to use correct search URL --- ProviderMetadata/1_OpenStreetMap.mgd.php | 2 +- api/v3/Geocoder/Geocode.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ProviderMetadata/1_OpenStreetMap.mgd.php b/ProviderMetadata/1_OpenStreetMap.mgd.php index 348e869..2823cd3 100644 --- a/ProviderMetadata/1_OpenStreetMap.mgd.php +++ b/ProviderMetadata/1_OpenStreetMap.mgd.php @@ -16,7 +16,7 @@ 'name' => 'open_street_maps', 'title' => 'Nominatim (Open street maps)', 'class' => 'Nominatim\Nominatim', - 'url' => 'https://nominatim.openstreetmap.org/search', + 'url' => 'https://nominatim.openstreetmap.org', 'is_active' => FALSE, 'weight' => 1, ], diff --git a/api/v3/Geocoder/Geocode.php b/api/v3/Geocoder/Geocode.php index 120e36b..6c9fdec 100644 --- a/api/v3/Geocoder/Geocode.php +++ b/api/v3/Geocoder/Geocode.php @@ -11,7 +11,7 @@ function civicrm_api3_geocoder_geocode($params) { // currently not working $httpClient = new \Http\Adapter\Guzzle6\Client(); - $url = 'https://nominatim.openstreetmap.org/search'; + $url = 'https://nominatim.openstreetmap.org'; $provider = new Geocoder\Provider\Nominatim\Nominatim($httpClient, $url); $geocoder = new \Geocoder\StatefulGeocoder($provider, 'en'); $result = $geocoder->geocodeQuery(GeocodeQuery::create('Disney Land, United States'));