mapbox / search-playground

Geocoding Debugging Tool
https://mapbox.com/search-playground
14 stars 4 forks source link

Get region from autocomplete result #67

Open hassansardarbangash opened 4 years ago

hassansardarbangash commented 4 years ago

How can I get region from the selected result from autocomplete?

From the result I am getting, there is 3rd object named region but actually it is department not region.

Here is the example address:

54b route de brie, 91800 Brunoy, France

Mapbox is giving me: Essonne // Its department not region

But actually its: Ile-de-France

How do I get the correct region?

Here is my working demo:

https://jsfiddle.net/rv085oL1/