-
-
Notifications
You must be signed in to change notification settings - Fork 859
-
-
Notifications
You must be signed in to change notification settings - Fork 859
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
[Question] How can I make panning boundaries for any zoom? #177
Comments
Not sure if I'm being an idiot, but why shouldn't the LatLng corners work for any zoom ? (Trying to figure if it's a bug or something else). |
The way it works is it checks if the center of the screen is in boundaries. The rectangle of view can have different LatLng dimensions, which change when zoom changes. It would have worked perfectly if it checked corners for collision, not the center. |
Having the same issue. The boundaries seems to change depending on zoom level. As I zoom in, the boundary seems to get slightly smaller, which cuts off part of the map. |
Does anyone have a workaround for this? |
I tried to provide current bounds to |
This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days. |
This issue was closed because it has been stalled for 5 days with no activity. |
@roderikpeeters @q869939686 @OrKoN @KaYBlitZ @maxgmer I'm also facing this issue. Did anyone of you find a work-around? This is still an issue, so please reopen! |
Needs re-open. |
Same issue! I have figured if you somehow set up the right coordinates for swPanBoundary and nePanBoundary, the user can't go out from the map. But it is difficult to find the right one. |
What have you tried so far, and what are you trying to achieve ? |
Hi @aadi-github, that last comment didn't make any sense, it was just the stale message. Did you mean to write something else? |
No, Actually the comment done by KaYBlitZ was actually the issue I was facing. The boundaries seems to change depending on the zoom level. As I zoom in, the boundary seems to get slightly smaller, which cuts off part of the map. ex: where you used to see the name of the river, suppose on zoom level 13; Now you won't be able to see that on zoom level 18. I think this is not just because of 'swPanBoundary' and 'nePanBoundary', it might be because zooming is related to the Coordinates of the 'center' also. |
I think we'd need to see an example, maybe some code with the 2 images at different zoom levels of the edges. |
There's 2 separate things here (easy to get confused between them and maybe we should be clearer in the docs). Limiting Pan from the center point (swPanBoundary/nePanBoundary), so the visible corners will change depending upon zoom. |
Yes Actually, I will check with the latest Git version. Thankyou. |
I use MapBox map. When I pan far enough, I see white background and I don't want users to see it. The existing solution is to set LatLng for nw and se boundaries, but this approach is not valid, as it has to change according to current zoom. Is there any other solution? Thanks.
The text was updated successfully, but these errors were encountered: