Custom Fields
Re-Envisioned
Support General Save date for Grid Builder Map Facet

  • Creator
    Topic
  • #24441
    Resolved Trang Nguyen
    Participant

    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.

    Best.

Viewing 6 replies - 1 through 6 (of 6 total)
  • Author
    Replies
  • #24453
    Long Nguyen
    Moderator

    Hi,

    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.

    #31660
    Jérémy BERNARD
    Participant

    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?

    Best.

    #31937
    Heave
    Participant

    same trouble here, any update / snippet to use ?

    #31938
    Jérémy BERNARD
    Participant

    Hello,
    To solve this problem with markers, I directly mapped the "map" field and not the "lattitude" and "longitude" fields.

    #31940
    Heave
    Participant

    thanks Jeremy, i am doing the same but it seems that corrdinates are wrong

    #31941
    Jérémy BERNARD
    Participant

    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.

    Best

Viewing 6 replies - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.