maptiler / maptiler-sdk-js

Maps SDK tailored for MapTiler Cloud powered by MapLibre GL JS
https://docs.maptiler.com/sdk-js/
BSD 3-Clause "New" or "Revised" License
82 stars 14 forks source link

New error in 2.4.1 - "Cannot set property latRange of #<ba>" #133

Open gaspo opened 3 weeks ago

gaspo commented 3 weeks ago

Hi, I started to get this error with the latest release v2.4.1. Everything works on v2.4.0.

Uncaught (in promise) TypeError: Cannot set property latRange of #<ba> which has only a getter
    at e._initMaptilerSDK (leaflet-maptilersdk.js:1:4268)
    at e.onAdd (leaflet-maptilersdk.js:1:1450)
    at e._layerAdd (Layer.js:114:8)
    at e.whenReady (Map.js:1477:13)
    at e.addLayer (Layer.js:172:8)
    at e.addTo (Layer.js:52:7))

I didnt notice any changes that could cause this issue in the changelog. Is there anything i can help with? Im reverting to 2.4.0 for now.

jonathanlurie commented 3 weeks ago

hello @gaspo , so the error you have seems to be related to https://github.com/maptiler/leaflet-maptilersdk , rather than the SDK. Do you confirm?

gaspo commented 3 weeks ago

Hi, yes, i thought so as well. But there has not been any changes lately in that source code. The only difference I found is the version of this project - 2.4.1 vs 2.4.0 . Using the newest one gives me this error. I will try to prepare some stripped down example.

Also maybe not the right place to ask this, but what is this change? What is version 2.3.1? image

jonathanlurie commented 3 weeks ago

Hey, version 2.3.x is a mistake I left in the package-lock because I forgot to update it. I'm surprised it led to this kind of error.

I will very probably release version 2.4.2 later today or tomorrow and I cleaned this too (in addition to what this version was supposed to address in the first place)

gaspo commented 1 day ago

Thank you, v2.4.2 fixed the issue for me.