-
Notifications
You must be signed in to change notification settings - Fork 519
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
sublocality allways null #1185
Comments
Could you give us more details about your issue ? |
Yes ofc, so the issue is that when i retrieve the subLocality, using the method getSublocality, or even by using the dumper GeoArray this property always comes null. Currently using this setup: $geocoder = new ProviderAggregator();
$chain = new Chain([
//new Nominatim\Nominatim($httpClient, 'https://nominatim.openstreetmap.org', 'Geocoder test'),
new Mapbox($httpClient, $key),
new Geocoder\Provider\ArcGISOnline\ArcGISOnline($httpClient),
//new \Geocoder\Provider\GoogleMaps\GoogleMaps($client, 'France'),
//new \Geocoder\Provider\BingMaps\BingMaps($client, '<API_KEY>'),
]);
$geocoder->registerProvider($chain);
// search by user typed data
$result = $geocoder->geocodeQuery(GeocodeQuery::create($query));
$dumper = new GeoArray();
foreach ($result as $item) {
$arraydump = $dumper->dump($item);
} |
Which of the two providers was used? What is the input (address), what the output (full data structure)? |
Indeed, Mapbox provider does not return any sub-locality property (check The available properties will depend on both the provider and the 3rd party API. In your use case, does the 3rd party API returns a sub-locality ? |
Its the first one (mapbox) |
yeah ofc, im attaching on this reply a response, so you can see it
As you can see the admin level 2 its lisbon so that in theory its also the sublocality and the admin level 2 the locality |
You might be right but according to Mapbox response I don't think we can always assume that Admin Level 1 is the sub-locality. Check the code here and you'll see that Could you show us a response from Mapbox API (the raw response, not the |
According to Mapbox documentation there is indeed no sub-locality provided. |
When retriving addresses the sublocality value is allways null, even tho that the admistrative levels are filled corretly, any reason for this?
Any fix ?
The text was updated successfully, but these errors were encountered: