Closed cromanpa94 closed 1 year ago
For instance, we will have to adjust the zoomSnap
and scales
arguments for the map to be at a particular scale given the pixels, page size, etc.
leafletOptions(zoomControl = FALSE,
zoomSnap = 0.01,
crs = leafletCRS(
scales = 1
)
)
An initial implementation can be reviewed in this commit: https://github.com/cromanpa94/OSM.sf.shiny/commit/88621ebe42dda05cbca43a0024da23f692a9cfb7. Note that this implementation follows the information in this website https://leafletjs.com/examples/zoom-levels/ AND the equations in the following one: https://wiki.openstreetmap.org/wiki/Zoom_levels.
@rog-SARTHAK please check why the map lags so much when you change the zoom level or moves the map to another location.
@rog-SARTHAK suggested adding a reaction (button).
Added reactive value coordinates to server and button in UI to set coordinates in commit 8b3f7cb
This will prevent latitude longitude fields to glitch when user is manually entering values
NOTE: We now have to reopen ticket #11 "Fix the starting coordinates"
It seems some of the zoom levels will be non-integers. I'd recommend reviewing the documentation in this link and considering implementing some of the functions discussed therein directly in the app: https://leafletjs.com/examples/zoom-levels/