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

Add navsat tile zoom settings #4

Closed
MoffKalast opened this issue May 7, 2023 · 5 comments
Closed

Add navsat tile zoom settings #4

MoffKalast opened this issue May 7, 2023 · 5 comments
Labels
enhancement New feature or request

Comments

@MoffKalast
Copy link
Owner

The tile zoom is set to 19 (max for OSM) by default and would need an input box to set it to anything else.

@MoffKalast MoffKalast added the enhancement New feature or request label May 7, 2023
@kosmonauta144
Copy link
Contributor

kosmonauta144 commented Apr 17, 2024

would this enhancement allow to zoom out more? I am interesting in increasing max zoom out, but I don't know how to change it yet.

@MoffKalast
Copy link
Owner Author

MoffKalast commented Apr 17, 2024

Max zoom is defined here if you want to experiment with changing it (MIN_SCALE to something lower, e.g. 0.5), it's mainly limited to that so it clamps accidental zoomouts, but yes also to some extent so it doesn't trigger fetching of a billion navsat tiles. Fetching is throttled to prevent spamming the OSM CDN, so if the queue fills up at that scale it'll be processing it a long time and won't be very responsive if you move to a new area.

It would be certainly good to be able to zoom out further, since it's definitely annoying when working with very large areas (especially when trying to find the base_link relative to the faraway world origin).

There are lots of ways it could be partially worked around for the navsat widget, initially maybe just blocking fetching above some zoom level, discarding too old tiles in the loading queue or limiting its size, and the best option: automatically fetching larger tiles when zoomed out further (just like any proper GIS renderer does it) and as a draft when the max accuracy level hasn't loaded in yet. Perhaps level 17 as the draft and level 15 as the max zoom out, or just have it all completely dynamic.

It's currently rather hardcoded though so it would take some refactoring. Not all tile servers offer all zoom levels either, so having some adjustable numbers would not be the worst idea either.

@kosmonauta144
Copy link
Contributor

@darkhannibal and I are playing with your code in this repo https://github.com/kosmonauta144/vizanti to change time zoom level. It still needs some cleanup but for the moment is seems to work not as bad as I though it would.. We are still checking for errors, but if you have some time and you could check it for possible bugs or what can need improvement, it could be great.

@MoffKalast
Copy link
Owner Author

Oh awesome, I'll turn it into a PR and we can discuss and refine it there. 👍

@MoffKalast
Copy link
Owner Author

Closed by #79 and #80. Opened #81.

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

No branches or pull requests

2 participants