tileserver-gl-light 5.5.0-pre.6 → 5.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,62 +1,73 @@
1
1
  # tileserver-gl changelog
2
2
 
3
- ## 5.5.0-pre.6
4
- * Add S3 support for PMTiles with multiple AWS credential profiles (https://github.com/maptiler/tileserver-gl/pull/1779) by @acalcutt
5
- * Create .aws directory passthrough folder in Dockerfile (https://github.com/maptiler/tileserver-gl/pull/1784) by @acalcutt
6
- * Update eslint to v9 (https://github.com/maptiler/tileserver-gl/pull/1473) by @acalcutt
7
- * Fix Renderer Crashes from Failed Fetches (https://github.com/maptiler/tileserver-gl/pull/1798) by @acalcutt
8
- * Add Visual Regression Tests for Static Image Overlays (https://github.com/maptiler/tileserver-gl/pull/1792) by @acalcutt
9
- * Fix S3 URL parsing for nested paths in AWS buckets (https://github.com/maptiler/tileserver-gl/pull/1819) by @acalcutt
10
- * Fix Renderer Crashes and Memory Leak (https://github.com/maptiler/tileserver-gl/pull/1825) by @acalcutt
11
- * Fix loading local data sources (PMTiles/MBTiles) specified in style (https://github.com/maptiler/tileserver-gl/pull/1855) by @acalcutt
12
- * **BREAKING**: Change 'sparse' option default based on tile format - vector tiles (pbf) default to false (204), raster tiles default to true (404 for overzoom) by @acalcutt
3
+ ## master
4
+ ### Features and improvements
5
+ - _...Add new stuff here..._
6
+
7
+ ### 🐞 Bug fixes
8
+ - _...Add new stuff here..._
9
+
10
+ ## 5.5.0
11
+ - Add S3 support for PMTiles with multiple AWS credential profiles (https://github.com/maptiler/tileserver-gl/pull/1779) by @acalcutt
12
+ - Create .aws directory passthrough folder in Dockerfile (https://github.com/maptiler/tileserver-gl/pull/1784) by @acalcutt
13
+ - Update eslint to v9 (https://github.com/maptiler/tileserver-gl/pull/1473) by @acalcutt
14
+ - Fix Renderer Crashes from Failed Fetches (https://github.com/maptiler/tileserver-gl/pull/1798) by @acalcutt
15
+ - Add Visual Regression Tests for Static Image Overlays (https://github.com/maptiler/tileserver-gl/pull/1792) by @acalcutt
16
+ - Fix S3 URL parsing for nested paths in AWS buckets (https://github.com/maptiler/tileserver-gl/pull/1819) by @acalcutt
17
+ - Fix Renderer Crashes and Memory Leak (https://github.com/maptiler/tileserver-gl/pull/1825) by @acalcutt
18
+ - Fix loading local data sources (PMTiles/MBTiles) specified in style (https://github.com/maptiler/tileserver-gl/pull/1855) by @acalcutt
19
+ - Migrate NPM publishing to trusted publishing (OIDC) ([#1872](https://github.com/maptiler/tileserver-gl/pull/1872)) (by [app/copilot-swe-agent](https://github.com/app/copilot-swe-agent)
20
+ - Fix get elevation may return data from wrong point (https://github.com/maptiler/tileserver-gl/pull/1860) by @russellporter @acalcutt
21
+ - Hide xkbcomp warnings ([#1920](https://github.com/maptiler/tileserver-gl/pull/1920)) (by [acalcutt](https://github.com/acalcutt))
22
+ - **BREAKING**: Change 'sparse' option default based on tile format - vector tiles (pbf) default to false (204), raster tiles default to true (404 for overzoom) (https://github.com/maptiler/tileserver-gl/pull/1855) by @acalcutt
23
+ - **BREAKING**: Update Maplibre-Native to v6.3.0. Note that the linux version now requires Ubuntu 24.04 to match the maplibre-native binary. (https://github.com/maptiler/tileserver-gl/pull/1907) by @acalcutt @dependabot
13
24
 
14
25
  ## 5.4.0
15
- * Fix the issue where the tile URL cannot be correctly parsed with the HTTPS protocol when using an nginx proxy service (https://github.com/maptiler/tileserver-gl/pull/1578) by @dakanggo
16
- * Use jemalloc as memory allocator in the docker image (https://github.com/maptiler/tileserver-gl/pull/1574) by @MichielMortier
17
- * Rasters: Add tileSize to TileJSON (https://github.com/maptiler/tileserver-gl/pull/1559) by @roblabs
18
- * Allow a 'sparse' option per data source (https://github.com/maptiler/tileserver-gl/pull/1558) by @acalcutt
19
- * Updates Maplibre-gl-js to v5.6.2 and adds color-relief support (note: this is not yet supported by maplibre-native) (https://github.com/maptiler/tileserver-gl/pull/1591)
20
- * Fix getPublicUrl to handle relative and absolute URLs (https://github.com/maptiler/tileserver-gl/pull/1472) by @Monnte
21
- * Workaround for 'hillshade-method' not yet being suported in maplibre-native (https://github.com/maptiler/tileserver-gl/pull/1620) by @acalcutt
22
- * Updates Maplibre-native to v6.2.0. This should fix the macos metal support in Issue: (https://github.com/maptiler/tileserver-gl/issues/1402)
26
+ - Fix the issue where the tile URL cannot be correctly parsed with the HTTPS protocol when using an nginx proxy service (https://github.com/maptiler/tileserver-gl/pull/1578) by @dakanggo
27
+ - Use jemalloc as memory allocator in the docker image (https://github.com/maptiler/tileserver-gl/pull/1574) by @MichielMortier
28
+ - Rasters: Add tileSize to TileJSON (https://github.com/maptiler/tileserver-gl/pull/1559) by @roblabs
29
+ - Allow a 'sparse' option per data source (https://github.com/maptiler/tileserver-gl/pull/1558) by @acalcutt
30
+ - Updates Maplibre-gl-js to v5.6.2 and adds color-relief support (note: this is not yet supported by maplibre-native) (https://github.com/maptiler/tileserver-gl/pull/1591)
31
+ - Fix getPublicUrl to handle relative and absolute URLs (https://github.com/maptiler/tileserver-gl/pull/1472) by @Monnte
32
+ - Workaround for 'hillshade-method' not yet being suported in maplibre-native (https://github.com/maptiler/tileserver-gl/pull/1620) by @acalcutt
33
+ - Updates Maplibre-native to v6.2.0. This should fix the macos metal support in Issue: (https://github.com/maptiler/tileserver-gl/issues/1402)
23
34
 
24
35
  ## 5.3.0
25
- * Fix - Include public\resources js files on npm publish by specifying included files in package.json (https://github.com/maptiler/tileserver-gl/pull/1490) by @acalcutt
26
- * Fix - Various Updates and Fix RTL Plugin Load (https://github.com/maptiler/tileserver-gl/pull/1489) by @okimiko
27
- * Updates Maplibre-gl-js to v5 and adds globe support.
36
+ - Fix - Include public\resources js files on npm publish by specifying included files in package.json (https://github.com/maptiler/tileserver-gl/pull/1490) by @acalcutt
37
+ - Fix - Various Updates and Fix RTL Plugin Load (https://github.com/maptiler/tileserver-gl/pull/1489) by @okimiko
38
+ - Updates Maplibre-gl-js to v5 and adds globe support.
28
39
 
29
40
  ## 5.2.1
30
- * Fix invalid Delete of 'prepare' Script required for Light Build (https://github.com/maptiler/tileserver-gl/pull/1489) by @okimiko
41
+ - Fix invalid Delete of 'prepare' Script required for Light Build (https://github.com/maptiler/tileserver-gl/pull/1489) by @okimiko
31
42
 
32
43
 
33
44
  ## 5.2.0
34
- * Use npm packages for public/resources (https://github.com/maptiler/tileserver-gl/pull/1427) by @okimiko
35
- * use ttf files of googlefonts/opensans (https://github.com/maptiler/tileserver-gl/pull/1447) by @okimiko
36
- * Limit Elevation Lat/Long Output Length (https://github.com/maptiler/tileserver-gl/pull/1457) by @okimiko
37
- * Fetch style from url (https://github.com/maptiler/tileserver-gl/pull/1462) by @YoelRidgway
38
- * fix: memory leak on SIGHUP (https://github.com/maptiler/tileserver-gl/pull/1455) by @okimiko
39
- * fix: resolves Unimplemented type: 3 error for geojson format (https://github.com/maptiler/tileserver-gl/pull/1465) by @rjdjohnston
40
- * fix: Test light version in ct workflow - fix sqlite build in light (https://github.com/maptiler/tileserver-gl/pull/1477) by @acalcutt
41
- * fix: light version docker entrypoint permissions (https://github.com/maptiler/tileserver-gl/pull/1478) by @acalcutt
45
+ - Use npm packages for public/resources (https://github.com/maptiler/tileserver-gl/pull/1427) by @okimiko
46
+ - use ttf files of googlefonts/opensans (https://github.com/maptiler/tileserver-gl/pull/1447) by @okimiko
47
+ - Limit Elevation Lat/Long Output Length (https://github.com/maptiler/tileserver-gl/pull/1457) by @okimiko
48
+ - Fetch style from url (https://github.com/maptiler/tileserver-gl/pull/1462) by @YoelRidgway
49
+ - fix: memory leak on SIGHUP (https://github.com/maptiler/tileserver-gl/pull/1455) by @okimiko
50
+ - fix: resolves Unimplemented type: 3 error for geojson format (https://github.com/maptiler/tileserver-gl/pull/1465) by @rjdjohnston
51
+ - fix: Test light version in ct workflow - fix sqlite build in light (https://github.com/maptiler/tileserver-gl/pull/1477) by @acalcutt
52
+ - fix: light version docker entrypoint permissions (https://github.com/maptiler/tileserver-gl/pull/1478) by @acalcutt
42
53
 
43
54
  ## 5.1.3
44
- * Fix SIGHUP (broken since 5.1.x) (https://github.com/maptiler/tileserver-gl/pull/1452) by @okimiko
55
+ - Fix SIGHUP (broken since 5.1.x) (https://github.com/maptiler/tileserver-gl/pull/1452) by @okimiko
45
56
 
46
57
  ## 5.1.2
47
- * Fix broken light (invalid use of heavy dependencies) (https://github.com/maptiler/tileserver-gl/pull/1449) by @okimiko
58
+ - Fix broken light (invalid use of heavy dependencies) (https://github.com/maptiler/tileserver-gl/pull/1449) by @okimiko
48
59
 
49
60
  ## 5.1.1
50
- * Fix wrong node version in Docker image (https://github.com/maptiler/tileserver-gl/pull/1442) by @acalcutt
61
+ - Fix wrong node version in Docker image (https://github.com/maptiler/tileserver-gl/pull/1442) by @acalcutt
51
62
 
52
63
  ## 5.1.0
53
- * Update recommended node to v22 + Update docker images to use node 22 (https://github.com/maptiler/tileserver-gl/pull/1438) by @acalcutt
54
- * Upgrade Express to v5 + Canvas to v3 + code cleanup (https://github.com/maptiler/tileserver-gl/pull/1429) by @acalcutt
55
- * Terrain Preview and simple Elevation Query (https://github.com/maptiler/tileserver-gl/pull/1425 and https://github.com/maptiler/tileserver-gl/pull/1432) by @okimiko
56
- * add progressive rendering option for static jpeg images (#1397) by @samuel-git
64
+ - Update recommended node to v22 + Update docker images to use node 22 (https://github.com/maptiler/tileserver-gl/pull/1438) by @acalcutt
65
+ - Upgrade Express to v5 + Canvas to v3 + code cleanup (https://github.com/maptiler/tileserver-gl/pull/1429) by @acalcutt
66
+ - Terrain Preview and simple Elevation Query (https://github.com/maptiler/tileserver-gl/pull/1425 and https://github.com/maptiler/tileserver-gl/pull/1432) by @okimiko
67
+ - add progressive rendering option for static jpeg images (#1397) by @samuel-git
57
68
 
58
69
  ## 5.0.0
59
- * Update Maplibre-Native to [v6.0.0](https://github.com/maplibre/maplibre-native/releases/tag/node-v6.0.0) release by @acalcutt in https://github.com/maptiler/tileserver-gl/pull/1376 and @dependabot in https://github.com/maptiler/tileserver-gl/pull/1381
60
- * This first release that use Metal for rendering instead of OpenGL (ES) for macOS.
61
- * This the first release that uses OpenGL (ES) 3.0 on Windows and Linux
62
- * Note: Windows users may need to update their [c++ redistributable ](https://learn.microsoft.com/en-us/cpp/windows/latest-supported-vc-redist?view=msvc-170) for maplibre-native v6.0.0
70
+ - Update Maplibre-Native to [v6.0.0](https://github.com/maplibre/maplibre-native/releases/tag/node-v6.0.0) release by @acalcutt in https://github.com/maptiler/tileserver-gl/pull/1376 and @dependabot in https://github.com/maptiler/tileserver-gl/pull/1381
71
+ - This first release that use Metal for rendering instead of OpenGL (ES) for macOS.
72
+ - This the first release that uses OpenGL (ES) 3.0 on Windows and Linux
73
+ - Note: Windows users may need to update their [c++ redistributable ](https://learn.microsoft.com/en-us/cpp/windows/latest-supported-vc-redist?view=msvc-170) for maplibre-native v6.0.0
@@ -100,13 +100,23 @@ Source data
100
100
 
101
101
  * TileJSON at ``/data/{id}.json``
102
102
 
103
- * If terrain mbtile data is served and ``encoding`` is configured (see config) the elevation can be queried
103
+ * If terrain mbtile data is served and ``encoding`` is configured (see config) the elevation can be queried
104
104
 
105
105
  * by ``/data/{id}/elevation/{z}/{x}/{y}`` for the tile
106
106
 
107
107
  * or ``/data/{id}/elevation/{z}/{long}/{lat}`` for the coordinate
108
108
 
109
- * the result will be a json object like ``{"z":7,"x":68,"y":45,"red":134,"green":66,"blue":0,"latitude":11.84069,"longitude":46.04798,"elevation":1602}``
109
+ * the result will be a json object like ``{"z":7,"x":68,"y":45,"long":46.04798,"lat":11.84069,"elevation":1602,"pixelX":128,"pixelY":256}``
110
+
111
+ * for batch requests, POST to ``/data/{id}/elevation`` with a JSON body:
112
+
113
+ * Request: ``{"points": [{"lon": 45.5, "lat": 45.5, "z": 1}, ...]}``
114
+ * Response: ``[500, 200, null, ...]`` - array of elevations (or null if no data) in the same order as input
115
+
116
+ * for batch requests, POST to ``/data/{id}/elevation`` with a JSON body:
117
+
118
+ * Request: ``{"points": [{"lon": 45.5, "lat": 45.5, "z": 1}, ...]}``
119
+ * Response: ``[500, 200, null, ...]`` - array of elevations (or null if no data) in the same order as input
110
120
 
111
121
  * The elevation api is not available in the ``tileserver-gl-light`` version.
112
122
 
@@ -21,11 +21,11 @@ npm is supported on the following platforms with `Native Dependencies <#id1>`_ i
21
21
 
22
22
  - Operating systems:
23
23
 
24
- - Ubuntu 22.04 (x64/arm64)
25
- - macOS 14 (x64/arm64)
24
+ - Ubuntu 24.04 (x64/arm64)
25
+ - macOS 15 (x64/arm64)
26
26
  - Windows (x64)
27
27
 
28
- - Node.js 18(>=18.17.0),20,22
28
+ - Node.js 20,22,24
29
29
 
30
30
  Install globally from npmjs.
31
31
  ------------------------------
@@ -46,11 +46,11 @@ Install locally from source
46
46
  Native dependencies
47
47
  -------------------
48
48
 
49
- Ubuntu 22.04 (x64/arm64)
49
+ Ubuntu 24.04 (x64/arm64)
50
50
  ~~~~~~~~~~~~~~~~~~~~~~~~~~
51
- - apt install build-essential pkg-config xvfb libglfw3-dev libuv1-dev libjpeg-turbo8 libicu70 libcairo2-dev libpango1.0-dev libjpeg-dev libgif-dev librsvg2-dev gir1.2-rsvg-2.0 librsvg2-2 librsvg2-common libcurl4-openssl-dev libpixman-1-dev libpixman-1-0
51
+ - apt install build-essential python3-setuptools pkg-config xvfb libglfw3-dev libuv1-dev libjpeg-turbo8 libicu-dev libcairo2-dev libpango1.0-dev libpng-dev libjpeg-dev libgif-dev librsvg2-dev librsvg2-dev libcurl4-openssl-dev libpixman-1-dev
52
52
 
53
- MacOS 14 (x64/arm64)
53
+ MacOS 15 (x64/arm64)
54
54
  ~~~~~~~~~~~~~~~~~~~~~~
55
55
  - brew install pkg-config cairo pango libpng jpeg giflib librsvg harfbuzz
56
56
 
package/package.json CHANGED
@@ -1,9 +1,11 @@
1
1
  {
2
2
  "name": "tileserver-gl-light",
3
- "version": "5.5.0-pre.6",
3
+ "version": "5.5.0",
4
4
  "description": "Map tile server for JSON GL styles - serving vector tiles",
5
5
  "main": "src/main.js",
6
- "bin": "src/main.js",
6
+ "bin": {
7
+ "tileserver-gl": "src/main.js"
8
+ },
7
9
  "type": "module",
8
10
  "files": [
9
11
  "docs",
@@ -35,18 +37,18 @@
35
37
  "docker": "docker build . && docker run --rm -i -p 8080:8080 $(docker build -q .)"
36
38
  },
37
39
  "dependencies": {
38
- "@aws-sdk/client-s3": "^3.946.0",
40
+ "@aws-sdk/client-s3": "^3.962.0",
39
41
  "@jsse/pbfont": "^0.3.0",
40
42
  "@mapbox/mapbox-gl-rtl-text": "0.3.0",
41
43
  "@mapbox/mbtiles": "0.12.1",
42
44
  "@mapbox/polyline": "^1.2.1",
43
45
  "@mapbox/sphericalmercator": "2.0.2",
44
46
  "@mapbox/vector-tile": "2.0.4",
45
- "@maplibre/maplibre-gl-inspect": "1.8.1",
46
- "@maplibre/maplibre-gl-style-spec": "24.3.1",
47
+ "@maplibre/maplibre-gl-inspect": "1.8.2",
48
+ "@maplibre/maplibre-gl-style-spec": "24.4.1",
47
49
  "@sindresorhus/fnv1a": "3.1.0",
48
50
  "advanced-pool": "0.3.3",
49
- "chokidar": "4.0.3",
51
+ "chokidar": "5.0.0",
50
52
  "clone": "2.1.2",
51
53
  "color": "5.0.3",
52
54
  "commander": "14.0.2",
@@ -57,10 +59,10 @@
57
59
  "http-shutdown": "1.2.2",
58
60
  "leaflet": "1.9.4",
59
61
  "leaflet-hash": "0.2.1",
60
- "maplibre-gl": "5.14.0",
62
+ "maplibre-gl": "5.15.0",
61
63
  "morgan": "1.10.1",
62
64
  "pbf": "4.0.1",
63
- "pmtiles": "4.3.0",
65
+ "pmtiles": "4.3.2",
64
66
  "proj4": "2.20.2",
65
67
  "sanitize-filename": "1.6.3",
66
68
  "semver": "^7.7.3",
@@ -1,6 +1,38 @@
1
1
  class ElevationInfoControl {
2
2
  constructor(options) {
3
3
  this.url = options["url"];
4
+ this.originalTerrain = null;
5
+ this.suppressDEMErrors = true;
6
+ this.setupErrorHandler();
7
+ }
8
+
9
+ setupErrorHandler() {
10
+ // Suppress DEM out-of-range errors that occur when placing markers at coordinates outside DEM coverage
11
+ const originalHandler = window.onerror;
12
+ window.onerror = (msg, url, line, col, error) => {
13
+ if (error && error.message && error.message.includes('out of range source coordinates for DEM data')) {
14
+ console.warn("DEM coordinate out of range (suppressed):", error);
15
+ return true; // Suppress the error
16
+ }
17
+ // Call original handler if it exists
18
+ if (typeof originalHandler === 'function') {
19
+ return originalHandler(msg, url, line, col, error);
20
+ }
21
+ };
22
+
23
+ // Also suppress promise rejections for DEM errors
24
+ const originalHandler2 = window.onunhandledrejection;
25
+ window.onunhandledrejection = (event) => {
26
+ if (event.reason && event.reason.message && event.reason.message.includes('out of range source coordinates for DEM data')) {
27
+ console.warn("DEM coordinate out of range (suppressed):", event.reason);
28
+ event.preventDefault();
29
+ return true;
30
+ }
31
+ // Call original handler if it exists
32
+ if (typeof originalHandler2 === 'function') {
33
+ return originalHandler2(event);
34
+ }
35
+ };
4
36
  }
5
37
 
6
38
  getDefaultPosition() {
@@ -10,6 +42,7 @@ class ElevationInfoControl {
10
42
 
11
43
  onAdd(map) {
12
44
  this.map = map;
45
+ this.originalTerrain = map.getTerrain();
13
46
  this.controlContainer = document.createElement("div");
14
47
  this.controlContainer.classList.add("maplibregl-ctrl");
15
48
  this.controlContainer.classList.add("maplibregl-ctrl-group");
@@ -19,29 +52,49 @@ class ElevationInfoControl {
19
52
  this.marker = new maplibregl.Marker();
20
53
 
21
54
  map.on('click', (e) => {
55
+ if (!map.transform.isPointOnMapSurface(e.point)) {
56
+ this.controlContainer.textContent = "Elevation: Click on Globe";
57
+ return;
58
+ }
59
+
22
60
  var url = this.url;
23
- var coord = {"z": Math.floor(map.getZoom()), "x": e.lngLat["lng"].toFixed(7), "y": e.lngLat["lat"].toFixed(7)};
24
- if (map.transform.isPointOnMapSurface(e.point)) {
25
- for(var key in coord) {
26
- url = url.replace(new RegExp('{'+ key +'}','g'), coord[key]);
27
- }
61
+ var lngLat = e.lngLat;
62
+
63
+ // Validate coordinates are within valid range
64
+ if (typeof lngLat !== 'object' || typeof lngLat.lng !== 'number' || typeof lngLat.lat !== 'number') {
65
+ this.controlContainer.textContent = "Elevation: Invalid coordinates";
66
+ return;
67
+ }
28
68
 
29
- this.marker.remove();
30
- this.marker.setLngLat(e.lngLat).addTo(this.map);
31
-
32
- let request = new XMLHttpRequest();
33
- request.open("GET", url, true);
34
- request.onload = () => {
35
- if (request.status !== 200) {
36
- this.controlContainer.textContent = "Elevation: No value";
37
- } else {
38
- this.controlContainer.textContent = `Elevation: ${JSON.parse(request.responseText).elevation} (${JSON.stringify(coord)})`;
39
- }
40
- };
41
- request.send();
42
- } else {
43
- this.controlContainer.textContent = "Elevation: Click on Globe";
69
+ var coord = {"z": Math.floor(map.getZoom()), "x": lngLat.lng.toFixed(7), "y": lngLat.lat.toFixed(7)};
70
+
71
+ for(var key in coord) {
72
+ url = url.replace(new RegExp('{'+ key +'}','g'), coord[key]);
73
+ }
74
+
75
+ try {
76
+ if (this.marker) {
77
+ this.marker.remove();
78
+ }
79
+
80
+ this.marker = new maplibregl.Marker();
81
+ this.marker.setLngLat({lng: lngLat.lng, lat: lngLat.lat});
82
+ this.marker.addTo(this.map);
83
+ } catch (_err) {
84
+ // If placement fails, continue without marker
85
+ console.error("Marker placement error:", _err);
44
86
  }
87
+
88
+ let request = new XMLHttpRequest();
89
+ request.open("GET", url, true);
90
+ request.onload = () => {
91
+ if (request.status !== 200) {
92
+ this.controlContainer.textContent = "Elevation: No value";
93
+ } else {
94
+ this.controlContainer.textContent = `Elevation: ${JSON.parse(request.responseText).elevation} (${JSON.stringify(coord)})`;
95
+ }
96
+ };
97
+ request.send();
45
98
  });
46
99
  return this.controlContainer;
47
100
  }
@@ -55,8 +108,17 @@ class ElevationInfoControl {
55
108
  return;
56
109
  }
57
110
  this.controlContainer.parentNode.removeChild(this.controlContainer);
111
+
112
+ // Restore terrain if it was originally enabled
113
+ if (this.originalTerrain && !this.map.getTerrain()) {
114
+ this.map.setTerrain(this.originalTerrain);
115
+ }
116
+
117
+ if (this.marker) {
118
+ this.marker.remove();
119
+ this.marker = undefined;
120
+ }
121
+
58
122
  this.map = undefined;
59
- this.marker.remove();
60
- this.marker = undefined;
61
123
  }
62
124
  };