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
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 a leaflet-src.js:588 Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'call')
When I jump into dev tools, this fire method within invalidateSize is passing the type resize to fire
Within the fire method, a listeners object is created, which pulls from _events by type, in this case, resize. Unfortunately, in the case of resize there is no function attached to that listener.
if (this._events) {
var listeners = this._events[type];
if (listeners) {
this._firingCount = (this._firingCount + 1) || 1;
for (var i = 0, len = listeners.length; i < len; i++) {
var l = listeners[i];
l.fn.call(l.ctx || this, event);
}
this._firingCount--;
}
}
I believe that I was able to trace the issue back to the MaplibreGLLayer.js module where the getEvents function references the "private" function _resize. However, this function does not exist in the MaplibreGLLayer.js.
return {
...
resize: this._resize
};
},
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.
leaflet-src.js:588 Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'call')
at NewClass.fire (leaflet-src.js:588:1)
at NewClass.invalidateSize (leaflet-src.js:3575:1)
at Object.invalidateModalMapSize (modalMap.js:61:1)
...
### System Info
```shell
- leaflet: 1.7.1
- maplibre-gl: 2.4.0
- esri-leaflet: 3.0.8
- esri-leaflet-vector: 4.0.0
Additional Information
I am using Gulp to bundle for my production app.
The text was updated successfully, but these errors were encountered:
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.
The text was updated successfully, but these errors were encountered: