maxBounds
LateInitialisationError Bug
#1328
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. |
Beta Was this translation helpful? Give feedback.
-
@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. |
Beta Was this translation helpful? Give feedback.
-
This is the bug I found when adding
maxBounds
attribute 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
A
anda
only can be small as 0.019.Meanwhile, the difference between
B
andb
only 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.
Beta Was this translation helpful? Give feedback.
All reactions