0
這個code在WordPress/PHP中工作正常,但是當我得到coords
動態時,它停止工作。WordPress/PHP中的多邊形地圖
我做了一個alert
的JavaScript變量,它給出了我在WordPress自定義字段中插入的數據。
可能是有一個解析錯誤..
我得到這樣的數據。
var coords = $("#map").attr("data-coordinates");
// Define the LatLng coordinates for the polygon.
var triangleCoords = [
coords
];
有沒有人可以幫助我。
以下數據存儲: {LNG:-113.47113103222,緯度:53.531600034458},{ LNG:-113.46934897258,緯度:53.530568304362},{ LNG: -113.46835550221,lat:53.529993448717}, {lng:-113.46689425672,lat:53.529374507025}, –