From fcf9de866b158a649c81b99c8dbcc74c7da95ac7 Mon Sep 17 00:00:00 2001 From: Holger Stolzenberg Date: Mon, 4 Mar 2024 19:35:54 +0100 Subject: [PATCH] [NON_COMPLETE] Completely replace Leaflet with deck.gl --- README.md | 5 +- angular.json | 8 +- package-lock.json | 805 ++++++++++++++++++++++++++-- package.json | 7 +- src/app/map/map.component.html | 8 +- src/app/map/map.component.ts | 206 +++---- src/app/map/map.constants.ts | 106 ++-- src/app/map/map.module.ts | 2 - src/app/map/map.service.ts | 48 +- src/assets/styles/leaflet.scss | 60 --- src/assets/styles/main.scss | 1 - src/environments/environment.dev.ts | 2 +- src/environments/environment.ts | 6 +- 13 files changed, 968 insertions(+), 296 deletions(-) delete mode 100644 src/assets/styles/leaflet.scss diff --git a/README.md b/README.md index a1afa64..29ac84e 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ ## 🚀 Introduction -This is just a small sample project to get up to date with Angular and learn some Leaflet stuff. +This is just a small sample project to get up to date with Angular and learn some [deck.gl](https://deck.gl) stuff. ## 🫡 Commands @@ -32,8 +32,7 @@ docker run [-it] -p8080:8080 -p2019:2019 holgerstolzenberg/cities-of-europe - ☑️Add user interactions for layer control - ☑️Expandable toolbar - ☑️Own location finder -- Discover Leaflet plugins -- Weather overlays +- Weather or other overlays, distance to cities - Smoother map animation (only mac chrome so far, retina) - ☑️Add loading indicator diff --git a/angular.json b/angular.json index 2f863a2..f9c4315 100644 --- a/angular.json +++ b/angular.json @@ -51,15 +51,9 @@ "inlineStyleLanguage": "scss", "assets": [ "src/favicon.ico", - "src/assets", - { - "glob": "**/*", - "input": "node_modules/leaflet/dist/images/", - "output": "./assets/leaflet" - } + "src/assets" ], "styles": [ - "node_modules/leaflet/dist/leaflet.css", "node_modules/ngx-toastr/toastr.css", "src/assets/styles/main.scss" ], diff --git a/package-lock.json b/package-lock.json index 056bb62..a24b14f 100644 --- a/package-lock.json +++ b/package-lock.json @@ -17,10 +17,12 @@ "@angular/material": "17.1.2", "@angular/platform-browser": "17.1.2", "@angular/platform-browser-dynamic": "17.1.2", - "@asymmetrik/ngx-leaflet": "17.0.0", + "@deck.gl/core": "8.9.35", + "@deck.gl/geo-layers": "8.9.35", + "@deck.gl/layers": "8.9.35", + "@luma.gl/core": "8.5.21", "@ngneat/transloco": "6.0.4", "@ngneat/transloco-preload-langs": "5.0.1", - "leaflet": "1.9.4", "ngx-logger": "5.0.12", "ngx-toastr": "18.0.0", "rxjs": "~7.8.0", @@ -36,7 +38,6 @@ "@angular-eslint/template-parser": "17.2.1", "@angular/cli": "17.1.2", "@angular/compiler-cli": "17.1.2", - "@types/leaflet": "1.9.8", "@typescript-eslint/eslint-plugin": "6.21.0", "@typescript-eslint/parser": "6.21.0", "eslint": "8.56.0", @@ -901,19 +902,6 @@ "@angular/platform-browser": "17.1.2" } }, - "node_modules/@asymmetrik/ngx-leaflet": { - "version": "17.0.0", - "resolved": "https://registry.npmjs.org/@asymmetrik/ngx-leaflet/-/ngx-leaflet-17.0.0.tgz", - "integrity": "sha512-Tg09780yg1pPRR7k9Z0B0Fb3Mr4SMXYfi+hii8S0McHiqiUqkB+ZhhB4hJq83v4cuvcYgZjtkz+p06lCJY/z+w==", - "dependencies": { - "tslib": "^2.3.0" - }, - "peerDependencies": { - "@angular/common": "17", - "@angular/core": "17", - "leaflet": "1" - } - }, "node_modules/@babel/code-frame": { "version": "7.23.5", "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.23.5.tgz", @@ -2588,7 +2576,6 @@ "version": "7.23.9", "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.23.9.tgz", "integrity": "sha512-0CX6F+BI2s9dkUqr08KFrAIZgNFj75rdBU/DjCyYLIaV/quFjkk6T+EJ2LkZHyZTbEV4L5p97mNkUsHl2wLFAw==", - "dev": true, "dependencies": { "regenerator-runtime": "^0.14.0" }, @@ -2645,6 +2632,116 @@ "node": ">=6.9.0" } }, + "node_modules/@deck.gl/core": { + "version": "8.9.35", + "resolved": "https://registry.npmjs.org/@deck.gl/core/-/core-8.9.35.tgz", + "integrity": "sha512-xOASWScUCB5fpfuSjPaJrwas8pCJpbKXNIfwQElhvnfP3Yk8GGkAcRbPgiPNCfpkbEno7eDpAWJt6+6UJsSp9g==", + "dependencies": { + "@babel/runtime": "^7.0.0", + "@loaders.gl/core": "^3.4.13", + "@loaders.gl/images": "^3.4.13", + "@luma.gl/constants": "^8.5.21", + "@luma.gl/core": "^8.5.21", + "@luma.gl/webgl": "^8.5.21", + "@math.gl/core": "^3.6.2", + "@math.gl/sun": "^3.6.2", + "@math.gl/web-mercator": "^3.6.2", + "@probe.gl/env": "^3.5.0", + "@probe.gl/log": "^3.5.0", + "@probe.gl/stats": "^3.5.0", + "gl-matrix": "^3.0.0", + "math.gl": "^3.6.2", + "mjolnir.js": "^2.7.0" + } + }, + "node_modules/@deck.gl/extensions": { + "version": "8.9.35", + "resolved": "https://registry.npmjs.org/@deck.gl/extensions/-/extensions-8.9.35.tgz", + "integrity": "sha512-qMZzeQpvtcw4zbh4HJJIF8Q73/u0Unwwe8aSC2r+apjuyUVPQInwlCil++LznBY3JA37M7SvW2TSK6IgCuaSyA==", + "peer": true, + "dependencies": { + "@babel/runtime": "^7.0.0", + "@luma.gl/shadertools": "^8.5.21" + }, + "peerDependencies": { + "@deck.gl/core": "^8.0.0", + "@luma.gl/constants": "^8.0.0", + "@luma.gl/core": "^8.0.0", + "@math.gl/core": "^3.6.2", + "@math.gl/web-mercator": "^3.6.2", + "gl-matrix": "^3.0.0" + } + }, + "node_modules/@deck.gl/geo-layers": { + "version": "8.9.35", + "resolved": "https://registry.npmjs.org/@deck.gl/geo-layers/-/geo-layers-8.9.35.tgz", + "integrity": "sha512-7sczznSjC7GjpDxuXPvPN7/WbVgSYHnFNNyWr8hMGm/WlUMK4z9QpZo6UFvrHL5rQ5Uudd4vD56xB1fs3b2lMA==", + "dependencies": { + "@babel/runtime": "^7.0.0", + "@loaders.gl/3d-tiles": "^3.4.13", + "@loaders.gl/gis": "^3.4.13", + "@loaders.gl/loader-utils": "^3.4.13", + "@loaders.gl/mvt": "^3.4.13", + "@loaders.gl/schema": "^3.4.13", + "@loaders.gl/terrain": "^3.4.13", + "@loaders.gl/tiles": "^3.4.13", + "@loaders.gl/wms": "^3.4.13", + "@luma.gl/constants": "^8.5.21", + "@luma.gl/experimental": "^8.5.21", + "@math.gl/core": "^3.6.2", + "@math.gl/culling": "^3.6.2", + "@math.gl/web-mercator": "^3.6.2", + "@types/geojson": "^7946.0.8", + "h3-js": "^3.7.0", + "long": "^3.2.0" + }, + "peerDependencies": { + "@deck.gl/core": "^8.0.0", + "@deck.gl/extensions": "^8.0.0", + "@deck.gl/layers": "^8.0.0", + "@deck.gl/mesh-layers": "^8.0.0", + "@loaders.gl/core": "^3.4.13", + "@luma.gl/core": "^8.0.0" + } + }, + "node_modules/@deck.gl/layers": { + "version": "8.9.35", + "resolved": "https://registry.npmjs.org/@deck.gl/layers/-/layers-8.9.35.tgz", + "integrity": "sha512-4amaGO+tGvaCNi2KZ90twmajGh5xUAaQzBIyh42dnM10GRj/62sOIYD9uT032oV/KpjKY+TfOstx5ooXBGKDjg==", + "dependencies": { + "@babel/runtime": "^7.0.0", + "@loaders.gl/images": "^3.4.13", + "@loaders.gl/schema": "^3.4.13", + "@luma.gl/constants": "^8.5.21", + "@mapbox/tiny-sdf": "^2.0.5", + "@math.gl/core": "^3.6.2", + "@math.gl/polygon": "^3.6.2", + "@math.gl/web-mercator": "^3.6.2", + "earcut": "^2.2.4" + }, + "peerDependencies": { + "@deck.gl/core": "^8.0.0", + "@loaders.gl/core": "^3.4.13", + "@luma.gl/core": "^8.0.0" + } + }, + "node_modules/@deck.gl/mesh-layers": { + "version": "8.9.35", + "resolved": "https://registry.npmjs.org/@deck.gl/mesh-layers/-/mesh-layers-8.9.35.tgz", + "integrity": "sha512-0l7+zi/6bkYVz7zZ0J4+WLoxOh+hFMPUQKCujTOcqYWbvJ2fEQze0Z1ZHCAG0RQOFJITEMamDigo9dN2BMxPBA==", + "peer": true, + "dependencies": { + "@babel/runtime": "^7.0.0", + "@loaders.gl/gltf": "^3.4.13", + "@luma.gl/constants": "^8.5.21", + "@luma.gl/experimental": "^8.5.21", + "@luma.gl/shadertools": "^8.5.21" + }, + "peerDependencies": { + "@deck.gl/core": "^8.0.0", + "@luma.gl/core": "^8.0.0" + } + }, "node_modules/@discoveryjs/json-ext": { "version": "0.5.7", "resolved": "https://registry.npmjs.org/@discoveryjs/json-ext/-/json-ext-0.5.7.tgz", @@ -3433,6 +3530,331 @@ "node": ">= 0.4" } }, + "node_modules/@loaders.gl/3d-tiles": { + "version": "3.4.14", + "resolved": "https://registry.npmjs.org/@loaders.gl/3d-tiles/-/3d-tiles-3.4.14.tgz", + "integrity": "sha512-cxStTSLIJgRZnkTBYTcp9FPVBQWQlJMzW1LRlaKWiwAHkOKBElszzApIIEvRvZGSrs8k8TUi6BJ1Y41iiANF7w==", + "dependencies": { + "@loaders.gl/draco": "3.4.14", + "@loaders.gl/gltf": "3.4.14", + "@loaders.gl/loader-utils": "3.4.14", + "@loaders.gl/math": "3.4.14", + "@loaders.gl/tiles": "3.4.14", + "@math.gl/core": "^3.5.1", + "@math.gl/geospatial": "^3.5.1", + "long": "^5.2.1" + }, + "peerDependencies": { + "@loaders.gl/core": "^3.4.0" + } + }, + "node_modules/@loaders.gl/3d-tiles/node_modules/long": { + "version": "5.2.3", + "resolved": "https://registry.npmjs.org/long/-/long-5.2.3.tgz", + "integrity": "sha512-lcHwpNoggQTObv5apGNCTdJrO69eHOZMi4BNC+rTLER8iHAqGrUVeLh/irVIM7zTw2bOXA8T6uNPeujwOLg/2Q==" + }, + "node_modules/@loaders.gl/core": { + "version": "3.4.14", + "resolved": "https://registry.npmjs.org/@loaders.gl/core/-/core-3.4.14.tgz", + "integrity": "sha512-5PFcjv7xC8AYL17juDMrvo8n0Fcwg9s8F4BaM2YCNUsb9RCI2SmLuIFJMcx1GgHO5vL0WiTIKO+JT4n1FuNR6w==", + "dependencies": { + "@babel/runtime": "^7.3.1", + "@loaders.gl/loader-utils": "3.4.14", + "@loaders.gl/worker-utils": "3.4.14", + "@probe.gl/log": "^4.0.1" + } + }, + "node_modules/@loaders.gl/core/node_modules/@probe.gl/env": { + "version": "4.0.7", + "resolved": "https://registry.npmjs.org/@probe.gl/env/-/env-4.0.7.tgz", + "integrity": "sha512-5D8qYQjDtwJDk2ZCniP1qNu8AZquicQy6XKcoQZeEDNwfCVibJ56nKFQuSHvj+p9/GHkUYsv2bTL4xtO6Jxh8A==" + }, + "node_modules/@loaders.gl/core/node_modules/@probe.gl/log": { + "version": "4.0.7", + "resolved": "https://registry.npmjs.org/@probe.gl/log/-/log-4.0.7.tgz", + "integrity": "sha512-89MI1MRQ7wXJuT8TI8Y3B3HyjvzLTFIwD1qhMWHQFXlp+VoQd+ohCOybd4rjYb/lmJ7ZNTd0z+RzeCStzoYbEQ==", + "dependencies": { + "@probe.gl/env": "4.0.7" + } + }, + "node_modules/@loaders.gl/draco": { + "version": "3.4.14", + "resolved": "https://registry.npmjs.org/@loaders.gl/draco/-/draco-3.4.14.tgz", + "integrity": "sha512-HwNFFt+dKZqFtzI0uVGvRkudFEZXxybJ+ZRsNkBbzAWoMM5L1TpuLs6DPsqPQUIT9HXNHzov18cZI0gK5bTJpg==", + "dependencies": { + "@babel/runtime": "^7.3.1", + "@loaders.gl/loader-utils": "3.4.14", + "@loaders.gl/schema": "3.4.14", + "@loaders.gl/worker-utils": "3.4.14", + "draco3d": "1.5.5" + } + }, + "node_modules/@loaders.gl/gis": { + "version": "3.4.14", + "resolved": "https://registry.npmjs.org/@loaders.gl/gis/-/gis-3.4.14.tgz", + "integrity": "sha512-5cmhIwioPpSkfNzFRM3PbFDecjpYIhtEOFbryu3rE37npKHLTD2tF4ocQxUPB+QVED6GLwWBdzJIs64UWGrqjw==", + "dependencies": { + "@loaders.gl/loader-utils": "3.4.14", + "@loaders.gl/schema": "3.4.14", + "@mapbox/vector-tile": "^1.3.1", + "@math.gl/polygon": "^3.5.1", + "pbf": "^3.2.1" + } + }, + "node_modules/@loaders.gl/gltf": { + "version": "3.4.14", + "resolved": "https://registry.npmjs.org/@loaders.gl/gltf/-/gltf-3.4.14.tgz", + "integrity": "sha512-jv+B5S/taiwzXAOu5D9nk1jjU9+JCCr/6/nGguCE2Ya3IX7CI1Nlnp20eKKhW8ZCEokZavMNT0bNbiJ5ahEFjA==", + "dependencies": { + "@loaders.gl/draco": "3.4.14", + "@loaders.gl/images": "3.4.14", + "@loaders.gl/loader-utils": "3.4.14", + "@loaders.gl/textures": "3.4.14", + "@math.gl/core": "^3.5.1" + } + }, + "node_modules/@loaders.gl/images": { + "version": "3.4.14", + "resolved": "https://registry.npmjs.org/@loaders.gl/images/-/images-3.4.14.tgz", + "integrity": "sha512-tL447hTWhOKBOB87SE4hvlC8OkbRT0mEaW1a/wIS9f4HnYDa/ycRLMV+nvdvYMZur4isNPam44oiRqi7GcILkg==", + "dependencies": { + "@loaders.gl/loader-utils": "3.4.14" + } + }, + "node_modules/@loaders.gl/loader-utils": { + "version": "3.4.14", + "resolved": "https://registry.npmjs.org/@loaders.gl/loader-utils/-/loader-utils-3.4.14.tgz", + "integrity": "sha512-HCTY2/F83RLbZWcTvWLVJ1vke3dl6Bye20HU1AqkA37J2vzHwOZ8kj6eee8eeSkIkf7VIFwjyhVJxe0flQE/Bw==", + "dependencies": { + "@babel/runtime": "^7.3.1", + "@loaders.gl/worker-utils": "3.4.14", + "@probe.gl/stats": "^4.0.1" + } + }, + "node_modules/@loaders.gl/loader-utils/node_modules/@probe.gl/stats": { + "version": "4.0.7", + "resolved": "https://registry.npmjs.org/@probe.gl/stats/-/stats-4.0.7.tgz", + "integrity": "sha512-ui9SO/pUgyf7nrTCHM/7jBZo6M8sEsz5+4PE83054ZT6ErWVTLKuQwA5xhxMgNkj2Iu49MO6+DOSDoUU7X28CQ==" + }, + "node_modules/@loaders.gl/math": { + "version": "3.4.14", + "resolved": "https://registry.npmjs.org/@loaders.gl/math/-/math-3.4.14.tgz", + "integrity": "sha512-OBEVX6Q5pMipbCAiZyX2+q1zRd0nw8M2dclpny05on8700OaKMwfs47wEUnbfCU3iyHad3sgsAxN3EIh+kuo9Q==", + "dependencies": { + "@loaders.gl/images": "3.4.14", + "@loaders.gl/loader-utils": "3.4.14", + "@math.gl/core": "^3.5.1" + } + }, + "node_modules/@loaders.gl/mvt": { + "version": "3.4.14", + "resolved": "https://registry.npmjs.org/@loaders.gl/mvt/-/mvt-3.4.14.tgz", + "integrity": "sha512-tozGmWvsJacjaLavjX4S/5yNDV9S4wJb7+vPG/nXWX2gTtgZ1mxcFQAtAJjokqpy37d1ZhLt+TXh0HrLoTmRgw==", + "dependencies": { + "@loaders.gl/gis": "3.4.14", + "@loaders.gl/loader-utils": "3.4.14", + "@loaders.gl/schema": "3.4.14", + "@math.gl/polygon": "^3.5.1", + "pbf": "^3.2.1" + } + }, + "node_modules/@loaders.gl/schema": { + "version": "3.4.14", + "resolved": "https://registry.npmjs.org/@loaders.gl/schema/-/schema-3.4.14.tgz", + "integrity": "sha512-r6BEDfUvbvzgUnh/MtkR5RzrkIwo1x1jtPFRTSJVsIZO7arXXlu3blffuv5ppEkKpNZ1Xzd9WtHp/JIkuctsmw==", + "dependencies": { + "@types/geojson": "^7946.0.7" + } + }, + "node_modules/@loaders.gl/terrain": { + "version": "3.4.14", + "resolved": "https://registry.npmjs.org/@loaders.gl/terrain/-/terrain-3.4.14.tgz", + "integrity": "sha512-vhchEVkPaWXnqd2ofujG2AEnBsk4hEw6LWSaFY7E3VMzNhI9l2EHvyU3+Hs03jYbXM4oLlQPGqd/T7x+5IMtig==", + "dependencies": { + "@babel/runtime": "^7.3.1", + "@loaders.gl/images": "3.4.14", + "@loaders.gl/loader-utils": "3.4.14", + "@loaders.gl/schema": "3.4.14", + "@mapbox/martini": "^0.2.0" + } + }, + "node_modules/@loaders.gl/textures": { + "version": "3.4.14", + "resolved": "https://registry.npmjs.org/@loaders.gl/textures/-/textures-3.4.14.tgz", + "integrity": "sha512-iKDHL2ZlOUud4/e3g0p0SyvkukznopYy6La3O6I9vDfKp8peuKMRRcTfFfd/zH0OqQC0hIhCXNz46vRLu7h6ng==", + "dependencies": { + "@loaders.gl/images": "3.4.14", + "@loaders.gl/loader-utils": "3.4.14", + "@loaders.gl/schema": "3.4.14", + "@loaders.gl/worker-utils": "3.4.14", + "ktx-parse": "^0.0.4", + "texture-compressor": "^1.0.2" + } + }, + "node_modules/@loaders.gl/tiles": { + "version": "3.4.14", + "resolved": "https://registry.npmjs.org/@loaders.gl/tiles/-/tiles-3.4.14.tgz", + "integrity": "sha512-an3scxl65r74LW4WoIGgluBmQpMY9eb381y9mZmREphTP6bWEj96fL/tiR+G6TiE6HJqTv8O3PH6xwI9OQmEJg==", + "dependencies": { + "@loaders.gl/loader-utils": "3.4.14", + "@loaders.gl/math": "3.4.14", + "@math.gl/core": "^3.5.1", + "@math.gl/culling": "^3.5.1", + "@math.gl/geospatial": "^3.5.1", + "@math.gl/web-mercator": "^3.5.1", + "@probe.gl/stats": "^4.0.1" + }, + "peerDependencies": { + "@loaders.gl/core": "^3.4.0" + } + }, + "node_modules/@loaders.gl/tiles/node_modules/@probe.gl/stats": { + "version": "4.0.7", + "resolved": "https://registry.npmjs.org/@probe.gl/stats/-/stats-4.0.7.tgz", + "integrity": "sha512-ui9SO/pUgyf7nrTCHM/7jBZo6M8sEsz5+4PE83054ZT6ErWVTLKuQwA5xhxMgNkj2Iu49MO6+DOSDoUU7X28CQ==" + }, + "node_modules/@loaders.gl/wms": { + "version": "3.4.14", + "resolved": "https://registry.npmjs.org/@loaders.gl/wms/-/wms-3.4.14.tgz", + "integrity": "sha512-D1pObPSUj885zGPyHIb7GtcwpHQNk0T8nK/4EHb0SHLe0y1b4qwqSOswdS9geXT9Q61hyhl/L0zqyTgwjiMStg==", + "dependencies": { + "@babel/runtime": "^7.3.1", + "@loaders.gl/images": "3.4.14", + "@loaders.gl/loader-utils": "3.4.14", + "@loaders.gl/schema": "3.4.14", + "@loaders.gl/xml": "3.4.14", + "@turf/rewind": "^5.1.5", + "deep-strict-equal": "^0.2.0", + "lerc": "^4.0.1" + } + }, + "node_modules/@loaders.gl/worker-utils": { + "version": "3.4.14", + "resolved": "https://registry.npmjs.org/@loaders.gl/worker-utils/-/worker-utils-3.4.14.tgz", + "integrity": "sha512-PUSwxoAYbskisXd0KfYEQ902b0igBA2UAWdP6PzPvY+tJmobfh74dTNwrrBQ1rGXQxxmGx6zc6/ksX6mlIzIrg==", + "dependencies": { + "@babel/runtime": "^7.3.1" + } + }, + "node_modules/@loaders.gl/xml": { + "version": "3.4.14", + "resolved": "https://registry.npmjs.org/@loaders.gl/xml/-/xml-3.4.14.tgz", + "integrity": "sha512-SNMGOHz4p8Cw+M6kxXhFEjXdNddJPOZY1rzNmRq7NYdGQlQYYeJdqV5HWzHx9BkoQYyrDXkrweGN0mY9QxCfeA==", + "dependencies": { + "@babel/runtime": "^7.3.1", + "@loaders.gl/loader-utils": "3.4.14", + "@loaders.gl/schema": "3.4.14", + "fast-xml-parser": "^4.2.5" + } + }, + "node_modules/@luma.gl/constants": { + "version": "8.5.21", + "resolved": "https://registry.npmjs.org/@luma.gl/constants/-/constants-8.5.21.tgz", + "integrity": "sha512-aJxayGxTT+IRd1vfpcgD/cKSCiVJjBNiuiChS96VulrmCvkzUOLvYXr42y5qKB4RyR7vOIda5uQprNzoHrhQAA==" + }, + "node_modules/@luma.gl/core": { + "version": "8.5.21", + "resolved": "https://registry.npmjs.org/@luma.gl/core/-/core-8.5.21.tgz", + "integrity": "sha512-11jQJQEMoR/IN2oIsd4zFxiQJk6FE+xgVIMUcsCTBuzafTtQZ8Po9df8mt+MVewpDyBlTVs6g8nxHRH4np1ukA==", + "dependencies": { + "@babel/runtime": "^7.0.0", + "@luma.gl/constants": "8.5.21", + "@luma.gl/engine": "8.5.21", + "@luma.gl/gltools": "8.5.21", + "@luma.gl/shadertools": "8.5.21", + "@luma.gl/webgl": "8.5.21" + } + }, + "node_modules/@luma.gl/engine": { + "version": "8.5.21", + "resolved": "https://registry.npmjs.org/@luma.gl/engine/-/engine-8.5.21.tgz", + "integrity": "sha512-IG3WQSKXFNUEs8QG7ZjHtGiOtsakUu+BAxtJ6997A6/F06yynZ44tPe5NU70jG9Yfu3kV0LykPZg7hO3vXZDiA==", + "dependencies": { + "@babel/runtime": "^7.0.0", + "@luma.gl/constants": "8.5.21", + "@luma.gl/gltools": "8.5.21", + "@luma.gl/shadertools": "8.5.21", + "@luma.gl/webgl": "8.5.21", + "@math.gl/core": "^3.5.0", + "@probe.gl/env": "^3.5.0", + "@probe.gl/stats": "^3.5.0", + "@types/offscreencanvas": "^2019.7.0" + } + }, + "node_modules/@luma.gl/experimental": { + "version": "8.5.21", + "resolved": "https://registry.npmjs.org/@luma.gl/experimental/-/experimental-8.5.21.tgz", + "integrity": "sha512-uFKPChGofyihOKxtqJy78QCQCDFnuMTK4QHrUX/qiTnvFSO8BgtTUevKvWGN9lBvq+uDD0lSieeF9yBzhQfAzw==", + "dependencies": { + "@luma.gl/constants": "8.5.21", + "@math.gl/core": "^3.5.0", + "earcut": "^2.0.6" + }, + "peerDependencies": { + "@loaders.gl/gltf": "^3.0.0", + "@loaders.gl/images": "^3.0.0", + "@luma.gl/engine": "^8.4.0", + "@luma.gl/gltools": "^8.4.0", + "@luma.gl/shadertools": "^8.4.0", + "@luma.gl/webgl": "^8.4.0" + } + }, + "node_modules/@luma.gl/gltools": { + "version": "8.5.21", + "resolved": "https://registry.npmjs.org/@luma.gl/gltools/-/gltools-8.5.21.tgz", + "integrity": "sha512-6qZ0LaT2Mxa4AJT5F44TFoaziokYiHUwO45vnM/NYUOIu9xevcmS6VtToawytMEACGL6PDeDyVqP3Y80SDzq5g==", + "dependencies": { + "@babel/runtime": "^7.0.0", + "@luma.gl/constants": "8.5.21", + "@probe.gl/env": "^3.5.0", + "@probe.gl/log": "^3.5.0", + "@types/offscreencanvas": "^2019.7.0" + } + }, + "node_modules/@luma.gl/shadertools": { + "version": "8.5.21", + "resolved": "https://registry.npmjs.org/@luma.gl/shadertools/-/shadertools-8.5.21.tgz", + "integrity": "sha512-WQah7yFDJ8cNCLPYpIm3r0wSlXLvjoA279fcknmATvvkW3/i8PcCJ/nYEBJO3hHEwwMQxD16+YZu/uwGiifLMg==", + "dependencies": { + "@babel/runtime": "^7.0.0", + "@math.gl/core": "^3.5.0" + } + }, + "node_modules/@luma.gl/webgl": { + "version": "8.5.21", + "resolved": "https://registry.npmjs.org/@luma.gl/webgl/-/webgl-8.5.21.tgz", + "integrity": "sha512-ZVLO4W5UuaOlzZIwmFWhnmZ1gYoU97a+heMqxLrSSmCUAsSu3ZETUex9gOmzdM1WWxcdWaa3M68rvKCNEgwz0Q==", + "dependencies": { + "@babel/runtime": "^7.0.0", + "@luma.gl/constants": "8.5.21", + "@luma.gl/gltools": "8.5.21", + "@probe.gl/env": "^3.5.0", + "@probe.gl/stats": "^3.5.0" + } + }, + "node_modules/@mapbox/martini": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/@mapbox/martini/-/martini-0.2.0.tgz", + "integrity": "sha512-7hFhtkb0KTLEls+TRw/rWayq5EeHtTaErgm/NskVoXmtgAQu/9D299aeyj6mzAR/6XUnYRp2lU+4IcrYRFjVsQ==" + }, + "node_modules/@mapbox/point-geometry": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/@mapbox/point-geometry/-/point-geometry-0.1.0.tgz", + "integrity": "sha512-6j56HdLTwWGO0fJPlrZtdU/B13q8Uwmo18Ck2GnGgN9PCFyKTZ3UbXeEdRFh18i9XQ92eH2VdtpJHpBD3aripQ==" + }, + "node_modules/@mapbox/tiny-sdf": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/@mapbox/tiny-sdf/-/tiny-sdf-2.0.6.tgz", + "integrity": "sha512-qMqa27TLw+ZQz5Jk+RcwZGH7BQf5G/TrutJhspsca/3SHwmgKQ1iq+d3Jxz5oysPVYTGP6aXxCo5Lk9Er6YBAA==" + }, + "node_modules/@mapbox/vector-tile": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/@mapbox/vector-tile/-/vector-tile-1.3.1.tgz", + "integrity": "sha512-MCEddb8u44/xfQ3oD+Srl/tNcQoqTw3goGk2oLsrFxOTc3dUp+kAnby3PvAeeBYSMSjSPD1nd1AJA6W49WnoUw==", + "dependencies": { + "@mapbox/point-geometry": "~0.1.0" + } + }, "node_modules/@material/animation": { "version": "15.0.0-canary.7f224ddd4.0", "resolved": "https://registry.npmjs.org/@material/animation/-/animation-15.0.0-canary.7f224ddd4.0.tgz", @@ -4185,6 +4607,66 @@ "tslib": "^2.1.0" } }, + "node_modules/@math.gl/core": { + "version": "3.6.3", + "resolved": "https://registry.npmjs.org/@math.gl/core/-/core-3.6.3.tgz", + "integrity": "sha512-jBABmDkj5uuuE0dTDmwwss7Cup5ZwQ6Qb7h1pgvtkEutTrhkcv8SuItQNXmF45494yIHeoGue08NlyeY6wxq2A==", + "dependencies": { + "@babel/runtime": "^7.12.0", + "@math.gl/types": "3.6.3", + "gl-matrix": "^3.4.0" + } + }, + "node_modules/@math.gl/culling": { + "version": "3.6.3", + "resolved": "https://registry.npmjs.org/@math.gl/culling/-/culling-3.6.3.tgz", + "integrity": "sha512-3UERXHbaPlM6pnTk2MI7LeQ5CoelDZzDzghTTcv+HdQCZsT/EOEuEdYimETHtSxiyiOmsX2Un65UBLYT/rbKZg==", + "dependencies": { + "@babel/runtime": "^7.12.0", + "@math.gl/core": "3.6.3", + "gl-matrix": "^3.4.0" + } + }, + "node_modules/@math.gl/geospatial": { + "version": "3.6.3", + "resolved": "https://registry.npmjs.org/@math.gl/geospatial/-/geospatial-3.6.3.tgz", + "integrity": "sha512-6xf657lJnaecSarSzn02t0cnsCSkWb+39m4+im96v20dZTrLCWZ2glDQVzfuL91meDnDXjH4oyvynp12Mj5MFg==", + "dependencies": { + "@babel/runtime": "^7.12.0", + "@math.gl/core": "3.6.3", + "gl-matrix": "^3.4.0" + } + }, + "node_modules/@math.gl/polygon": { + "version": "3.6.3", + "resolved": "https://registry.npmjs.org/@math.gl/polygon/-/polygon-3.6.3.tgz", + "integrity": "sha512-FivQ1ZnYcAss1wVifOkHP/ZnlfQy1IL/769uzNtiHxwUbW0kZG3yyOZ9I7fwyzR5Hvqt3ErJKHjSYZr0uVlz5g==", + "dependencies": { + "@math.gl/core": "3.6.3" + } + }, + "node_modules/@math.gl/sun": { + "version": "3.6.3", + "resolved": "https://registry.npmjs.org/@math.gl/sun/-/sun-3.6.3.tgz", + "integrity": "sha512-mrx6CGYYeTNSQttvcw0KVUy+35YDmnjMqpO/o0t06Vcghrt0HNruB/ScRgUSbJrgkbOg1Vcqm23HBd++clzQzw==", + "dependencies": { + "@babel/runtime": "^7.12.0" + } + }, + "node_modules/@math.gl/types": { + "version": "3.6.3", + "resolved": "https://registry.npmjs.org/@math.gl/types/-/types-3.6.3.tgz", + "integrity": "sha512-3uWLVXHY3jQxsXCr/UCNPSc2BG0hNUljhmOBt9l+lNFDp7zHgm0cK2Tw4kj2XfkJy4TgwZTBGwRDQgWEbLbdTA==" + }, + "node_modules/@math.gl/web-mercator": { + "version": "3.6.3", + "resolved": "https://registry.npmjs.org/@math.gl/web-mercator/-/web-mercator-3.6.3.tgz", + "integrity": "sha512-UVrkSOs02YLehKaehrxhAejYMurehIHPfFQvPFZmdJHglHOU4V2cCUApTVEwOksvCp161ypEqVp+9H6mGhTTcw==", + "dependencies": { + "@babel/runtime": "^7.12.0", + "gl-matrix": "^3.4.0" + } + }, "node_modules/@ngneat/transloco": { "version": "6.0.4", "resolved": "https://registry.npmjs.org/@ngneat/transloco/-/transloco-6.0.4.tgz", @@ -4728,6 +5210,31 @@ "node": ">=14" } }, + "node_modules/@probe.gl/env": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/@probe.gl/env/-/env-3.6.0.tgz", + "integrity": "sha512-4tTZYUg/8BICC3Yyb9rOeoKeijKbZHRXBEKObrfPmX4sQmYB15ZOUpoVBhAyJkOYVAM8EkPci6Uw5dLCwx2BEQ==", + "dependencies": { + "@babel/runtime": "^7.0.0" + } + }, + "node_modules/@probe.gl/log": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/@probe.gl/log/-/log-3.6.0.tgz", + "integrity": "sha512-hjpyenpEvOdowgZ1qMeCJxfRD4JkKdlXz0RC14m42Un62NtOT+GpWyKA4LssT0+xyLULCByRAtG2fzZorpIAcA==", + "dependencies": { + "@babel/runtime": "^7.0.0", + "@probe.gl/env": "3.6.0" + } + }, + "node_modules/@probe.gl/stats": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/@probe.gl/stats/-/stats-3.6.0.tgz", + "integrity": "sha512-JdALQXB44OP4kUBN/UrQgzbJe4qokbVF4Y8lkIA8iVCFnjVowWIgkD/z/0QO65yELT54tTrtepw1jScjKB+rhQ==", + "dependencies": { + "@babel/runtime": "^7.0.0" + } + }, "node_modules/@rollup/rollup-android-arm-eabi": { "version": "4.12.0", "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.12.0.tgz", @@ -5013,6 +5520,56 @@ "node": "^16.14.0 || >=18.0.0" } }, + "node_modules/@turf/boolean-clockwise": { + "version": "5.1.5", + "resolved": "https://registry.npmjs.org/@turf/boolean-clockwise/-/boolean-clockwise-5.1.5.tgz", + "integrity": "sha512-FqbmEEOJ4rU4/2t7FKx0HUWmjFEVqR+NJrFP7ymGSjja2SQ7Q91nnBihGuT+yuHHl6ElMjQ3ttsB/eTmyCycxA==", + "dependencies": { + "@turf/helpers": "^5.1.5", + "@turf/invariant": "^5.1.5" + } + }, + "node_modules/@turf/clone": { + "version": "5.1.5", + "resolved": "https://registry.npmjs.org/@turf/clone/-/clone-5.1.5.tgz", + "integrity": "sha512-//pITsQ8xUdcQ9pVb4JqXiSqG4dos5Q9N4sYFoWghX21tfOV2dhc5TGqYOhnHrQS7RiKQL1vQ48kIK34gQ5oRg==", + "dependencies": { + "@turf/helpers": "^5.1.5" + } + }, + "node_modules/@turf/helpers": { + "version": "5.1.5", + "resolved": "https://registry.npmjs.org/@turf/helpers/-/helpers-5.1.5.tgz", + "integrity": "sha512-/lF+JR+qNDHZ8bF9d+Cp58nxtZWJ3sqFe6n3u3Vpj+/0cqkjk4nXKYBSY0azm+GIYB5mWKxUXvuP/m0ZnKj1bw==" + }, + "node_modules/@turf/invariant": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/@turf/invariant/-/invariant-5.2.0.tgz", + "integrity": "sha512-28RCBGvCYsajVkw2EydpzLdcYyhSA77LovuOvgCJplJWaNVyJYH6BOR3HR9w50MEkPqb/Vc/jdo6I6ermlRtQA==", + "dependencies": { + "@turf/helpers": "^5.1.5" + } + }, + "node_modules/@turf/meta": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/@turf/meta/-/meta-5.2.0.tgz", + "integrity": "sha512-ZjQ3Ii62X9FjnK4hhdsbT+64AYRpaI8XMBMcyftEOGSmPMUVnkbvuv3C9geuElAXfQU7Zk1oWGOcrGOD9zr78Q==", + "dependencies": { + "@turf/helpers": "^5.1.5" + } + }, + "node_modules/@turf/rewind": { + "version": "5.1.5", + "resolved": "https://registry.npmjs.org/@turf/rewind/-/rewind-5.1.5.tgz", + "integrity": "sha512-Gdem7JXNu+G4hMllQHXRFRihJl3+pNl7qY+l4qhQFxq+hiU1cQoVFnyoleIqWKIrdK/i2YubaSwc3SCM7N5mMw==", + "dependencies": { + "@turf/boolean-clockwise": "^5.1.5", + "@turf/clone": "^5.1.5", + "@turf/helpers": "^5.1.5", + "@turf/invariant": "^5.1.5", + "@turf/meta": "^5.1.5" + } + }, "node_modules/@types/body-parser": { "version": "1.19.5", "resolved": "https://registry.npmjs.org/@types/body-parser/-/body-parser-1.19.5.tgz", @@ -5104,8 +5661,12 @@ "node_modules/@types/geojson": { "version": "7946.0.14", "resolved": "https://registry.npmjs.org/@types/geojson/-/geojson-7946.0.14.tgz", - "integrity": "sha512-WCfD5Ht3ZesJUsONdhvm84dmzWOiOzOAqOncN0++w0lBw1o8OuDNJF2McvvCef/yBqb/HYRahp1BYtODFQ8bRg==", - "dev": true + "integrity": "sha512-WCfD5Ht3ZesJUsONdhvm84dmzWOiOzOAqOncN0++w0lBw1o8OuDNJF2McvvCef/yBqb/HYRahp1BYtODFQ8bRg==" + }, + "node_modules/@types/hammerjs": { + "version": "2.0.45", + "resolved": "https://registry.npmjs.org/@types/hammerjs/-/hammerjs-2.0.45.tgz", + "integrity": "sha512-qkcUlZmX6c4J8q45taBKTL3p+LbITgyx7qhlPYOdOHZB7B31K0mXbP5YA7i7SgDeEGuI9MnumiKPEMrxg8j3KQ==" }, "node_modules/@types/http-errors": { "version": "2.0.4", @@ -5128,15 +5689,6 @@ "integrity": "sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA==", "dev": true }, - "node_modules/@types/leaflet": { - "version": "1.9.8", - "resolved": "https://registry.npmjs.org/@types/leaflet/-/leaflet-1.9.8.tgz", - "integrity": "sha512-EXdsL4EhoUtGm2GC2ZYtXn+Fzc6pluVgagvo2VC1RHWToLGlTRwVYoDpqS/7QXa01rmDyBjJk3Catpf60VMkwg==", - "dev": true, - "dependencies": { - "@types/geojson": "*" - } - }, "node_modules/@types/mime": { "version": "1.3.5", "resolved": "https://registry.npmjs.org/@types/mime/-/mime-1.3.5.tgz", @@ -5161,6 +5713,11 @@ "@types/node": "*" } }, + "node_modules/@types/offscreencanvas": { + "version": "2019.7.3", + "resolved": "https://registry.npmjs.org/@types/offscreencanvas/-/offscreencanvas-2019.7.3.tgz", + "integrity": "sha512-ieXiYmgSRXUDeOntE1InxjWyvEelZGP63M+cGuquuRLuIKKT1osnkXjxev9B7d1nXSug5vpunx+gNlbVxMlC9A==" + }, "node_modules/@types/qs": { "version": "6.9.11", "resolved": "https://registry.npmjs.org/@types/qs/-/qs-6.9.11.tgz", @@ -6060,7 +6617,6 @@ "version": "1.0.10", "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", - "dev": true, "dependencies": { "sprintf-js": "~1.0.2" } @@ -6413,6 +6969,14 @@ "node": "^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7" } }, + "node_modules/buf-compare": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/buf-compare/-/buf-compare-1.0.1.tgz", + "integrity": "sha512-Bvx4xH00qweepGc43xFvMs5BKASXTbHaHm6+kDYIK9p/4iFwjATQkmPKHQSgJZzKbAymhztRbXUf1Nqhzl73/Q==", + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/buffer": { "version": "5.7.1", "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.7.1.tgz", @@ -6959,6 +7523,18 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/core-assert": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/core-assert/-/core-assert-0.2.1.tgz", + "integrity": "sha512-IG97qShIP+nrJCXMCgkNZgH7jZQ4n8RpPyPeXX++T6avR/KhLhgLiHKoEn5Rc1KjfycSfA9DMa6m+4C4eguHhw==", + "dependencies": { + "buf-compare": "^1.0.0", + "is-error": "^2.2.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/core-js-compat": { "version": "3.36.0", "resolved": "https://registry.npmjs.org/core-js-compat/-/core-js-compat-3.36.0.tgz", @@ -7215,6 +7791,17 @@ "integrity": "sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==", "dev": true }, + "node_modules/deep-strict-equal": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/deep-strict-equal/-/deep-strict-equal-0.2.0.tgz", + "integrity": "sha512-3daSWyvZ/zwJvuMGlzG1O+Ow0YSadGfb3jsh9xoCutv2tWyB9dA4YvR9L9/fSdDZa2dByYQe+TqapSGUrjnkoA==", + "dependencies": { + "core-assert": "^0.2.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/default-gateway": { "version": "6.0.3", "resolved": "https://registry.npmjs.org/default-gateway/-/default-gateway-6.0.3.tgz", @@ -7429,12 +8016,22 @@ "node": ">=12" } }, + "node_modules/draco3d": { + "version": "1.5.5", + "resolved": "https://registry.npmjs.org/draco3d/-/draco3d-1.5.5.tgz", + "integrity": "sha512-JVuNV0EJzD3LBYhGyIXJLeBID/EVtmFO1ZNhAYflTgiMiAJlbhXQmRRda/azjc8MRVMHh0gqGhiqHUo5dIXM8Q==" + }, "node_modules/duplexer": { "version": "0.1.2", "resolved": "https://registry.npmjs.org/duplexer/-/duplexer-0.1.2.tgz", "integrity": "sha512-jtD6YG370ZCIi/9GTaJKQxWTZD045+4R4hTk/x1UyoqadyJ9x9CgSi1RlVDQF8U2sxLLSnFkCaMihqljHIWgMg==", "dev": true }, + "node_modules/earcut": { + "version": "2.2.4", + "resolved": "https://registry.npmjs.org/earcut/-/earcut-2.2.4.tgz", + "integrity": "sha512-/pjZsA1b4RPHbeWZQn66SWS8nZZWLQQ23oE3Eam7aroEFGEvwKAsJfZ9ytiEMycfzXWpca4FA9QIOehf7PocBQ==" + }, "node_modules/eastasianwidth": { "version": "0.2.0", "resolved": "https://registry.npmjs.org/eastasianwidth/-/eastasianwidth-0.2.0.tgz", @@ -8274,6 +8871,27 @@ "integrity": "sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw==", "dev": true }, + "node_modules/fast-xml-parser": { + "version": "4.3.5", + "resolved": "https://registry.npmjs.org/fast-xml-parser/-/fast-xml-parser-4.3.5.tgz", + "integrity": "sha512-sWvP1Pl8H03B8oFJpFR3HE31HUfwtX7Rlf9BNsvdpujD4n7WMhfmu8h9wOV2u+c1k0ZilTADhPqypzx2J690ZQ==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/NaturalIntelligence" + }, + { + "type": "paypal", + "url": "https://paypal.me/naturalintelligence" + } + ], + "dependencies": { + "strnum": "^1.0.5" + }, + "bin": { + "fxparser": "src/cli/cli.js" + } + }, "node_modules/fastq": { "version": "1.17.1", "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.17.1.tgz", @@ -8663,6 +9281,11 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/gl-matrix": { + "version": "3.4.3", + "resolved": "https://registry.npmjs.org/gl-matrix/-/gl-matrix-3.4.3.tgz", + "integrity": "sha512-wcCp8vu8FT22BnvKVPjXa/ICBWRq/zjFfdofZy1WSpQZpphblv12/bOQLBC1rMM7SGOFS9ltVmKOHil5+Ml7gA==" + }, "node_modules/glob": { "version": "10.3.10", "resolved": "https://registry.npmjs.org/glob/-/glob-10.3.10.tgz", @@ -8754,6 +9377,24 @@ "integrity": "sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag==", "dev": true }, + "node_modules/h3-js": { + "version": "3.7.2", + "resolved": "https://registry.npmjs.org/h3-js/-/h3-js-3.7.2.tgz", + "integrity": "sha512-LPjlHSwB9zQZrMqKloCZmmmt3yZzIK7nqPcXqwU93zT3TtYG6jP4tZBzAPouxut7lLjdFbMQ75wRBiKfpsnY7w==", + "engines": { + "node": ">=4", + "npm": ">=3", + "yarn": ">=1.3.0" + } + }, + "node_modules/hammerjs": { + "version": "2.0.8", + "resolved": "https://registry.npmjs.org/hammerjs/-/hammerjs-2.0.8.tgz", + "integrity": "sha512-tSQXBXS/MWQOn/RKckawJ61vvsDpCom87JgxiYdGwHdOa0ht0vzUWDlfioofFCRU0L+6NGDt6XzbgoJvZkMeRQ==", + "engines": { + "node": ">=0.8.0" + } + }, "node_modules/handle-thing": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/handle-thing/-/handle-thing-2.0.1.tgz", @@ -9278,6 +9919,11 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/is-error": { + "version": "2.2.2", + "resolved": "https://registry.npmjs.org/is-error/-/is-error-2.2.2.tgz", + "integrity": "sha512-IOQqts/aHWbiisY5DuPJQ0gcbvaLFCa7fBa9xoLfxBZvQ+ZI/Zh9xoI7Gk+G64N0FdK4AbibytHht2tWgpJWLg==" + }, "node_modules/is-extglob": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", @@ -9864,6 +10510,11 @@ "node": ">= 8" } }, + "node_modules/ktx-parse": { + "version": "0.0.4", + "resolved": "https://registry.npmjs.org/ktx-parse/-/ktx-parse-0.0.4.tgz", + "integrity": "sha512-LY3nrmfXl+wZZdPxgJ3ZmLvG+wkOZZP3/dr4RbQj1Pk3Qwz44esOOSFFVQJcNWpXAtiNIC66WgXufX/SYgYz6A==" + }, "node_modules/launch-editor": { "version": "2.6.1", "resolved": "https://registry.npmjs.org/launch-editor/-/launch-editor-2.6.1.tgz", @@ -9874,10 +10525,10 @@ "shell-quote": "^1.8.1" } }, - "node_modules/leaflet": { - "version": "1.9.4", - "resolved": "https://registry.npmjs.org/leaflet/-/leaflet-1.9.4.tgz", - "integrity": "sha512-nxS1ynzJOmOlHp+iL3FyWqK89GtNL8U8rvlMOsQdTTssxZwCXh8N2NB3GDQOL+YR3XnWyZAxwQixURb+FA74PA==" + "node_modules/lerc": { + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/lerc/-/lerc-4.0.4.tgz", + "integrity": "sha512-nHZH+ffiGPkgKUQtiZrljGUGV2GddvPcVTV5E345ZFncbKz+/rBIjDPrSxkiqW0EAtg1Jw7qAgRdaCwV+95Fow==" }, "node_modules/less": { "version": "4.2.0", @@ -10117,6 +10768,14 @@ "node": ">=8" } }, + "node_modules/long": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/long/-/long-3.2.0.tgz", + "integrity": "sha512-ZYvPPOMqUwPoDsbJaR10iQJYnMuZhRTvHYl62ErLIEX7RgFlziSBUUvrt3OVfc47QlHHpzPZYP17g3Fv7oeJkg==", + "engines": { + "node": ">=0.6" + } + }, "node_modules/lru-cache": { "version": "5.1.1", "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-5.1.1.tgz", @@ -10184,6 +10843,14 @@ "node": "^16.14.0 || >=18.0.0" } }, + "node_modules/math.gl": { + "version": "3.6.3", + "resolved": "https://registry.npmjs.org/math.gl/-/math.gl-3.6.3.tgz", + "integrity": "sha512-Yq9CyECvSDox9+5ETi2+x1bGTY5WvGUGL3rJfC4KPoCZAM51MGfrCm6rIn4yOJUVfMPs2a5RwMD+yGS/n1g3gg==", + "dependencies": { + "@math.gl/core": "3.6.3" + } + }, "node_modules/media-typer": { "version": "0.3.0", "resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz", @@ -10536,6 +11203,19 @@ "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", "dev": true }, + "node_modules/mjolnir.js": { + "version": "2.7.1", + "resolved": "https://registry.npmjs.org/mjolnir.js/-/mjolnir.js-2.7.1.tgz", + "integrity": "sha512-72BeUWgTv2cj5aZQKpwL8caNUFhXZ9bDm1hxpNj70XJQ62IBnTZmtv/WPxJvtaVNhzNo+D2U8O6ryNI0zImYcw==", + "dependencies": { + "@types/hammerjs": "^2.0.41", + "hammerjs": "^2.0.8" + }, + "engines": { + "node": ">= 4", + "npm": ">= 3" + } + }, "node_modules/mkdirp": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz", @@ -11668,6 +12348,18 @@ "node": ">=8" } }, + "node_modules/pbf": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/pbf/-/pbf-3.2.1.tgz", + "integrity": "sha512-ClrV7pNOn7rtmoQVF4TS1vyU0WhYRnP92fzbfF75jAIwpnzdJXf8iTd4CMEqO4yUenH6NDqLiwjqlh6QgZzgLQ==", + "dependencies": { + "ieee754": "^1.1.12", + "resolve-protobuf-schema": "^2.1.0" + }, + "bin": { + "pbf": "bin/pbf" + } + }, "node_modules/picocolors": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.0.tgz", @@ -12079,6 +12771,11 @@ "node": ">=10" } }, + "node_modules/protocol-buffers-schema": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/protocol-buffers-schema/-/protocol-buffers-schema-3.6.0.tgz", + "integrity": "sha512-TdDRD+/QNdrCGCE7v8340QyuXd4kIWIgapsE2+n/SaGiSSbomYl4TjHlvIoCWRpE7wFt02EpB35VVA2ImcBVqw==" + }, "node_modules/proxy-addr": { "version": "2.0.7", "resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-2.0.7.tgz", @@ -12298,8 +12995,7 @@ "node_modules/regenerator-runtime": { "version": "0.14.1", "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.14.1.tgz", - "integrity": "sha512-dYnhHh0nJoMfnkZs6GmmhFknAGRrLznOu5nc9ML+EJxGvrx6H7teuevqVqCuPcPK//3eDrrjQhehXVx9cnkGdw==", - "dev": true + "integrity": "sha512-dYnhHh0nJoMfnkZs6GmmhFknAGRrLznOu5nc9ML+EJxGvrx6H7teuevqVqCuPcPK//3eDrrjQhehXVx9cnkGdw==" }, "node_modules/regenerator-transform": { "version": "0.15.2", @@ -12512,6 +13208,14 @@ "node": ">=8" } }, + "node_modules/resolve-protobuf-schema": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/resolve-protobuf-schema/-/resolve-protobuf-schema-2.1.0.tgz", + "integrity": "sha512-kI5ffTiZWmJaS/huM8wZfEMer1eRd7oJQhDuxeCLe3t7N7mX3z94CN0xPxBQxFYQTSNz9T0i+v6inKqSdK8xrQ==", + "dependencies": { + "protocol-buffers-schema": "^3.3.1" + } + }, "node_modules/resolve-url-loader": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/resolve-url-loader/-/resolve-url-loader-5.0.0.tgz", @@ -13329,8 +14033,7 @@ "node_modules/sprintf-js": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", - "integrity": "sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g==", - "dev": true + "integrity": "sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g==" }, "node_modules/ssri": { "version": "10.0.5", @@ -13441,6 +14144,11 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/strnum": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/strnum/-/strnum-1.0.5.tgz", + "integrity": "sha512-J8bbNyKKXl5qYcR36TIO8W3mVGVHrmmxsd5PAItGkmyzwJvybiw2IVq5nqd0i4LSNSkB/sx9VHllbfFdr9k1JA==" + }, "node_modules/strong-log-transformer": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/strong-log-transformer/-/strong-log-transformer-2.1.0.tgz", @@ -13734,6 +14442,29 @@ "integrity": "sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw==", "dev": true }, + "node_modules/texture-compressor": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/texture-compressor/-/texture-compressor-1.0.2.tgz", + "integrity": "sha512-dStVgoaQ11mA5htJ+RzZ51ZxIZqNOgWKAIvtjLrW1AliQQLCmrDqNzQZ8Jh91YealQ95DXt4MEduLzJmbs6lig==", + "dependencies": { + "argparse": "^1.0.10", + "image-size": "^0.7.4" + }, + "bin": { + "texture-compressor": "bin/texture-compressor.js" + } + }, + "node_modules/texture-compressor/node_modules/image-size": { + "version": "0.7.5", + "resolved": "https://registry.npmjs.org/image-size/-/image-size-0.7.5.tgz", + "integrity": "sha512-Hiyv+mXHfFEP7LzUL/llg9RwFxxY+o9N3JVLIeG5E7iFIFAalxvRU9UZthBdYDEVnzHMgjnKJPPpay5BWf1g9g==", + "bin": { + "image-size": "bin/image-size.js" + }, + "engines": { + "node": ">=6.9.0" + } + }, "node_modules/through": { "version": "2.3.8", "resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz", diff --git a/package.json b/package.json index 8e021a3..141972c 100644 --- a/package.json +++ b/package.json @@ -19,10 +19,12 @@ "@angular/material": "17.1.2", "@angular/platform-browser": "17.1.2", "@angular/platform-browser-dynamic": "17.1.2", - "@asymmetrik/ngx-leaflet": "17.0.0", + "@deck.gl/core": "8.9.35", + "@deck.gl/geo-layers": "8.9.35", + "@deck.gl/layers": "8.9.35", + "@luma.gl/core": "8.5.21", "@ngneat/transloco": "6.0.4", "@ngneat/transloco-preload-langs": "5.0.1", - "leaflet": "1.9.4", "ngx-logger": "5.0.12", "ngx-toastr": "18.0.0", "rxjs": "~7.8.0", @@ -38,7 +40,6 @@ "@angular-eslint/template-parser": "17.2.1", "@angular/cli": "17.1.2", "@angular/compiler-cli": "17.1.2", - "@types/leaflet": "1.9.8", "@typescript-eslint/eslint-plugin": "6.21.0", "@typescript-eslint/parser": "6.21.0", "eslint": "8.56.0", diff --git a/src/app/map/map.component.html b/src/app/map/map.component.html index 15f1cf1..0798157 100644 --- a/src/app/map/map.component.html +++ b/src/app/map/map.component.html @@ -1,10 +1,4 @@ -
-
+
{{ showLoader }} diff --git a/src/app/map/map.component.ts b/src/app/map/map.component.ts index bb09485..29cc350 100644 --- a/src/app/map/map.component.ts +++ b/src/app/map/map.component.ts @@ -1,57 +1,28 @@ -import { Component, Input, OnDestroy, OnInit } from '@angular/core'; -import { - CircleMarker, - control, - GeoJSON, - latLng, - Layer, - LayerGroup, - LeafletEvent, - Map as LeafletMap, - MapOptions -} from 'leaflet'; +import { AfterViewInit, Component, ElementRef, OnDestroy, OnInit, ViewChild } from '@angular/core'; import { MapService } from './map.service'; import { NGXLogger } from 'ngx-logger'; -import { - attributionOptions, - centerOfEurope, - defaultCapitolsStyle, - defaultZoom, - defaultZoomPanOptions, - euBorderStyle, - LayerIndices, - noDrawStyle -} from './map.constants'; import { Subject, takeUntil } from 'rxjs'; import { NotificationService } from '../notifications/notification.service'; +import { Deck, Layer } from '@deck.gl/core/typed'; +import { INITIAL_VIEW_STATE } from './map.constants'; @Component({ selector: 'app-map', templateUrl: './map.component.html', styleUrl: './map.component.scss' }) -export class MapComponent implements OnInit, OnDestroy { - @Input() options: MapOptions = { - zoom: defaultZoom, - minZoom: 4, - maxZoom: 20, - center: this.mapService.getCenterOfEurope(), - fadeAnimation: true, - zoomAnimation: true, - markerZoomAnimation: true, - zoomSnap: 0.5, - zoomDelta: 0.5, - attributionControl: false - }; - +export class MapComponent implements OnInit, AfterViewInit, OnDestroy { layers: Promise; showLoader: boolean = false; - private theMap?: LeafletMap; - private theZoom?: number; + //private theZoom?: number; private onUnsubscribe$: Subject = new Subject(); + @ViewChild('deckGlMap', { static: false }) mapDiv?: ElementRef; + + private map?: Deck; + constructor( private log: NGXLogger, private mapService: MapService, @@ -61,20 +32,47 @@ export class MapComponent implements OnInit, OnDestroy { } ngOnInit(): void { + this.initAllSubscriptions(); + } + + ngAfterViewInit() { + this.initDeckGlMap(); + } + + private initDeckGlMap() { + this.layers.then(layers => { + this.map = new Deck({ + parent: this.mapDiv?.nativeElement, + initialViewState: INITIAL_VIEW_STATE, + style: { position: 'relative' }, + width: '100vw', + height: '100vh', + controller: true, + useDevicePixels: true, + layers: [layers], + onWebGLInitialized: gl => { + gl.blendFuncSeparate(gl.SRC_ALPHA, gl.ONE, gl.ONE_MINUS_DST_ALPHA, gl.ONE); + gl.blendEquation(gl.FUNC_ADD); + } + }); + }); + } + + private initAllSubscriptions() { this.mapService.resetMap$.pipe(takeUntil(this.onUnsubscribe$)).subscribe(() => { - this.resetMap(); + // TODO this.resetMap(); }); this.mapService.toMyLocation$.pipe(takeUntil(this.onUnsubscribe$)).subscribe(() => { - this.myLocation(); + // TODO this.myLocation(); }); this.mapService.showEuBorders$.pipe(takeUntil(this.onUnsubscribe$)).subscribe(value => { - this.showEuBorders(value); + // TODO this.showEuBorders(value); }); this.mapService.showCapitols$.pipe(takeUntil(this.onUnsubscribe$)).subscribe(value => { - this.showCapitols(value); + // TODO this.showCapitols(value); }); } @@ -89,76 +87,78 @@ export class MapComponent implements OnInit, OnDestroy { } private disposeMap() { - this.theMap!.clearAllEventListeners(); - this.theMap!.remove(); + // TODO dispose map map this.log.info('Disposed theMap'); } - onMapReady(map: LeafletMap) { - this.theMap = map; - this.log.info('Leaflet theMap ready'); - this.theMap.addControl(control.attribution(attributionOptions)); - this.theZoom = map.getZoom(); - } + // onMapReady(map: LeafletMap) { + // this.theMap = map; + // this.log.info('Leaflet theMap ready'); + // this.theMap.addControl(control.attribution(attributionOptions)); + // this.theZoom = map.getZoom(); + // } private async loadAllLayers() { - return this.mapService.loadAllLayers().then(([baseLayer, euBorderLayer, capitolsLayer]) => { - const layers = new Array(3); - layers[LayerIndices.BASE_LAYER_INDEX] = baseLayer; - layers[LayerIndices.EU_LAYER_INDEX] = euBorderLayer; - layers[LayerIndices.CAPITOLS_LAYER_INDEX] = capitolsLayer; - + // TODO map.gl impl + return this.mapService.loadAllLayers().then(([baseLayer, capitolsLayer]) => { + const layers = new Array(2); + layers[0] = baseLayer; + //layers[LayerIndices.EU_LAYER_INDEX] = euBorderLayer; + layers[1] = capitolsLayer; + + this.log.debug('Layers loaded', layers); return layers; }); } - onMapZoomStart() { - this.log.debug('MapZoomStart: zoom set to', this.theZoom); - this.showLoader = true; - } - - onMapZoomEnd(event: LeafletEvent) { - this.theZoom = event.target.getZoom(); - this.log.debug('MapZoomEnd: zoom set to', this.theZoom); - this.showLoader = false; - } - - resetMap() { - this.theMap!.flyTo(centerOfEurope, defaultZoom); - // TODO clear my location marker - } - - myLocation() { - navigator.geolocation.getCurrentPosition( - position => - this.theMap!.flyTo( - latLng(position.coords.latitude, position.coords.longitude), - defaultZoom + 2, - defaultZoomPanOptions - ), - err => this.notificationService.showError('Could not get geolocation', err) - ); - } - - private showEuBorders(value: boolean) { - this.layers - .then(layer => { - return layer[LayerIndices.EU_LAYER_INDEX] as GeoJSON; - }) - .then(l => l.setStyle(value ? euBorderStyle : noDrawStyle)); - } - - private showCapitols(value: boolean) { - this.theMap!.closePopup(); - - this.layers - .then(layer => { - return layer[LayerIndices.CAPITOLS_LAYER_INDEX] as LayerGroup; - }) - .then(capitols => capitols.getLayers().forEach(capitol => this.markerVisible(capitol, value))); - } - + // onMapZoomStart() { + // this.log.debug('MapZoomStart: zoom set to', this.theZoom); + // this.showLoader = true; + // } + + // onMapZoomEnd(event: LeafletEvent) { + // this.theZoom = event.target.getZoom(); + // this.log.debug('MapZoomEnd: zoom set to', this.theZoom); + // this.showLoader = false; + // } + + // resetMap() { + // this.theMap!.flyTo(centerOfEurope, defaultZoom); + // // TODO clear my location marker + // } + + // myLocation() { + // navigator.geolocation.getCurrentPosition( + // position => + // this.theMap!.flyTo( + // latLng(position.coords.latitude, position.coords.longitude), + // defaultZoom + 2, + // defaultZoomPanOptions + // ), + // err => this.notificationService.showError('Could not get geolocation', err) + // ); + // } + + // private showEuBorders(value: boolean) { + // this.layers + // .then(layer => { + // return layer[LayerIndices.EU_LAYER_INDEX] as GeoJSON; + // }) + // .then(l => l.setStyle(value ? euBorderStyle : noDrawStyle)); + // } + + // private showCapitols(value: boolean) { + // this.theMap!.closePopup(); + // + // this.layers + // .then(layer => { + // return layer[LayerIndices.CAPITOLS_LAYER_INDEX] as LayerGroup; + // }) + // .then(capitols => capitols.getLayers().forEach(capitol => this.markerVisible(capitol, value))); + // } + + // TODO does that work private markerVisible(layer: Layer, visible: boolean) { - (layer as CircleMarker).setStyle(visible ? defaultCapitolsStyle : noDrawStyle); + layer.setState({ visible: visible }); } } diff --git a/src/app/map/map.constants.ts b/src/app/map/map.constants.ts index 69e2c13..3aa8b07 100644 --- a/src/app/map/map.constants.ts +++ b/src/app/map/map.constants.ts @@ -1,62 +1,72 @@ -import { - CircleMarker, - circleMarker, - Control, - latLng, - LayerGroup, - layerGroup, - tileLayer, - ZoomPanOptions -} from 'leaflet'; +import { BitmapLayer, ScatterplotLayer } from '@deck.gl/layers/typed'; +import { TileLayer } from '@deck.gl/geo-layers/typed'; import { environment } from '../../environments/environment'; -import AttributionOptions = Control.AttributionOptions; -export const attributionOptions: AttributionOptions = { - position: 'bottomleft', - prefix: '' -}; - -export const defaultZoomPanOptions: ZoomPanOptions = { - animate: true, - duration: 1 -}; +export const DEFAULT_ZOOM = 5; -export const noDrawStyle = { radius: 0, opacity: 0, fill: false, stroke: false, popup: false }; +export const CENTER_OF_EUROPE = [54.526, 15.2551]; -// TODO find a way to configure color -export const euBorderStyle = { - color: '#fff', - fillColor: '#fff', - opacity: 0.4, - weight: 0.6, - fillOpacity: 0.06, - fill: true, - stroke: true +export const INITIAL_VIEW_STATE = { + latitude: CENTER_OF_EUROPE[0], + longitude: CENTER_OF_EUROPE[1], + zoom: DEFAULT_ZOOM, + minZoom: 0, + maxZoom: 19, + pitch: 0, + bearing: 0 }; -export const darkMatterNoLabelsLayer = tileLayer(environment.tileServerUrl, { - attribution: - '© OpenStreetMap contributors © CARTO' -}); +export const MAP_LAYER = new TileLayer({ + id: 'map-layer', + data: environment.tileServerUrls, + maxRequests: 10, + pickable: false, + tileSize: 256, -export const centerOfEurope = latLng(54.526, 15.2551); + renderSubLayers: props => { + // using never in next two lines is just a hack for typescript + // see: + const { + bbox: { west, south, east, north } + } = props.tile as never; -// TODO find a way to configure color -export const defaultCapitolsStyle = { - radius: 8, - weight: 2, - color: '#ffd617', - opacity: 1.0, - fill: true, - stroke: true, - popup: true -}; + const what = { ...props, data: undefined }; + + return [ + new BitmapLayer(what as never, { + image: props.data, + bounds: [west, south, east, north] + }) + ]; + } +}); -const berlin = circleMarker([52.52, 13.405], defaultCapitolsStyle).bindPopup('Berlin', { closeButton: false }); +// TODO attribution +// export const darkMatterNoLabelsLayer = new TileLayer(environment.tileServerUrl, { +// attribution: +// '© OpenStreetMap contributors © CARTO' +// }); -export const capitols: LayerGroup = layerGroup([berlin]); +export const BERLIN = [52.52, 13.405]; -export const defaultZoom = 5; +// TODO popup +export const CAPITOLS_LAYER = new ScatterplotLayer({ + id: 'capitols-layer', + data: [{ coordinates: BERLIN, radius: 30 }], + pickable: false, + radiusScale: 6, + radiusMinPixels: 1, + radiusMaxPixels: 1000, + lineWidthMinPixels: 1, + stroked: true, + filled: true, + colorFormat: 'RGBA', + getRadius: () => 2000, + getPosition: d => [d.coordinates[1], d.coordinates[0]], // only explicit syntax works + getLineColor: () => [255, 214, 23, 255], + getFillColor: () => [255, 214, 23, 50], + getLineWidth: () => 3000 +}); export enum LayerIndices { BASE_LAYER_INDEX = 0, diff --git a/src/app/map/map.module.ts b/src/app/map/map.module.ts index 3f9bc4a..93be65e 100644 --- a/src/app/map/map.module.ts +++ b/src/app/map/map.module.ts @@ -1,9 +1,7 @@ import { NgModule } from '@angular/core'; import { MapService } from './map.service'; -import { LeafletModule } from '@asymmetrik/ngx-leaflet'; @NgModule({ - exports: [LeafletModule], providers: [MapService] }) export class MapModule {} diff --git a/src/app/map/map.service.ts b/src/app/map/map.service.ts index 1a1b482..af03a03 100644 --- a/src/app/map/map.service.ts +++ b/src/app/map/map.service.ts @@ -1,11 +1,10 @@ import { EventEmitter, Injectable } from '@angular/core'; -import { GeoJSON, geoJson, Layer } from 'leaflet'; import { HttpClient } from '@angular/common/http'; import { NGXLogger } from 'ngx-logger'; -import { GeoJsonObject } from 'geojson'; -import { capitols, centerOfEurope, darkMatterNoLabelsLayer, euBorderStyle } from './map.constants'; -import { firstValueFrom } from 'rxjs'; +import { CAPITOLS_LAYER, CENTER_OF_EUROPE, MAP_LAYER } from './map.constants'; import { NotificationService } from '../notifications/notification.service'; +import { Layer } from '@deck.gl/core/typed'; +import { GeoJsonLayer } from '@deck.gl/layers/typed'; @Injectable() export class MapService { @@ -14,47 +13,50 @@ export class MapService { showEuBorders$ = new EventEmitter(); showCapitols$ = new EventEmitter(); - private readonly euBordersLayer: Promise; + private readonly euBordersLayer?: GeoJsonLayer; constructor( private readonly http: HttpClient, private readonly log: NGXLogger, private readonly notificationService: NotificationService ) { - this.euBordersLayer = this.initEuBordersLayer(); + //this.euBordersLayer = this.initEuBordersLayer(); + //this.euBordersLayer = new GeoJsonLayer({}); } - private async initEuBordersLayer() { - return firstValueFrom(this.http.get('./assets/geo-data/european-borders.json')) - .then(jsonResponse => { - this.log.debug('Loaded borders json', jsonResponse); - return geoJson(jsonResponse, { style: euBorderStyle }); - }) - .catch(err => { - this.notificationService.showError('Error loading EU borders geo json', err); - return geoJson(); - }); - } + // private async initEuBordersLayer() { + // return firstValueFrom(this.http.get('./assets/geo-data/european-borders.json')) + // .then(jsonResponse => { + // this.log.debug('Loaded borders json', jsonResponse); + // return new GeoJsonLayer(jsonResponse, { style: euBorderStyle }); + // }) + // .catch(err => { + // this.notificationService.showError('Error loading EU borders geo json', err); + // return geoJson(); + // }); + // } getCenterOfEurope() { - return centerOfEurope; + return CENTER_OF_EUROPE; } async loadAllLayers(): Promise { - return Promise.all([this.getBaseLayer(), this.getEuBordersLayer(), this.getCapitolsLayer()]); + // TODO deck.gl impl + // return Promise.all([this.getBaseLayer(), this.getEuBordersLayer(), this.getCapitolsLayer()]); + return Promise.all([this.getBaseLayer(), this.getCapitolsLayer()]); } - private async getBaseLayer() { - return darkMatterNoLabelsLayer; + private getBaseLayer() { + return MAP_LAYER; } - private async getEuBordersLayer() { + private getEuBordersLayer() { return this.euBordersLayer; } // TODO load capitols via HTTP private async getCapitolsLayer() { - return capitols; + return CAPITOLS_LAYER; } async resetMapToEuropeanCenter() { diff --git a/src/assets/styles/leaflet.scss b/src/assets/styles/leaflet.scss deleted file mode 100644 index b295c32..0000000 --- a/src/assets/styles/leaflet.scss +++ /dev/null @@ -1,60 +0,0 @@ -@import "variables"; - -// TODO find a way to put that to map.component.scss -*.leaflet-container { - font-family: Roboto, Arial, sans-serif; -} - -a.leaflet-control-zoom-in { - color: $secondary; - border-bottom: 2pt solid $accent; -} - -a.leaflet-control-zoom-out { - border-bottom: 0; -} - -a.leaflet-control-zoom-in.leaflet-disabled, -a.leaflet-control-zoom-in.leaflet-disabled:hover, -a.leaflet-control-zoom-out.leaflet-disabled, -a.leaflet-control-zoom-out.leaflet-disabled:hover { - background-color: $primary; - color: $accent; -} - -a.leaflet-control-zoom-in, -a.leaflet-control-zoom-out { - font-family: Roboto, Arial, sans-serif; - background-color: $primary; - color: $secondary; - - &:hover { - background-color: $secondary; - color: $tertiary; - } -} - -div.leaflet-popup-content-wrapper { - border-radius: 3pt; -} - -div.leaflet-popup-content-wrapper, -div.leaflet-popup-tip { - background-color: $accent-bright; - color: $primary; - border: 0 -} - -div.leaflet-popup-content { - text-align: center; - margin: 5pt; -} - -div.leaflet-container div.leaflet-control-attribution { - background-color: $primary; - - a { - color: $secondary; - opacity: .8 - } -} diff --git a/src/assets/styles/main.scss b/src/assets/styles/main.scss index 43f9202..1e2c7c7 100644 --- a/src/assets/styles/main.scss +++ b/src/assets/styles/main.scss @@ -2,7 +2,6 @@ @import "variables"; @import "notifications"; -@import "leaflet"; .tertiary { color: $tertiary; diff --git a/src/environments/environment.dev.ts b/src/environments/environment.dev.ts index 4c6acfb..964b9a4 100644 --- a/src/environments/environment.dev.ts +++ b/src/environments/environment.dev.ts @@ -1,5 +1,5 @@ export const environment = { prodMode: false, - tileServerUrl: './tiles/dark-matter/dark_nolabels/{z}/{x}/{y}{r}.png', + tileServerUrls: ['./tiles/dark-matter/dark_nolabels/{z}/{x}/{y}{r}.png'], logLevel: 1 // debug }; diff --git a/src/environments/environment.ts b/src/environments/environment.ts index 1032da9..4a3706c 100644 --- a/src/environments/environment.ts +++ b/src/environments/environment.ts @@ -2,6 +2,10 @@ export const environment = { prodMode: true, // as we have no backend on GitHub pages... - tileServerUrl: 'https://basemaps.cartocdn.com/dark_nolabels/{z}/{x}/{y}{r}.png', + tileServerUrls: [ + 'https://1.basemaps.cartocdn.com/dark_nolabels/{z}/{x}/{y}{r}.png', + 'https://2.basemaps.cartocdn.com/dark_nolabels/{z}/{x}/{y}{r}.png', + 'https://3.basemaps.cartocdn.com/dark_nolabels/{z}/{x}/{y}{r}.png' + ], logLevel: 4 // warn };