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
Applications are contractually prohibited from storing the results of
geocoding transactions unless they make the request by passing the
forStorage parameter with a value of true and the token parameter with
a valid ArcGIS Online token.
Since a token is required for the geocodeAddresses API, the
geocodeQuery method checks the token property:
If token is NULL, it uses the findAddressCandidates API.
If token is not NULL, it uses the geocodeAddresses API.
If the token value is invalid or has expired, you will get an error.
$httpClient = new \Http\Discovery\Psr18Client();
$provider = new \Geocoder\Provider\ArcGISList\ArcGISList($httpClient);
// Uses the `findAddressCandidates` operation. Result storage is prohibited.$result = $geocoder->geocodeQuery(GeocodeQuery::create('Buckingham Palace, London'));
With a token
$httpClient = new \Http\Discovery\Psr18Client();
// Your token is required.$provider = \Geocoder\Provider\ArcGISList\ArcGISList::token($httpClient, 'your-token');
// Uses the `geocodeAddresses` operation. Result storage is permitted.$result = $geocoder->geocodeQuery(GeocodeQuery::create('Buckingham Palace, London'));
It is possible to specify a sourceCountry to restrict results to this specific
country thus reducing request time (note that this doesn't work on reverse
geocoding).
Contribute
Contributions are very welcome! Send a pull request to the main repository or
report any issues you find on the issue tracker.