madisona/django-google-maps

Is it possible to get country, city, zip code fields auto filed like the geocode?

Closed this issue · 1 comments

Is it possible to get country, city, zip code fields auto-filed like the geocode?

@abdullahalbyati - to do that, you'd want to make a custom version of the google-maps-admin.js file.

The call to the geocode happens here: https://github.com/madisona/django-google-maps/blob/master/django_google_maps/static/django_google_maps/js/google-maps-admin.js#L105

And you'd want to handle the result differently by updating the fields you care about. See https://developers.google.com/maps/documentation/javascript/geocoding