Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在使用可以包含多边形的传单地图。我想检查地图是否有任何多边形,如果有,那么我想找到那个多边形的坐标?
map.eachLayer(function(layer){ if(layer instanceof L.Polygon && !(layer instanceof L.Rectangle) ){ console.log(layer.getLatLngs()); } });