From 7ec9629aae9d5fb0e523c2db979c1ea631aafb54 Mon Sep 17 00:00:00 2001 From: xiongjj Date: Fri, 18 Oct 2024 17:06:25 +0800 Subject: [PATCH] =?UTF-8?q?=E3=80=90ut=E3=80=91fix=20ut?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- test/tool/mock_maplibregl_map.js | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/test/tool/mock_maplibregl_map.js b/test/tool/mock_maplibregl_map.js index 05c6e057d..281a56f56 100644 --- a/test/tool/mock_maplibregl_map.js +++ b/test/tool/mock_maplibregl_map.js @@ -20,7 +20,7 @@ function functor(x) { } const Map = function (options) { - const evented = new mapboxgl.Evented(); + const evented = new maplibregl.Evented(); this.on = evented.on; this.once = evented.once; this._update = ()=>{}; @@ -42,12 +42,12 @@ const Map = function (options) { try { this.center = this.options.center - ? new mapboxgl.LngLat(this.options.center.lng, this.options.center.lat) - : new mapboxgl.LngLat(0, 0); + ? new maplibregl.LngLat(this.options.center.lng, this.options.center.lat) + : new maplibregl.LngLat(0, 0); } catch (e) { this.center = this.options.center - ? new mapboxgl.LngLat(this.options.center[0], this.options.center[1]) - : new mapboxgl.LngLat(0, 0); + ? new maplibregl.LngLat(this.options.center[0], this.options.center[1]) + : new maplibregl.LngLat(0, 0); } this.resize = function () {}; this.style = { @@ -189,7 +189,7 @@ const Map = function (options) { this.getBounds = function () { return ( this.bounds || - mapboxgl.LngLatBounds.convert([ + maplibregl.LngLatBounds.convert([ [-180, -90], [180, 90] ]) @@ -206,9 +206,9 @@ const Map = function (options) { }; this.setCenter = function (x) { if (x instanceof Array) { - this.center = new mapboxgl.LngLat(x[0], x[1]); + this.center = new maplibregl.LngLat(x[0], x[1]); } else if (x instanceof Object) { - this.center = new mapboxgl.LngLat(x.lng, x.lat); + this.center = new maplibregl.LngLat(x.lng, x.lat); } }; @@ -266,7 +266,7 @@ const Map = function (options) { }; }; this.unproject = function (point) { - return new mapboxgl.LngLat(-73.9876, 40.7661); + return new maplibregl.LngLat(-73.9876, 40.7661); }; this.queryRenderedFeatures = function (pointOrBox, queryParams) {