Skip to content

Instantly share code, notes, and snippets.

@mourner
Created October 15, 2015 20:37
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mourner/0da2217cf18d586c4346 to your computer and use it in GitHub Desktop.
Save mourner/0da2217cf18d586c4346 to your computer and use it in GitHub Desktop.
Temporary workaround for Leaflet 0.7.5 disappearing tiles on iOS
L.Map.prototype._onZoomTransitionEnd = function () {
if (!this._animatingZoom) { return; }
this._animatingZoom = false;
L.DomUtil.removeClass(this._mapPane, 'leaflet-zoom-anim');
L.Util.requestAnimFrame(function () {
this._resetView(this._animateToCenter, this._animateToZoom, true, true);
if (L.Draggable) {
L.Draggable._disabled = false;
}
}, this);
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment