Closed slead closed 7 years ago
ugh. thanks for the report.
and the map becomes unresponsive to further panning.
i can definitely reproduce the console error, but when i load this jsbin in Chrome 56, map state isn't affected.
// RasterLayer._update()
if (zoom > this.options.maxZoom || zoom < this.options.minZoom) {
// _currentImage is still defined from previous display (incorrectly)
if (this._currentImage) {
this._currentImage._map.removeLayer(this._currentImage);
}
return;
}
you interested in taking a crack at fixing the bug?
I think this is fixed in master but not in 2.0.7
we got a little sidetracked with other git configuration stuff in #917, but given that it was only 3 weeks ago, this still serves as a testament to how poor my memory is.
@jordanparfitt is correct that the problem is resolved in master
, but it'd be nicer to nullify _currentImage
entirely when appropriate instead of checking for _currentImage._map
if (this._currentImage && this._currentImage._map)
either way i'll tag a new release soon.
Thanks guys. I'll close this for now and will re-test it when the next release is out.
I got around to doing some testing and I'm still getting the remove layer error on _currentImage.
// RasterLayer._update()
if (zoom > this.options.maxZoom || zoom < this.options.minZoom) {
// _currentImage is still defined from previous display (incorrectly)
if (this._currentImage) {
this._currentImage._map.removeLayer(this._currentImage);
}
return;
}
You mentioned nullifying _current image instead of inserting this line:
if (this._currentImage && this._currentImage._map)
Did the nullify part get inserted into 2.0.8?
Did the nullify part get inserted into 2.0.8?
yup. its here.
i just retested @slead's repro case here (and yours in https://github.com/Esri/esri-leaflet/issues/910#issuecomment-274619531) with v2.0.8
and everything looked fine to me. if you are seeing errors, please feel free to log a new issue. i'd be happy to check into it.
My bower file was just jacked up. It works great. Thanks for the quick response.
On Fri, May 19, 2017 at 12:32 PM, john gravois notifications@github.com wrote:
Did the nullify part get inserted into 2.0.8?
yup. its here https://github.com/Esri/esri-leaflet/blob/v2.0.8/src/Layers/RasterLayer.js#L240
i just retested @slead https://github.com/slead's repro case here (and yours in #910 (comment) https://github.com/Esri/esri-leaflet/issues/910#issuecomment-274619531) with v2.0.8 and everything looked fine to me. if you are seeing errors, please feel free to log a new issue. i'd be happy to check into it.
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/Esri/esri-leaflet/issues/927#issuecomment-302778431, or mute the thread https://github.com/notifications/unsubscribe-auth/ABLNpkFJSRoDyHLQuTf-96FcYkz303l3ks5r7eA7gaJpZM4MCiId .
This may be related to https://github.com/Esri/esri-leaflet/issues/910, which is marked as resolved, but I'm seeing this using the demo below, which uses Leaflet 1.0.3 and EsriLeaflet 2.0.7
When using
minZoom
ormaxZoom
on a Dynamic Layer, I'm seeing a fatal error. To reproduce:I'm seeing
Uncaught TypeError: Cannot read property 'removeLayer' of null
, and the map becomes unresponsive to further panning.