leaflet - 将一个多边形的数据复制粘贴到另一个,LEAFLET
问题描述
我在传单中有一个多边形图层。每个多边形都有一个唯一的 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
如果这不起作用,请与我们分享您的代码
推荐阅读
- javascript - Heroku 维护——密码认证
- r - 使用 R 包 openxlsx 我正在尝试合并列和行。虽然脚本有效,但它不允许我覆盖
- r - 使用 R 进行网络映射 - 选择节点时突出显示用户定义的路径
- javascript - 显示每月的第二个星期五 - Javascript
- flutter - Firestore 查询文档 ID 不在数组中的位置
- flutter - 任务':sms:verifyReleaseResources'的执行失败和Flutter应用程序构建的线程“main”java.lang.NullPointerException中的异常
- java - 使用 alpha 橡胶擦除画布位图
- python - 如何找到0和1数组中元素的差异
- scala - 测试一些重内存消耗的代码
- flutter - 如何根据颤动中的父级调整图标大小