你可以發佈一個鏈接到你的網頁?至於幾何形狀被存儲,其中,每個控制添加到頁面(標記,線,多邊形)具有其自己的存儲陣列,例如從polygoncontrol.js
me.storage = [/*array of GeometryControls#beans#Geometry*/]
,如果你看的把定義GeometryControls#豆,你會看到
Geometry:function(p){
this.type = p.type;
this.geometry = p.geometry;
this.title = p.title || ["",""];
this.description = p.description || ["",""];
}
實際座標在GeometryControls.prototype.saveData
//determine geometry type, and copy geometry appropriately
if(record.type === "point"){
recordJSON.coordinates.push({lat:record.geometry.getLatLng().lat(),lng:record.geometry.getLatLng().lng()});
} else {
var vertex;
for(var i=0;i<record.geometry.getVertexCount();i++){
vertex = record.geometry.getVertex(i);
recordJSON.coordinates.push({lat:vertex.lat(),lng:vertex.lng()});
}
}
這看起來像一個V2問題連載權。你的標籤不正確。 – CrazyEnigma 2010-07-21 14:06:56
是的,絕對是v2 – chrismarx 2010-12-08 21:24:27