正如您在fiddle中看到的那样,我有一个像这样的多边形:
var data = [{
"type": "Feature",
"geometry": {
"type": "Polygon",
"coordinates": [
[
[2.504410743713379,44.28253972334941],
[2.504410743713379,44.28929846767132],
[2.5168561935424805,44.28929846767132],
[2.5168561935424805,44.28253972334941],
[2.504410743713379,44.28253972334941]
]
]
}}]
当我想将它添加到我的featureGroup drawnItems
时,我使用:
var geojsonLayer = L.geoJson(data);
geojsonLayer.getLayers()[0].addTo(drawnItems);
你能帮帮我吗?
如何添加我的多边形以具有移动处理程序?