-
-
Notifications
You must be signed in to change notification settings - Fork 6k
Description
when the setView() method is called without providing the zoom level, L. does not make use of an already set zoom level or a default vaule but causes an exception in _limitZoom() at line 2275 (code: return Math.max(min, Math.min(max, zoom)); ), when Math.min() tries to compare the undefined value with max.
In my case this happens when I initialize the map without actually showing a default location (saving unnecessary requests and load time) and setView() later, when I get a position from the user's input. This differs from all samples that initialize the map showing a default location.
I can get around it by calling setView() with ...getZoom(), but it would be nicer (and safer) if it made use of the already set ._zoom value (which .panTo() does)