将一个多边形的数据复制粘贴到另一个多边形,叶

问题描述

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

解决方法

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

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