Support › General › Save date for Grid Builder Map FacetResolved
Hi, I'm using Grid Builder Map Facet (https://wpgridbuilder.com/add-ons/map-facet/) and it needs data in this format:
The Map facet works with latitude and longitude coordinates. The source type should be a custom field with as value an array containing the coordinates like this:
[ 'lat' => 5.1025, 'lng' => 40.5548 ]
Is it possible to save the data of Google Maps field or OpenStreetMaps field (or any others) as their request? I could use ACF but I prefer Meta Box.
The field Google Maps or Open Street Map saves the data (location) in the following format latitude,longitude,zoom. You can use the function rwmb_get_value() to get only value latitude and longitude for that addon.
Get more details on this documentation https://docs.metabox.io/fields/map/#getting-field-value.
Hello, I am facing the same problem.
however I did not understand how to implement your solution.
Could you enlighten me on the steps to achieve this?
same trouble here, any update / snippet to use ?
To solve this problem with markers, I directly mapped the "map" field and not the "lattitude" and "longitude" fields.
thanks Jeremy, i am doing the same but it seems that corrdinates are wrong
Personally I use a geolocation field: https://docs.metabox.io/extensions/meta-box-geolocation/
With as map: Open Street Maps.
So if your marker is ok in your backoffice form
AND you refer to the map display field (https://docs.metabox.io/fields/osm/) when you set up your "map facet" in grid builder, this should to walk.