Hi,
I’m here for the same issue: I need users to write address and not to update moving the map pin, but then the lat, lng fields are not updated, they keep the default values even printed through error_log file.
Any news?
Thanks!
EDIT: I found a temporary workaroud.
When using the address field, you can see through inspector that there’s a field JQuery is able to update with correct coordinates:
<input name="your-map" id="your-map" value="lat_updating_value,lng_updating_value" type="hidden">
In my project, I’m using those raw data to update coordinates for some shops user can insert by himself, so my PHP is now:
// $glat = $formdata['lat-your-map'];
// $glng = $formdata['lng-your-map'];
// waiting for plugin FIX, lat, lng fields are disabled
$raw_data_map = $formdata['your-map']; // this is the only field being updated at the moment, so I take the string, explode it, and return the two values
$raw_array = explode(",", $raw_data_map);
$glat = $raw_array[0];
$glng = $raw_array[1];
This way, I’m able to retrieve the right coordinates via the address field only.
Hope this helps a bit.
Bests.
-
This reply was modified 4 years, 11 months ago by
PatrizioRD.
-
This reply was modified 4 years, 11 months ago by
PatrizioRD.