mcguffin / acf-openstreetmap-field

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

Raw Data #19

Closed benbelek closed 5 years ago

benbelek commented 5 years ago

Hey !

This extension seems to be a very good alternative to google maps, thanks! I would like to use the raw data but i don't understant how can i can "echo" this in .php using leaflet API, in order to personalize the map !

Thanks

ben

mcguffin commented 5 years ago

Hi, using raw data you are free to choose any map library you like in the frontend. It doesn't have to be leaflet, can be mapbox or something else.

In PHP get_field() returns an array holding the map data the user entered. Turning this into a map-ish representation in HTML, JS, SVG or anything else in any tool you choose is solely up to you. Heres some fresh documentation of the raw data return value: https://github.com/mcguffin/acf-openstreetmap-field/wiki/Usage#raw-data If you want to work with leaflet, there are also some Links to get you started.

Regards, jörn