You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
During the timeline below, it was hinted at in #2208 by @maheshj01, then investigated by @mootw, that NaN was being produced internally by the following method in MapCamera:
It appears that when this method is called with identical arguments, the result is NaN? However, for some reason, before #2182, this did not cause issues. This needs to be investigated.
The method itself also needs to be investigated - why is it the shape that it is? See comments in #2199 for more information. Does it make more sense for the method to return 1 instead of NaN or 0 when the inputs are the same?
During the timeline below, it was hinted at in #2208 by @maheshj01, then investigated by @mootw, that NaN was being produced internally by the following method in
MapCamera:flutter_map/lib/src/map/camera/camera.dart
Lines 297 to 298 in 35eb283
It appears that when this method is called with identical arguments, the result is NaN? However, for some reason, before #2182, this did not cause issues. This needs to be investigated.
The method itself also needs to be investigated - why is it the shape that it is? See comments in #2199 for more information. Does it make more sense for the method to return
1instead ofNaNor0when the inputs are the same?Internal link to start of discussion for @fleaflet/maintainers only: https://discord.com/channels/951867686378409984/951879268227485707/1521558461819916458
Timeline:
LatLngwithdouble.naninMarker/MarkerLayertriggers memory leak #2178 was opened, reporting thatMarkers with NaN points caused memory leaks and crashesLatLngis non-finite #2182 was opened and merged (resolvingLatLngwithdouble.naninMarker/MarkerLayertriggers memory leak #2178), which introduced a check for NaN during all projections fromLatLngs - this aimed to uncover the memory leak and throw instead, which was deemed an acceptable solutionMarkerLayer#2213 was merged, which (in addition to unrelated issues) introduced a check for NaN on theMarkerLayeronly, double fixingLatLngwithdouble.naninMarker/MarkerLayertriggers memory leak #2178 with a tighter scopeLatLngis non-finite #2218 was opened and merged, to revert fix: throw whenLatLngis non-finite #2182, close fix: LatLng is not finite exception #2208, and fix Many interactions throw "LatLng is not finite" error #2199 - this would've reopenedLatLngwithdouble.naninMarker/MarkerLayertriggers memory leak #2178, but perf: cache zoom-independent marker projections inMarkerLayer#2213 fixed it anyway