leaflet.measure | Adds interactive distance measuring to leaflet | Data Visualization library
kandi X-RAY | leaflet.measure Summary
kandi X-RAY | leaflet.measure Summary
Adds interactive distance measuring to leaflet
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of leaflet.measure
leaflet.measure Key Features
leaflet.measure Examples and Code Snippets
Community Discussions
Trending Discussions on leaflet.measure
QUESTION
I have a non-geographic map aka flat image using CRS.Simple extended by a custom transformation. Everything works fine so far, but now I want to add a distance measurement button. I'm confident I could implement a distance measurement between two markers myself, but the dynamic line drawing and measuring is still a bit above my skills, so I hoped I could use a plugin. None of the ones I found, did offer this though. After looking at the plugins page of leaflet, I tried this fork https://github.com/aprilandjan/leaflet.measure of leaflet.measure originally by https://github.com/jtreml/leaflet.measure as it seemed to offer the ability to add custom units - in my case pixels.
I added this:
...ANSWER
Answered 2020-Jul-16 at 23:35I found a way to do it, even though it feels a bit 'hacky': I replaced the line
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install leaflet.measure
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page