maxBounds LateInitialisationError Bug
#1328
Unanswered
WenYiCoding
asked this question in
Q&A
Replies: 2 comments 1 reply
|
I suspect this isn't a precision bug, but assuming this is the same issue as in Discord, more that there are an incompatible settings, that result in no available options to satisfy the conditions. Your maxBounds param tries to force bounds that are inside your bounds param. So it can't satisfy this and barfs. If you remove your bounds parameter you will probably find it works fine. |
1 reply
|
@WenYiCoding try out the code in #1331. I would be interested to know if it resolves your issue. If you run into an issue where the map is drawn with a border outside your maxBounds and you cannot move it, make sure you set your maxZoom to a value high enough to fit the bounds on your screen. |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
This is the bug I found when adding
maxBoundsattribute to restrict the map scrolling.Let's say:
maxBounds: LatLngBounds( LatLng(3.219, 101.711), // A, B LatLng(3.200, 101.700), // a, b ),The difference between
Aandaonly can be small as 0.019.Meanwhile, the difference between
Bandbonly can as small as 0.011.This means if I decrease the value of A,B or increase the value of a,b I will get this error.

I hope the maintenance team can investigate the problem.
All reactions