-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
Create Scale control class #1873
Comments
Also not sure how to best handle backward compatibility with current control_scale map parameter that should probably be removed ... |
@Conengmo Any interest for a control scale plugin ??? The alternative would be to extend the control_scale variable to also handle position (same as zoom_control) but we still miss the ability to set a single unit (metric or imperial), maxWidth or updateWhenIdle. |
@berrfred I think it would be a useful addition. If you are still interested in making it please checkout our contribution guidelines: https://github.com/python-visualization/folium/blob/main/.github/CONTRIBUTING.md I would not worry about removing |
Thanks @hansthen for chiming in on this one! I'll share my 2 cents as well: Since Scale is part of core Leaflet, this shouldn't be a plugin, but be part of core Folium. I can imagine we add a new class Then in |
+1 for this, adding a bottom left watermark for example hides the scale and it would be useful to move it around |
Is your feature request related to a problem? Please describe.
It looks like L.control.scale() now has several useful options (e.g. position. metric, imperial), wouldn't it make sense to have it as a separate plugin as initially suggested by @BibMartin ? #270
Describe the solution you'd like
I am interested in showing only the metric scale at bottomrigth ... and maybe trick the css to integrate it in the attributions but this is another story. Today without a plugin it would require some dirty css and js to achieve it.
Describe alternatives you've considered
This is where I got with my usual script approach, moving control-scale to bottomright before attribution and assuming imperial is the second child, then delete it:
Additional context
Also adding the following css I've been able to display attribution and scale on the same row ... not sure if this could also become a parameter to handle in the plugin.
Implementation
Definitely missing experience on making a PR but taking inspiration from existing plugins I am willing to learn and might be able to achieve it ...
The text was updated successfully, but these errors were encountered: