mcguffin / acf-openstreetmap-field

WordPress ACF Field for OpenStreetMap
https://wordpress.org/plugins/acf-openstreetmap-field/
GNU General Public License v3.0
107 stars 22 forks source link

Extract Markers Coordinates #94

Closed mrsalto closed 1 year ago

mrsalto commented 1 year ago

Hi everyone. I use ACF for complex form submission. I need that user could add marker on the map and that in notification email I would get the coordinates in WGS or any other chosen format (preferred in LKS94). Or/and hyperlink of the map view with marker location. I also prefer that user only could add 1 marker on one such field. Any ideas how to achieve this? Or maybe a creator of this plugin could add such option please?

mrsalto commented 1 year ago

I found some solution to use settings geo => true as shown in screenshot here: https://prnt.sc/kE2fKi58ZbrK

Problem is that it extracts the map center coordinates instead of marker coordinates. Any ideas? Where can I find the list of settings that can be used?

mcguffin commented 1 year ago

Have look here: https://github.com/mcguffin/acf-openstreetmap-field/wiki/Usage#raw-data-structure You will have to extract the marker lat/lng from the markers array.