From 1da15c2619953c1b2c42736276f8158c2e7d38aa Mon Sep 17 00:00:00 2001 From: Gilles Gauthier Date: Fri, 13 May 2022 15:58:12 +0200 Subject: [PATCH 1/2] Filters GoogleMap results with components Explain how to filters GoogleMap results with components --- src/Provider/GoogleMapsPlaces/README.md | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/Provider/GoogleMapsPlaces/README.md b/src/Provider/GoogleMapsPlaces/README.md index 10ef59ef4..33e6b7aaa 100644 --- a/src/Provider/GoogleMapsPlaces/README.md +++ b/src/Provider/GoogleMapsPlaces/README.md @@ -54,6 +54,17 @@ $results = $provider->geocodeQuery( ); ``` +matches a country name or a two letter ISO 3166-1 country code. If you only use the "region" parameter, you will not be guaranteed to have results on the region, as the documentation indicates [Region](https://developers.google.com/maps/documentation/javascript/geocoding#GeocodingRequests): + +> The region parameter will only influence, not fully restrict, results from the geocoder. + +```php +$results = $provider->geocodeQuery( + GeocodeQuery::create('montpe') + ->withData('components', 'country:FR'); +); +``` + ### Reverse Geocoding Three options available for reverse geocoding of latlon coordinates: From 829a2d68d56826987f129146037007739534dc98 Mon Sep 17 00:00:00 2001 From: Gauthier Gilles Date: Mon, 30 May 2022 09:44:43 +0200 Subject: [PATCH 2/2] feedback 1 --- src/Provider/GoogleMapsPlaces/README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Provider/GoogleMapsPlaces/README.md b/src/Provider/GoogleMapsPlaces/README.md index 33e6b7aaa..820ea71e8 100644 --- a/src/Provider/GoogleMapsPlaces/README.md +++ b/src/Provider/GoogleMapsPlaces/README.md @@ -54,13 +54,13 @@ $results = $provider->geocodeQuery( ); ``` -matches a country name or a two letter ISO 3166-1 country code. If you only use the "region" parameter, you will not be guaranteed to have results on the region, as the documentation indicates [Region](https://developers.google.com/maps/documentation/javascript/geocoding#GeocodingRequests): +country matches a country name or a two letter ISO 3166-1 country code. If you only use the "region" parameter, you will not be guaranteed to have results on the region, as the documentation indicates [Region](https://developers.google.com/maps/documentation/javascript/geocoding#GeocodingRequests): > The region parameter will only influence, not fully restrict, results from the geocoder. ```php $results = $provider->geocodeQuery( - GeocodeQuery::create('montpe') + GeocodeQuery::create('montpellier') ->withData('components', 'country:FR'); ); ```