1

I'm putting a map on my site and I'd like certain co-ordinates in the map to be editable from the admin.

var geoJson = [{
"type": "Feature",
"geometry": {
    "type": "Point",
    "coordinates": [-75.00, 40]
},

Putting it as follows breaks it

var geoJson = [{
"type": "Feature",
"geometry": {
    "type": "Point",
    "coordinates": [<?php the_field('co_ordinates'); ?>]
},

Is there a way to do this?

  • Is this between <script></script> tags in a PHP file or in a .js file? – corygibbons Oct 9 '15 at 5:14

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.