Skip to content
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

General suggestions #4

Open
kingrollo opened this issue Jul 8, 2013 · 3 comments
Open

General suggestions #4

kingrollo opened this issue Jul 8, 2013 · 3 comments

Comments

@kingrollo
Copy link

I really like this plugin - it's much cleaner than the other measure tool that's floating around. You should submit it to the full Leaflet plugins page.

There are two things I'd change (have changed actually in my implementation). Firstly, it would be nice if it was more easily configurable for different units - even if it just meant passing the calculation as a formula to the library when loaded. Secondly, the icon isn't too intuitive - I've shared the one I'm using below...

ruler

Thanks!

@kartenkarsten
Copy link

I totaly agree adding to the Leaflet Plugin list would be really practical.

@justinlewis
Copy link

I agree that there should be an option for setting units. You can add "options" to the extended Polyline class of leaflet.measurecontrol.js but this is just a hack.

L.Polyline.Measure = L.Draw.Polyline.extend({
    options: {
        metric: false
  },
 ....

It would be nice to set these options when adding the control to the map (i.e. L.Control.measureControl({metric:false}).addTo(map)).

I'll try to come back to this when I have more time.

@jonathandarrer
Copy link

Great plugin, I'm using it at work. I've added map events to start/stop measuring in my fork, https://github.com/jonathandarrer/leaflet.measure which my company is now using. If you want to pull this change into your repository, then feel free to. What do you think?

_startMeasuring: function() {
  ...
  this._map.fire('measure:measurestart', { layerType: this.type });
  ...
}

_stopMeasuring: function() {
  ...
  this._map.fire('measure:measurestop', { layerType: this.type });
  ...
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants