publiclab / leaflet-blurred-location

A Leaflet-based interface for selecting a "blurred" or low-resolution location, to preserve privacy
https://publiclab.github.io/leaflet-blurred-location/examples/
GNU General Public License v3.0
35 stars 32 forks source link

Move scale bar when zooming #178

Open jywarren opened 5 years ago

jywarren commented 5 years ago

Currently, dragging the scale bar zooms the map, but not the inverse -- zooming the map should automatically move the scale bar too. We'd love help implementing this!

image

Here's the slider code:

https://github.com/publiclab/leaflet-blurred-location/blob/43fae0d2f6d68fa5a37cf8c8955f1a641f03ccb7/examples/index.html#L128-L135

We could wire it up to change the scale bar on the map's zoom event:

https://github.com/publiclab/leaflet-blurred-location/blob/43fae0d2f6d68fa5a37cf8c8955f1a641f03ccb7/src/ui/Interface.js#L35

jywarren commented 5 years ago

This has been marked as a good candidate for becoming a first-timers-only issue like these, meaning that it's simple, self-contained, and with some extra formatting, could be a great entry point for a new contributor. If you're familiar enough with this code, please consider reformatting or reposting it as a first-timers-only issue, and then ping @publiclab/reviewers to get it labelled. Or, if this is not your first time, try to solve it yourself!


lohitha02 commented 5 years ago

Can I claim this issue?

grvsachdeva commented 5 years ago

Go ahead @lohitha02!