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

[bug] Map default zoom levels seem to allow for more zoom than supported #188

Open
nemesifier opened this issue Oct 5, 2023 · 3 comments
Labels
bug gsoc-idea Potential step of a GSoC project idea

Comments

@nemesifier
Copy link
Member

We have noticed on different tile providers that they support up to 30m zoom level, but we allow to zoom for more by default, which causes the tile server to provide an empty response and no tiles shows on the map.

We may want to reduce the default max zoom level on the geographic map (maybe we can make this configurable but provide a sensible default).

@d1vyanshu-kumar
Copy link

@nemesifier please review it.

@d1vyanshu-kumar
Copy link

@nemesifier Could you please assist me? I've been attempting to solve this issue, but my current implementation hasn't been effective. Could you provide a robust approach to help me resolve this problem?

@d1vyanshu-kumar
Copy link

d1vyanshu-kumar commented Mar 1, 2024

@nemesifier @pandafy please review this and give some guidance on that if it does not look correct.
import ol from "openlayers";
`const maxZoomLevel = 18;

const osm = new ol.source.OSM();

const getTile = osm.getTileUrlFunction();

osm.setTileUrlFunction((coord) => coord[0] <= maxZoomLevel ? getTile(coord) : 'http://localhost/');

`
this is where I found some ideas to solve this issue:https://jsfiddle.net/jrwtc2df/4/

I tested it the map is continuously loading after a certain zoom level.

d1vyanshu-kumar added a commit to d1vyanshu-kumar/netjsongraph.js that referenced this issue Apr 5, 2024
d1vyanshu-kumar added a commit to d1vyanshu-kumar/netjsongraph.js that referenced this issue Apr 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug gsoc-idea Potential step of a GSoC project idea
Development

Successfully merging a pull request may close this issue.

2 participants