leaflet-blurred-location icon indicating copy to clipboard operation
leaflet-blurred-location copied to clipboard

Move scale bar when zooming

Open jywarren opened this issue 6 years ago • 3 comments

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 avatar Feb 17 '19 21:02 jywarren

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!


jywarren avatar Feb 17 '19 21:02 jywarren

Can I claim this issue?

lohitha02 avatar Feb 18 '19 09:02 lohitha02

Go ahead @lohitha02!

grvsachdeva avatar Feb 18 '19 09:02 grvsachdeva