首页 > 解决方案 > 将一个多边形的数据复制粘贴到另一个,LEAFLET

问题描述

我在传单中有一个多边形图层。每个多边形都有一个唯一的 ID。是否有可能将数据从一个多边形复制到另一个*除了 ID?

标签: leafletqgis

解决方案


var poly1 = L.polygon(latlngs, options);
var copyPoly = L.polgygon(poly1.getLatLngs(),poly1.options);
// copyPoly.options.uiqueId = newId; // when the Id is stored in the options

如果这不起作用,请与我们分享您的代码


推荐阅读