-
Notifications
You must be signed in to change notification settings - Fork 57
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
wrong listener type: undefined
console warning
#210
Comments
The warning is generated because MaplibreGLLayer.js is returning an _resize function that does not have an implementation (undefined).
Not sure if the best option here is to implement _resize and call GL.resize or just call this._update that is calling _resize when needed. Let me know what are your thoughts about it. |
@BrunoCaimar Good find. I was just investigating this. |
Would this work? _resize: function () {
return this._glMap._resize;
}, This does remove the warning for me, and I didn't see any issue with functionality. I could see in loading both I looked into just doing |
I created a PR in the case that you find this solution sufficient. |
@sheeley820 I don't think this will work. If glMap._resize does not exist, it will throw an error in the same way. I believe that an implementation similar to the _update method will work (or maybe just call the _update on _resize). |
@BrunoCaimar Do you mean something like _resize: function e {
this._update(e);
} I have been using the implementation from my PR in my application and haven't seen any issues with it. Would it be enough to just place the null/undefined check in there? |
Describe the bug
When using Esri Leaflet Vector v4.0.0 and higher, there's a warning in the console when the basemap layer is added:
Reproduction
wrong listener type: undefined
Logs
No response
System Info
Additional Information
No response
The text was updated successfully, but these errors were encountered: