Logicify / jquery-locationpicker-plugin

JQuery Location Picker plugin
MIT License
389 stars 260 forks source link

How can I get proper city name? #24

Closed dialogik closed 9 years ago

dialogik commented 9 years ago

In your example Advanced usage of geo decoder features, when I place the marker on a random big city, the city name is either empty or shows the name of the district.

E.g. if I place the marker somewhere in Paris, the address would be

43-51 Boulevard Saint-Jacques, 75014 Paris, Frankreich

But instead, city remains empty

Unfortunately, the addressComponents

 var addressComponents = $(this).locationpicker('map').location.addressComponents;

doesn't contain the correct city name (Paris). Examples in Berlin outputted the district name instead of the city.

How can I access the proper city name?

corvis commented 9 years ago

Hey, good point! Fixed in version 0.1.11. Let me know if it works for you

dialogik commented 9 years ago

Yeah, now returns the proper city. Thanks a lot!

But why did you remove the former city information, which was the district name? That was quite interesting, too. How can I fetch that?