Error on zoom
Closed this issue · 3 comments
Hi, I'm using leaflet 1.0 and the corresponding version of this plugin, however, I get errors, and they seem to be generated by the following code:
L.Renderer.include({
_updateTransform: function () {
var zoom = this._map.getZoom();
var center = this._map.getCenter(true);
var scale = this._map.getZoomScale(zoom, this._zoom);
var offset = this._map._latLngToNewLayerPoint(this._topLeft, zoom, center);
L.DomUtil.setTransform(this._container, offset, scale);
}
});
this._topLeft is undefined, which propably creates the error.
Hi !
This issue should be solved by this pull request
(Thx to helbling)
Could you try again with this commit ?
Thx
When I change the code, the zoom works as intended, however something strange now happens to my map. I have a baselayer switch on my map to switch between a coloured open street map and a (css) greyscale map. Standard this greyscale map is put on first. By changing the code, the css class isn't applied on the layer. The original version with your old code can be seen here : www.backtothemap.be
nevermind, I've found the little culprit :p I added 1 line of code to make sure I got an id on the images so I could put some css on that id :p working good now :)