Lost the distance measures when drawing (except for circle)
See original GitHub issueChrome V58 Windows 10 Leaflet 1.0.3 Leaflet-draw 0.4.9
As shown below, with leaflet 1.0 and leaflet draw 0.2.4 I was getting text distance for lines, and area for rectangles.
Now I only get the area for circles, but the others do not show anything. Is this just me, and why does the below no longer work?
(I.e. I no longer see the 1425.65 km as shown below).
function addDrawLayer() {
var options = null
var map = MAP.map
var drawings = new L.FeatureGroup()
MAP.drawLayer = drawings
map.addLayer(drawings)
options = {
shapeOptions: {
showArea: true,
clickable: true
},
metric: true,
edit: {
featureGroup: drawings
}
}
var drawControl = new L.Control.Draw(options)
map.addControl(drawControl)
map.on('draw:created', function (e) {
var type = e.layerType
var layer = e.layer
if (type === 'marker') {
layer.bindPopup('A popup!')
}
drawings.addLayer(layer)
});
}
Issue Analytics
- State:
- Created 6 years ago
- Comments:10 (4 by maintainers)
Top Results From Across the Web
How to Draw and Measure a Circle Without a Pattern
How to Draw and Measure a Circle Without a Pattern. Sewing Tool Box ... Circumference: the distance around the outer edge of a...
Read more >CIRCLE
A circle is a 2D shape that has a closed curve consisting of all points at a FIXED distance from its center. A...
Read more >How do you determine if you can draw a circle around a set of ...
Try this: use stereographic projection to project your points onto a sphere. Then you need to find a plane passing through the sphere...
Read more >Circularity | GD&T Basics - GDandTBasics.com
If you think of a stack of coins, circularity would be a measurement around ... it is ± 0.08 and circularity is the...
Read more >Circle Geometry - Australian Mathematical Sciences Institute
Measurement and Geometry : Module 26 Years : 9-10 ... A circle is the set of all points in the plane that are...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
For polylines, it looks like this is because L.Draw.Polyline never shows the length in the tooltip if the browser supports touch events, which Chrome for desktop seems to do. I understand why this was done, but I’m not sure about the best solution here.
For rectangles and polygons, it’s a matter of setting the right options:
The version 1.0.0 of leaflet.draw seems to correct this problem