You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// New instance of the provider :$provider = newGeocoder\Provider\Photon\Photon($httpClient, 'https://your-photon-root-url');
// Run geocode or reverse query$query = $provider->geocodeQuery(\Geocoder\Query\GeocodeQuery::create('Paris'));
$reverseQuery = $provider->reverseQuery(\Geocoder\Query\ReverseQuery::fromCoordinates(48.86036 ,2.33852));
OSM Tag Feature
You can search for location data based on osm tag filters.
For example, you can filter a geocode query to only include results of type 'place'. You can even restrict it to only have places of type 'city'.
In the reverse geocoding context you can search for the 3 pharmacies closest to a location.
$provider = newGeocoder\Provider\Photon\Photon($httpClient, 'https://your-photon-root-url');
$reverseQuery = \Geocoder\Query\GeocodeQuery::create('Paris')
->withData('osm_tag', ['tourism:museum', 'tourism:gallery'])
->withLimit(5);
// Here we get 5 tourism results in Paris which are either museum or art gallery$results = $provider->reverseQuery($reverseQuery);
Contribute
Contributions are very welcome! Send a pull request to the main repository or
report any issues you find on the issue tracker.