New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Lost the distance measures when drawing (except for circle) #735
Comments
Are you still having this issue? @DrYSG |
Thanks for asking. Yes. I wanted to setup a codepen to show you, but as you can see from the codepen and the comments in Stack Overflow, there are bigger issues with Leaflet and Leaflet.draw: |
You should still be able to use Leaflet 1.0.x in codepen, specifically we should use draw 0.4.10 as well since there were some patches. |
https://jsfiddle.net/mvp7hgou/7/ Leaflet 1.0.3 and Draw 0.4.10 - issue is still present. |
@ddproxy , in stack overflow, you commented that
But I don't see that in your fiddle. Is there something more that I don't grok yet? |
I think I had a different fiddle set up to work on that but I didn't share it because it wasn't working. The documentation for these options need a bit of work and cleanup. |
I am seeing the similar behavior. Chrome 60
|
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:
|
Thanks, @berti. This isn't the first time I've seen stuff break or behave differently because the browser has touch support (even if the screen doesn't). All modern browsers should have support for touch events now, so maybe someone should rethink how that changes lots of functionality for non-touch users. In this case, I might agree that showing distances isn't all that useful when drawing with your fingers - but it's still very useful when drawing with a mouse (or a stylus). Maybe it's better to just show the distance even when drawing using touch, rather than disable it outright because there's a remote possibility that the user might use touch? |
The version 1.0.0 of leaflet.draw seems to correct this problem |
Tooltips aren't shown in chrome at all at the moment, because it supports touch events. See this ticket (I'm not doing anything more with it): Leaflet/Leaflet.draw#735
for anyone facing distance tooltip flickering, Try forcing visibility of the tooltip through CSS : |
Chrome 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).
The text was updated successfully, but these errors were encountered: