8000 [GoogleMaps] Update documentation: Filters GoogleMaps results with co… · geocoder-php/Geocoder@02af304 · GitHub
[go: up one dir, main page]

Skip to content 8000

Commit 02af304

Browse files
authored
[GoogleMaps] Update documentation: Filters GoogleMaps results with components (#1154)
* Filters GoogleMap results with components Explain how to filters GoogleMap results with components * feedback 1
1 parent 8f8b48c commit 02af304

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

src/Provider/GoogleMapsPlaces/README.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,17 @@ $results = $provider->geocodeQuery(
5454
);
5555
```
5656

57+
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):
58+
59+
> The region parameter will only influence, not fully restrict, results from the geocoder.
60+
61+
```php
62+
$results = $provider->geocodeQuery(
63+
GeocodeQuery::create('montpellier')
64+
->withData('components', 'country:FR');
65+
);
66+
```
67+
5768
### Reverse Geocoding
5869
Three options available for reverse geocoding of latlon coordinates:
5970

0 commit comments

Comments
 (0)
0