From d0c1049e1c3987507cc4945392b3082d680d9383 Mon Sep 17 00:00:00 2001 From: Gabriel <74922336+sheeley820@users.noreply.github.com> Date: Wed, 15 Nov 2023 10:54:52 -0500 Subject: [PATCH] Reference GL Map resize function in place of undefined reference --- src/MaplibreGLLayer.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/MaplibreGLLayer.js b/src/MaplibreGLLayer.js index 4184187..096ccf0 100644 --- a/src/MaplibreGLLayer.js +++ b/src/MaplibreGLLayer.js @@ -82,7 +82,7 @@ export var MaplibreGLJSLayer = Layer.extend({ getEvents: function () { return { move: this._throttledUpdate, // sensibly throttle updating while panning - zoomanim: this._animateZoom, // applys the zoom animation to the + zoomanim: this._animateZoom, // applies the zoom animation to the zoom: this._pinchZoom, // animate every zoom event for smoother pinch-zooming zoomstart: this._zoomStart, // flag starting a zoom to disable panning zoomend: this._zoomEnd, @@ -131,6 +131,10 @@ export var MaplibreGLJSLayer = Layer.extend({ : 'tilePane'; }, + _resize: function () { + return this._glMap._resize; + }, + _initContainer: function () { if (this._container) { return; @@ -198,7 +202,7 @@ export var MaplibreGLJSLayer = Layer.extend({ }, _update: function (e) { - // update the offset so we can correct for it later when we zoom + // update the offset, so we can correct for it later when we zoom this._offset = this._map.containerPointToLayerPoint([0, 0]); if (this._zooming) {