0
我有我創建的geojson功能。編輯後,我知道有一個繪製:編輯的事件。我如何得到多邊形所包含的原始點,並且能否獲得新的多邊形點?怎麼樣?是否有可能知道哪些頂點已更改或添加?在小冊子中編輯多邊形後,如何獲取修改後的原始geojson點?
我嘗試以下,所有這些都不起作用:
map.on('draw:edited', function (e) {
var type = e.layerType;
var layer = e.layer; // this is giving undefined errors
var shape = layer.toGeoJSON() // this is undefined
var shape_for_db = JSON.stringify(shape);
});