Open NatEvatt opened 1 year ago
Thank you for the report!
To add an additiaonl debugging data point:
esri-leaflet-vector@4.0.0
: https://jsbin.com/waheyomodi/1/edit?html,outputesri-leaflet-vector@3.1.5
: https://jsbin.com/waheyomodi/2/edit?html,output
Describe the bug
I am currently in the process of moving my production app from
L.esri.BasemapLayer
to your vector tiles plugin and running into an issue. When calling the map.invalidateSize() function, I run into aleaflet-src.js:588 Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'call')
When I jump into dev tools, this
fire
method withininvalidateSize
is passing the typeresize
tofire
Within the
fire
method, alisteners
object is created, which pulls from_events
bytype
, in this case,resize
. Unfortunately, in the case ofresize
there is no function attached to that listener.I believe that I was able to trace the issue back to the
MaplibreGLLayer.js
module where thegetEvents
function references the "private" function_resize
. However, this function does not exist in theMaplibreGLLayer.js
.In order to get rid of my error, i have put in a dummy function for
_resize
and with this, my code works as expected. This function is obviously not doing anything very helpful, but I am looking to you all for what the expected functionality is.Reproduction
https://codepen.io/natevatt-the-sasster/pen/YzLMJwg
open dev tools. Click button "click me".
Logs
Additional Information
I am using Gulp to bundle for my production app.