mustardBees/cmb_field_map

[Feature request] Adding reverse geocoding support for ".map-search" input box

Closed this issue · 1 comments

So far the input box above the map serves to search for a place's latidude and longitude.

To make the plugin even easier and more flexible to use,

  1. it would be great that when moving the map pointer, the input box could return the name of the new location.
  2. Similarly, when editing previously created metabox data, input box could contain the saved location's name instead of a default placeholder.

To achieve the first point, I found this script example that may be useful (see source code) http://www.geocodezip.com/v3_GoogleEx_geocoding-reverse2postcodeA.html [found through http://stackoverflow.com/questions/17830686/how-to-get-city-from-coordinates]

For the second point, location name's metadata could be saved and loaded through another hidden input field, to avoid another external request.

Well I have never used GoogleMaps API so far, and can't adapt geocodezip.com's straight away. I'll see if I can submit something later on.

Thanks for the suggestion. This sounds pretty project specific, I'm not sure if this is something many will want to do.

If it's of any help, please do make use of this project as a starting point.