jjzjj

FeatureGroup

全部标签

javascript - 如何删除 leaflet.draw 中的绘图层?

在使用绘图工具在自定义map上绘制其中一个形状后,使用leaflet.draw.js使用leaflet.js。我有一个弹出的表格,上面写着保存或取消。如果用户按下取消,那么我希望删除绘图。例如,我正在绘制一个矩形。这是我目前的来源map.on('draw:created',function(e){varlayer=e.layer;vartype=e.layerType;$("#add-drawing").fadeIn(500);featureGroup.addLayer(e.layer);//Addsrectangle$("a.cancelD").on("click",function

javascript - 如何计算像geojson.io这样的Leaflet中多段线的距离?

我正在使用Mapbox和Leaflet制作map,我应该让用户绘制多边形并计算并显示该多边形的面积,我还需要让用户绘制折线并显示折线的距离.我已经弄清楚了多边形区域特征,但我不知道如何计算多段线的距离。我的代码如下:loadScript('https://api.tiles.mapbox.com/mapbox.js/plugins/leaflet-draw/v0.2.2/leaflet.draw.js',function(){loadScript('https://api.tiles.mapbox.com/mapbox.js/plugins/leaflet-geodesy/v0.1.0

xml - XSL : for-each select a string with umlauts

我有以下XML:BrandenburgBrandenburgBrandenburg我希望它由xsl转换,但我无法选择FeatureGroup-Value“Bundesländer”。这是xsl:我如何选择一个带有变音符号的属性值? 最佳答案 XML和XPath完全支持Unicode,因此选择任何Unicode字符都不是问题,您只需要确保您的路径选择带有@的属性节点即可。即替换通过. 关于xml-XSL:for-eachselectastringwithumlauts,我们在StackOv