Best way to store geojson in CPT (ACF) for display in a Leaflet map?

[ad_1]

I’m trying to build a custom post type using the Advanced Custom Fields and Leaflet plugins. The CPT will store and display geojson data, and I’m a bit stuck on the best way to do this.

First question: what’s the best way to store the geojson in the CPT? Should I copy/paste the geojson into a `text` field? Or should I upload the .geojson file to a `file` field?

Second question: how do I then access this data with the Leaflet plugin? Can I do this with nested shortcodes somehow?

[ad_2]
1 Comment

 

This site will teach you how to build a WordPress website for beginners. We will cover everything from installing WordPress to adding pages, posts, and images to your site. You will learn how to customize your site with themes and plugins, as well as how to market your site online.

Buy WordPress Transfer