map style
This commit is contained in:
parent
af7ac30926
commit
0d797519cb
25
.gitignore
vendored
25
.gitignore
vendored
@ -1,3 +1,24 @@
|
|||||||
node_modules/
|
# Logs
|
||||||
|
logs
|
||||||
|
*.log
|
||||||
|
npm-debug.log*
|
||||||
|
yarn-debug.log*
|
||||||
|
yarn-error.log*
|
||||||
|
pnpm-debug.log*
|
||||||
|
lerna-debug.log*
|
||||||
|
|
||||||
output.json
|
node_modules
|
||||||
|
dist
|
||||||
|
dist-ssr
|
||||||
|
*.local
|
||||||
|
|
||||||
|
# Editor directories and files
|
||||||
|
.vscode/*
|
||||||
|
!.vscode/extensions.json
|
||||||
|
.idea
|
||||||
|
.DS_Store
|
||||||
|
*.suo
|
||||||
|
*.ntvs*
|
||||||
|
*.njsproj
|
||||||
|
*.sln
|
||||||
|
*.sw?
|
||||||
24
browser/.gitignore
vendored
24
browser/.gitignore
vendored
@ -1,24 +0,0 @@
|
|||||||
# Logs
|
|
||||||
logs
|
|
||||||
*.log
|
|
||||||
npm-debug.log*
|
|
||||||
yarn-debug.log*
|
|
||||||
yarn-error.log*
|
|
||||||
pnpm-debug.log*
|
|
||||||
lerna-debug.log*
|
|
||||||
|
|
||||||
node_modules
|
|
||||||
dist
|
|
||||||
dist-ssr
|
|
||||||
*.local
|
|
||||||
|
|
||||||
# Editor directories and files
|
|
||||||
.vscode/*
|
|
||||||
!.vscode/extensions.json
|
|
||||||
.idea
|
|
||||||
.DS_Store
|
|
||||||
*.suo
|
|
||||||
*.ntvs*
|
|
||||||
*.njsproj
|
|
||||||
*.sln
|
|
||||||
*.sw?
|
|
||||||
@ -1,23 +1,26 @@
|
|||||||
import js from '@eslint/js'
|
import js from "@eslint/js";
|
||||||
import globals from 'globals'
|
import globals from "globals";
|
||||||
import reactHooks from 'eslint-plugin-react-hooks'
|
import reactHooks from "eslint-plugin-react-hooks";
|
||||||
import reactRefresh from 'eslint-plugin-react-refresh'
|
import reactRefresh from "eslint-plugin-react-refresh";
|
||||||
import tseslint from 'typescript-eslint'
|
import tseslint from "typescript-eslint";
|
||||||
import { globalIgnores } from 'eslint/config'
|
import { globalIgnores } from "eslint/config";
|
||||||
|
|
||||||
export default tseslint.config([
|
export default tseslint.config([
|
||||||
globalIgnores(['dist']),
|
globalIgnores(["dist"]),
|
||||||
{
|
{
|
||||||
files: ['**/*.{ts,tsx}'],
|
files: ["**/*.{ts,tsx}"],
|
||||||
extends: [
|
extends: [
|
||||||
js.configs.recommended,
|
js.configs.recommended,
|
||||||
tseslint.configs.recommended,
|
tseslint.configs.recommended,
|
||||||
reactHooks.configs['recommended-latest'],
|
reactHooks.configs["recommended-latest"],
|
||||||
reactRefresh.configs.vite,
|
reactRefresh.configs.vite,
|
||||||
],
|
],
|
||||||
languageOptions: {
|
languageOptions: {
|
||||||
ecmaVersion: 2020,
|
ecmaVersion: 2020,
|
||||||
globals: globals.browser,
|
globals: globals.browser,
|
||||||
},
|
},
|
||||||
|
rules: {
|
||||||
|
"@typescript-eslint/no-shadow": "error",
|
||||||
|
},
|
||||||
},
|
},
|
||||||
])
|
]);
|
||||||
|
|||||||
@ -14,25 +14,27 @@
|
|||||||
"geojson": "^0.5.0",
|
"geojson": "^0.5.0",
|
||||||
"geolib": "^3.3.4",
|
"geolib": "^3.3.4",
|
||||||
"leaflet": "^1.9.4",
|
"leaflet": "^1.9.4",
|
||||||
|
"leaflet-svg-shape-markers": "^1.4.0",
|
||||||
"magvar": "^2.0.0",
|
"magvar": "^2.0.0",
|
||||||
"react": "19.0.0-rc.1",
|
"react": "^19.1.0",
|
||||||
"react-dom": "19.0.0-rc.1",
|
"react-dom": "^19.1.0",
|
||||||
"react-leaflet": "5.0.0-rc.2"
|
"react-leaflet": "^5.0.0"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@eslint/js": "^9.30.1",
|
"@eslint/js": "^9.31.0",
|
||||||
"@types/leaflet": "^1.9.20",
|
"@types/leaflet": "^1.9.20",
|
||||||
|
"@types/node": "^24.0.13",
|
||||||
"@types/object-hash": "^3.0.6",
|
"@types/object-hash": "^3.0.6",
|
||||||
"@types/react": "^19.1.8",
|
"@types/react": "^19.1.8",
|
||||||
"@types/react-dom": "^19.1.6",
|
"@types/react-dom": "^19.1.6",
|
||||||
"@vitejs/plugin-react-swc": "^3.10.2",
|
"@vitejs/plugin-react-swc": "^3.10.2",
|
||||||
"eslint": "^9.30.1",
|
"eslint": "^9.31.0",
|
||||||
"eslint-plugin-react-hooks": "^5.2.0",
|
"eslint-plugin-react-hooks": "^5.2.0",
|
||||||
"eslint-plugin-react-refresh": "^0.4.20",
|
"eslint-plugin-react-refresh": "^0.4.20",
|
||||||
"globals": "^16.3.0",
|
"globals": "^16.3.0",
|
||||||
"object-hash": "^3.0.0",
|
"object-hash": "^3.0.0",
|
||||||
"typescript": "~5.8.3",
|
"typescript": "~5.8.3",
|
||||||
"typescript-eslint": "^8.35.1",
|
"typescript-eslint": "^8.36.0",
|
||||||
"vite": "^7.0.4"
|
"vite": "^7.0.4"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
94
browser/pnpm-lock.yaml
generated
94
browser/pnpm-lock.yaml
generated
@ -17,25 +17,31 @@ importers:
|
|||||||
leaflet:
|
leaflet:
|
||||||
specifier: ^1.9.4
|
specifier: ^1.9.4
|
||||||
version: 1.9.4
|
version: 1.9.4
|
||||||
|
leaflet-svg-shape-markers:
|
||||||
|
specifier: ^1.4.0
|
||||||
|
version: 1.4.0
|
||||||
magvar:
|
magvar:
|
||||||
specifier: ^2.0.0
|
specifier: ^2.0.0
|
||||||
version: 2.0.0
|
version: 2.0.0
|
||||||
react:
|
react:
|
||||||
specifier: 19.0.0-rc.1
|
specifier: ^19.1.0
|
||||||
version: 19.0.0-rc.1
|
version: 19.1.0
|
||||||
react-dom:
|
react-dom:
|
||||||
specifier: 19.0.0-rc.1
|
specifier: ^19.1.0
|
||||||
version: 19.0.0-rc.1(react@19.0.0-rc.1)
|
version: 19.1.0(react@19.1.0)
|
||||||
react-leaflet:
|
react-leaflet:
|
||||||
specifier: 5.0.0-rc.2
|
specifier: ^5.0.0
|
||||||
version: 5.0.0-rc.2(leaflet@1.9.4)(react-dom@19.0.0-rc.1(react@19.0.0-rc.1))(react@19.0.0-rc.1)
|
version: 5.0.0(leaflet@1.9.4)(react-dom@19.1.0(react@19.1.0))(react@19.1.0)
|
||||||
devDependencies:
|
devDependencies:
|
||||||
'@eslint/js':
|
'@eslint/js':
|
||||||
specifier: ^9.30.1
|
specifier: ^9.31.0
|
||||||
version: 9.31.0
|
version: 9.31.0
|
||||||
'@types/leaflet':
|
'@types/leaflet':
|
||||||
specifier: ^1.9.20
|
specifier: ^1.9.20
|
||||||
version: 1.9.20
|
version: 1.9.20
|
||||||
|
'@types/node':
|
||||||
|
specifier: ^24.0.13
|
||||||
|
version: 24.0.13
|
||||||
'@types/object-hash':
|
'@types/object-hash':
|
||||||
specifier: ^3.0.6
|
specifier: ^3.0.6
|
||||||
version: 3.0.6
|
version: 3.0.6
|
||||||
@ -47,9 +53,9 @@ importers:
|
|||||||
version: 19.1.6(@types/react@19.1.8)
|
version: 19.1.6(@types/react@19.1.8)
|
||||||
'@vitejs/plugin-react-swc':
|
'@vitejs/plugin-react-swc':
|
||||||
specifier: ^3.10.2
|
specifier: ^3.10.2
|
||||||
version: 3.10.2(vite@7.0.4)
|
version: 3.10.2(vite@7.0.4(@types/node@24.0.13))
|
||||||
eslint:
|
eslint:
|
||||||
specifier: ^9.30.1
|
specifier: ^9.31.0
|
||||||
version: 9.31.0
|
version: 9.31.0
|
||||||
eslint-plugin-react-hooks:
|
eslint-plugin-react-hooks:
|
||||||
specifier: ^5.2.0
|
specifier: ^5.2.0
|
||||||
@ -67,11 +73,11 @@ importers:
|
|||||||
specifier: ~5.8.3
|
specifier: ~5.8.3
|
||||||
version: 5.8.3
|
version: 5.8.3
|
||||||
typescript-eslint:
|
typescript-eslint:
|
||||||
specifier: ^8.35.1
|
specifier: ^8.36.0
|
||||||
version: 8.36.0(eslint@9.31.0)(typescript@5.8.3)
|
version: 8.36.0(eslint@9.31.0)(typescript@5.8.3)
|
||||||
vite:
|
vite:
|
||||||
specifier: ^7.0.4
|
specifier: ^7.0.4
|
||||||
version: 7.0.4
|
version: 7.0.4(@types/node@24.0.13)
|
||||||
|
|
||||||
packages:
|
packages:
|
||||||
|
|
||||||
@ -498,6 +504,9 @@ packages:
|
|||||||
'@types/leaflet@1.9.20':
|
'@types/leaflet@1.9.20':
|
||||||
resolution: {integrity: sha512-rooalPMlk61LCaLOvBF2VIf9M47HgMQqi5xQ9QRi7c8PkdIe0WrIi5IxXUXQjAdL0c+vcQ01mYWbthzmp9GHWw==}
|
resolution: {integrity: sha512-rooalPMlk61LCaLOvBF2VIf9M47HgMQqi5xQ9QRi7c8PkdIe0WrIi5IxXUXQjAdL0c+vcQ01mYWbthzmp9GHWw==}
|
||||||
|
|
||||||
|
'@types/node@24.0.13':
|
||||||
|
resolution: {integrity: sha512-Qm9OYVOFHFYg3wJoTSrz80hoec5Lia/dPp84do3X7dZvLikQvM1YpmvTBEdIr/e+U8HTkFjLHLnl78K/qjf+jQ==}
|
||||||
|
|
||||||
'@types/object-hash@3.0.6':
|
'@types/object-hash@3.0.6':
|
||||||
resolution: {integrity: sha512-fOBV8C1FIu2ELinoILQ+ApxcUKz4ngq+IWUYrxSGjXzzjUALijilampwkMgEtJ+h2njAW3pi853QpzNVCHB73w==}
|
resolution: {integrity: sha512-fOBV8C1FIu2ELinoILQ+ApxcUKz4ngq+IWUYrxSGjXzzjUALijilampwkMgEtJ+h2njAW3pi853QpzNVCHB73w==}
|
||||||
|
|
||||||
@ -830,6 +839,9 @@ packages:
|
|||||||
keyv@4.5.4:
|
keyv@4.5.4:
|
||||||
resolution: {integrity: sha512-oxVHkHR/EJf2CNXnWxRLW6mg7JyCCUcG0DtEGmL2ctUo1PNTin1PUil+r/+4r5MpVgC/fn1kjsx7mjSujKqIpw==}
|
resolution: {integrity: sha512-oxVHkHR/EJf2CNXnWxRLW6mg7JyCCUcG0DtEGmL2ctUo1PNTin1PUil+r/+4r5MpVgC/fn1kjsx7mjSujKqIpw==}
|
||||||
|
|
||||||
|
leaflet-svg-shape-markers@1.4.0:
|
||||||
|
resolution: {integrity: sha512-vUBwso51+4ZVGcLZbhdBGxz+xrbul5jDYxool2yTKbIjAC6rvOMLjr8YBTQbLaa1LBRBQIaWUbmCafdXm17pxw==}
|
||||||
|
|
||||||
leaflet@1.9.4:
|
leaflet@1.9.4:
|
||||||
resolution: {integrity: sha512-nxS1ynzJOmOlHp+iL3FyWqK89GtNL8U8rvlMOsQdTTssxZwCXh8N2NB3GDQOL+YR3XnWyZAxwQixURb+FA74PA==}
|
resolution: {integrity: sha512-nxS1ynzJOmOlHp+iL3FyWqK89GtNL8U8rvlMOsQdTTssxZwCXh8N2NB3GDQOL+YR3XnWyZAxwQixURb+FA74PA==}
|
||||||
|
|
||||||
@ -927,20 +939,20 @@ packages:
|
|||||||
queue-microtask@1.2.3:
|
queue-microtask@1.2.3:
|
||||||
resolution: {integrity: sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==}
|
resolution: {integrity: sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==}
|
||||||
|
|
||||||
react-dom@19.0.0-rc.1:
|
react-dom@19.1.0:
|
||||||
resolution: {integrity: sha512-k8MfDX+4G+eaa1cXXI9QF4d+pQtYol3nx8vauqRWUEOPqC7NQn2qmEqUsLoSd28rrZUL+R3T2VC+kZ2Hyx1geQ==}
|
resolution: {integrity: sha512-Xs1hdnE+DyKgeHJeJznQmYMIBG3TKIHJJT95Q58nHLSrElKlGQqDTR2HQ9fx5CN/Gk6Vh/kupBTDLU11/nDk/g==}
|
||||||
peerDependencies:
|
peerDependencies:
|
||||||
react: 19.0.0-rc.1
|
react: ^19.1.0
|
||||||
|
|
||||||
react-leaflet@5.0.0-rc.2:
|
react-leaflet@5.0.0:
|
||||||
resolution: {integrity: sha512-1xQGYG9mEIW+nfkQhqgHImwUuB1UDlnzYFSzv6PrBFDBeYrFmv0BbpwpNAFdJg/UQ2yz5UZSL7ZwlUxjwb8MZw==}
|
resolution: {integrity: sha512-CWbTpr5vcHw5bt9i4zSlPEVQdTVcML390TjeDG0cK59z1ylexpqC6M1PJFjV8jD7CF+ACBFsLIDs6DRMoLEofw==}
|
||||||
peerDependencies:
|
peerDependencies:
|
||||||
leaflet: ^1.9.0
|
leaflet: ^1.9.0
|
||||||
react: ^19.0.0
|
react: ^19.0.0
|
||||||
react-dom: ^19.0.0
|
react-dom: ^19.0.0
|
||||||
|
|
||||||
react@19.0.0-rc.1:
|
react@19.1.0:
|
||||||
resolution: {integrity: sha512-NZKln+uyPuyHchzP07I6GGYFxdAoaKhehgpCa3ltJGzwE31OYumLeshGaitA1R/fS5d9D2qpZVwTFAr6zCLM9w==}
|
resolution: {integrity: sha512-FS+XFBNvn3GTAWq26joslQgWNoFu08F4kl0J4CgdNKADkdSGXQyTCnKteIAJy96Br6YbpEU1LSzV5dYtjMkMDg==}
|
||||||
engines: {node: '>=0.10.0'}
|
engines: {node: '>=0.10.0'}
|
||||||
|
|
||||||
resolve-from@4.0.0:
|
resolve-from@4.0.0:
|
||||||
@ -959,8 +971,8 @@ packages:
|
|||||||
run-parallel@1.2.0:
|
run-parallel@1.2.0:
|
||||||
resolution: {integrity: sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==}
|
resolution: {integrity: sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==}
|
||||||
|
|
||||||
scheduler@0.25.0-rc.1:
|
scheduler@0.26.0:
|
||||||
resolution: {integrity: sha512-fVinv2lXqYpKConAMdergOl5owd0rY1O4P/QTe0aWKCqGtu7VsCt1iqQFxSJtqK4Lci/upVSBpGwVC7eWcuS9Q==}
|
resolution: {integrity: sha512-NlHwttCI/l5gCPR3D1nNXtWABUmBwvZpEQiD4IXSbIDq8BzLIK/7Ir5gTFSGZDUu37K5cMNp0hFtzO38sC7gWA==}
|
||||||
|
|
||||||
semver@7.7.2:
|
semver@7.7.2:
|
||||||
resolution: {integrity: sha512-RF0Fw+rO5AMf9MAyaRXI4AV0Ulj5lMHqVxxdSgiVbixSCXoEmmX/jk0CuJw4+3SqroYO9VoUh+HcuJivvtJemA==}
|
resolution: {integrity: sha512-RF0Fw+rO5AMf9MAyaRXI4AV0Ulj5lMHqVxxdSgiVbixSCXoEmmX/jk0CuJw4+3SqroYO9VoUh+HcuJivvtJemA==}
|
||||||
@ -1017,6 +1029,9 @@ packages:
|
|||||||
engines: {node: '>=14.17'}
|
engines: {node: '>=14.17'}
|
||||||
hasBin: true
|
hasBin: true
|
||||||
|
|
||||||
|
undici-types@7.8.0:
|
||||||
|
resolution: {integrity: sha512-9UJ2xGDvQ43tYyVMpuHlsgApydB8ZKfVYTsLDhXkFL/6gfkp+U8xTGdh8pMJv1SpZna0zxG1DwsKZsreLbXBxw==}
|
||||||
|
|
||||||
uri-js@4.4.1:
|
uri-js@4.4.1:
|
||||||
resolution: {integrity: sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==}
|
resolution: {integrity: sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==}
|
||||||
|
|
||||||
@ -1222,11 +1237,11 @@ snapshots:
|
|||||||
'@nodelib/fs.scandir': 2.1.5
|
'@nodelib/fs.scandir': 2.1.5
|
||||||
fastq: 1.19.1
|
fastq: 1.19.1
|
||||||
|
|
||||||
'@react-leaflet/core@3.0.0(leaflet@1.9.4)(react-dom@19.0.0-rc.1(react@19.0.0-rc.1))(react@19.0.0-rc.1)':
|
'@react-leaflet/core@3.0.0(leaflet@1.9.4)(react-dom@19.1.0(react@19.1.0))(react@19.1.0)':
|
||||||
dependencies:
|
dependencies:
|
||||||
leaflet: 1.9.4
|
leaflet: 1.9.4
|
||||||
react: 19.0.0-rc.1
|
react: 19.1.0
|
||||||
react-dom: 19.0.0-rc.1(react@19.0.0-rc.1)
|
react-dom: 19.1.0(react@19.1.0)
|
||||||
|
|
||||||
'@rolldown/pluginutils@1.0.0-beta.11': {}
|
'@rolldown/pluginutils@1.0.0-beta.11': {}
|
||||||
|
|
||||||
@ -1352,6 +1367,10 @@ snapshots:
|
|||||||
dependencies:
|
dependencies:
|
||||||
'@types/geojson': 7946.0.16
|
'@types/geojson': 7946.0.16
|
||||||
|
|
||||||
|
'@types/node@24.0.13':
|
||||||
|
dependencies:
|
||||||
|
undici-types: 7.8.0
|
||||||
|
|
||||||
'@types/object-hash@3.0.6': {}
|
'@types/object-hash@3.0.6': {}
|
||||||
|
|
||||||
'@types/react-dom@19.1.6(@types/react@19.1.8)':
|
'@types/react-dom@19.1.6(@types/react@19.1.8)':
|
||||||
@ -1454,11 +1473,11 @@ snapshots:
|
|||||||
'@typescript-eslint/types': 8.36.0
|
'@typescript-eslint/types': 8.36.0
|
||||||
eslint-visitor-keys: 4.2.1
|
eslint-visitor-keys: 4.2.1
|
||||||
|
|
||||||
'@vitejs/plugin-react-swc@3.10.2(vite@7.0.4)':
|
'@vitejs/plugin-react-swc@3.10.2(vite@7.0.4(@types/node@24.0.13))':
|
||||||
dependencies:
|
dependencies:
|
||||||
'@rolldown/pluginutils': 1.0.0-beta.11
|
'@rolldown/pluginutils': 1.0.0-beta.11
|
||||||
'@swc/core': 1.12.11
|
'@swc/core': 1.12.11
|
||||||
vite: 7.0.4
|
vite: 7.0.4(@types/node@24.0.13)
|
||||||
transitivePeerDependencies:
|
transitivePeerDependencies:
|
||||||
- '@swc/helpers'
|
- '@swc/helpers'
|
||||||
|
|
||||||
@ -1731,6 +1750,8 @@ snapshots:
|
|||||||
dependencies:
|
dependencies:
|
||||||
json-buffer: 3.0.1
|
json-buffer: 3.0.1
|
||||||
|
|
||||||
|
leaflet-svg-shape-markers@1.4.0: {}
|
||||||
|
|
||||||
leaflet@1.9.4: {}
|
leaflet@1.9.4: {}
|
||||||
|
|
||||||
levn@0.4.1:
|
levn@0.4.1:
|
||||||
@ -1812,19 +1833,19 @@ snapshots:
|
|||||||
|
|
||||||
queue-microtask@1.2.3: {}
|
queue-microtask@1.2.3: {}
|
||||||
|
|
||||||
react-dom@19.0.0-rc.1(react@19.0.0-rc.1):
|
react-dom@19.1.0(react@19.1.0):
|
||||||
dependencies:
|
dependencies:
|
||||||
react: 19.0.0-rc.1
|
react: 19.1.0
|
||||||
scheduler: 0.25.0-rc.1
|
scheduler: 0.26.0
|
||||||
|
|
||||||
react-leaflet@5.0.0-rc.2(leaflet@1.9.4)(react-dom@19.0.0-rc.1(react@19.0.0-rc.1))(react@19.0.0-rc.1):
|
react-leaflet@5.0.0(leaflet@1.9.4)(react-dom@19.1.0(react@19.1.0))(react@19.1.0):
|
||||||
dependencies:
|
dependencies:
|
||||||
'@react-leaflet/core': 3.0.0(leaflet@1.9.4)(react-dom@19.0.0-rc.1(react@19.0.0-rc.1))(react@19.0.0-rc.1)
|
'@react-leaflet/core': 3.0.0(leaflet@1.9.4)(react-dom@19.1.0(react@19.1.0))(react@19.1.0)
|
||||||
leaflet: 1.9.4
|
leaflet: 1.9.4
|
||||||
react: 19.0.0-rc.1
|
react: 19.1.0
|
||||||
react-dom: 19.0.0-rc.1(react@19.0.0-rc.1)
|
react-dom: 19.1.0(react@19.1.0)
|
||||||
|
|
||||||
react@19.0.0-rc.1: {}
|
react@19.1.0: {}
|
||||||
|
|
||||||
resolve-from@4.0.0: {}
|
resolve-from@4.0.0: {}
|
||||||
|
|
||||||
@ -1860,7 +1881,7 @@ snapshots:
|
|||||||
dependencies:
|
dependencies:
|
||||||
queue-microtask: 1.2.3
|
queue-microtask: 1.2.3
|
||||||
|
|
||||||
scheduler@0.25.0-rc.1: {}
|
scheduler@0.26.0: {}
|
||||||
|
|
||||||
semver@7.7.2: {}
|
semver@7.7.2: {}
|
||||||
|
|
||||||
@ -1907,11 +1928,13 @@ snapshots:
|
|||||||
|
|
||||||
typescript@5.8.3: {}
|
typescript@5.8.3: {}
|
||||||
|
|
||||||
|
undici-types@7.8.0: {}
|
||||||
|
|
||||||
uri-js@4.4.1:
|
uri-js@4.4.1:
|
||||||
dependencies:
|
dependencies:
|
||||||
punycode: 2.3.1
|
punycode: 2.3.1
|
||||||
|
|
||||||
vite@7.0.4:
|
vite@7.0.4(@types/node@24.0.13):
|
||||||
dependencies:
|
dependencies:
|
||||||
esbuild: 0.25.6
|
esbuild: 0.25.6
|
||||||
fdir: 6.4.6(picomatch@4.0.2)
|
fdir: 6.4.6(picomatch@4.0.2)
|
||||||
@ -1920,6 +1943,7 @@ snapshots:
|
|||||||
rollup: 4.45.0
|
rollup: 4.45.0
|
||||||
tinyglobby: 0.2.14
|
tinyglobby: 0.2.14
|
||||||
optionalDependencies:
|
optionalDependencies:
|
||||||
|
'@types/node': 24.0.13
|
||||||
fsevents: 2.3.3
|
fsevents: 2.3.3
|
||||||
|
|
||||||
which@2.0.2:
|
which@2.0.2:
|
||||||
|
|||||||
@ -3,6 +3,7 @@ import Parser from "./parser/parser";
|
|||||||
import { createRef, useEffect, useState } from "react";
|
import { createRef, useEffect, useState } from "react";
|
||||||
import hash from "object-hash";
|
import hash from "object-hash";
|
||||||
import Leaflet from "leaflet";
|
import Leaflet from "leaflet";
|
||||||
|
import "leaflet-svg-shape-markers";
|
||||||
import L from "leaflet";
|
import L from "leaflet";
|
||||||
|
|
||||||
const parser = await Parser.instance();
|
const parser = await Parser.instance();
|
||||||
@ -11,7 +12,7 @@ const terminals = [10394, 10395, 10475, 10480, 10482, 10485, 10653];
|
|||||||
|
|
||||||
function App() {
|
function App() {
|
||||||
const [selectedTerminal, setSelectedTerminal] = useState(terminals[0]);
|
const [selectedTerminal, setSelectedTerminal] = useState(terminals[0]);
|
||||||
const [procedure, setProcedure] = useState<string>();
|
const [procedure, setProcedure] = useState<object>();
|
||||||
|
|
||||||
const mapRef = createRef<Leaflet.Map>();
|
const mapRef = createRef<Leaflet.Map>();
|
||||||
const layerRef = createRef<Leaflet.GeoJSON>();
|
const layerRef = createRef<Leaflet.GeoJSON>();
|
||||||
@ -49,26 +50,40 @@ function App() {
|
|||||||
<GeoJSON
|
<GeoJSON
|
||||||
key={hash(procedure ?? "") + "lines"}
|
key={hash(procedure ?? "") + "lines"}
|
||||||
data={procedure}
|
data={procedure}
|
||||||
style={{
|
style={({ properties }) => ({
|
||||||
color: "#00ffff",
|
color: "#ff00ff",
|
||||||
stroke: true,
|
stroke: true,
|
||||||
weight: 5,
|
weight: 5,
|
||||||
opacity: 1,
|
opacity: 1,
|
||||||
}}
|
dashArray: properties.isManual ? "20, 20" : undefined,
|
||||||
|
})}
|
||||||
filter={(feature) => feature.geometry.type !== "Point"}
|
filter={(feature) => feature.geometry.type !== "Point"}
|
||||||
ref={layerRef}
|
ref={layerRef}
|
||||||
/>
|
/>
|
||||||
<GeoJSON
|
<GeoJSON
|
||||||
key={hash(procedure ?? "") + "points"}
|
key={hash(procedure ?? "") + "points"}
|
||||||
data={procedure}
|
data={procedure}
|
||||||
style={(feature) => ({
|
style={{
|
||||||
color: feature.properties["marker-color"],
|
color: "black",
|
||||||
stroke: false,
|
|
||||||
fill: true,
|
fill: true,
|
||||||
fillOpacity: 1,
|
fillColor: "transparent",
|
||||||
})}
|
stroke: true,
|
||||||
pointToLayer={(_, latlng) => {
|
weight: 3,
|
||||||
return L.circleMarker(latlng, { radius: 5 });
|
}}
|
||||||
|
pointToLayer={({ properties }, latlng) => {
|
||||||
|
if (properties.isFlyOver)
|
||||||
|
return L.shapeMarker(latlng, {
|
||||||
|
shape: "triangle",
|
||||||
|
radius: 6,
|
||||||
|
});
|
||||||
|
if (properties.isIntersection)
|
||||||
|
return L.circleMarker(latlng, { radius: 6 });
|
||||||
|
|
||||||
|
return L.shapeMarker(latlng, {
|
||||||
|
shape: "star-4",
|
||||||
|
radius: 10,
|
||||||
|
rotation: 45,
|
||||||
|
});
|
||||||
}}
|
}}
|
||||||
onEachFeature={({ geometry, properties }, layer) => {
|
onEachFeature={({ geometry, properties }, layer) => {
|
||||||
if (geometry.type === "Point") {
|
if (geometry.type === "Point") {
|
||||||
|
|||||||
@ -2,12 +2,13 @@ import Parser from "./parser.ts";
|
|||||||
|
|
||||||
// mutate fetch to be local
|
// mutate fetch to be local
|
||||||
|
|
||||||
// @ts-ignore
|
// @ts-expect-error Global override
|
||||||
|
// eslint-disable-next-line no-global-assign
|
||||||
fetch = async (path: string) => {
|
fetch = async (path: string) => {
|
||||||
// @ts-ignore
|
|
||||||
const fs = await import("fs");
|
const fs = await import("fs");
|
||||||
return {
|
return {
|
||||||
json: () => JSON.parse(fs.readFileSync(`public/${path}`)),
|
json: () =>
|
||||||
|
JSON.parse(fs.readFileSync(`public/${path}`) as unknown as string),
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@ -35,9 +35,9 @@ class Parser {
|
|||||||
|
|
||||||
public static instance = async () => {
|
public static instance = async () => {
|
||||||
if (!Parser._instance) {
|
if (!Parser._instance) {
|
||||||
const waypoints = await (await fetch("navdata/Waypoints.json")).json();
|
const waypoints = await (await fetch("NavData/Waypoints.json")).json();
|
||||||
const runways = await (await fetch("navdata/Runways.json")).json();
|
const runways = await (await fetch("NavData/Runways.json")).json();
|
||||||
const terminals = await (await fetch("navdata/Terminals.json")).json();
|
const terminals = await (await fetch("NavData/Terminals.json")).json();
|
||||||
|
|
||||||
Parser._instance = new Parser(waypoints, runways, terminals);
|
Parser._instance = new Parser(waypoints, runways, terminals);
|
||||||
}
|
}
|
||||||
@ -71,12 +71,12 @@ class Parser {
|
|||||||
if (!runway) throw new Error("Procedure links to non existent Runway");
|
if (!runway) throw new Error("Procedure links to non existent Runway");
|
||||||
// Load procedure
|
// Load procedure
|
||||||
const procedure = (await (
|
const procedure = (await (
|
||||||
await fetch(`navdata/TermID_${terminalID}.json`)
|
await fetch(`NavData/TermID_${terminalID}.json`)
|
||||||
).json()) as TerminalEntry[];
|
).json()) as TerminalEntry[];
|
||||||
|
|
||||||
// Output variables
|
// Output variables
|
||||||
const navFixes: NavFix[] = [];
|
const navFixes: NavFix[] = [];
|
||||||
const lineSegments: { line: LineSegment[] }[] = [];
|
const lineSegments: { line: LineSegment[]; [x: string]: unknown }[] = [];
|
||||||
|
|
||||||
// Initials
|
// Initials
|
||||||
navFixes.push({
|
navFixes.push({
|
||||||
@ -167,7 +167,7 @@ class Parser {
|
|||||||
);
|
);
|
||||||
if (fixToAdd) navFixes.push(fixToAdd);
|
if (fixToAdd) navFixes.push(fixToAdd);
|
||||||
if (lineToAdd) {
|
if (lineToAdd) {
|
||||||
lineSegments.push({ line: lineToAdd });
|
lineSegments.push({ line: lineToAdd, isManual: true });
|
||||||
updateLastCourse(lineToAdd);
|
updateLastCourse(lineToAdd);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
@ -256,7 +256,7 @@ class Parser {
|
|||||||
);
|
);
|
||||||
if (fixToAdd) navFixes.push(fixToAdd);
|
if (fixToAdd) navFixes.push(fixToAdd);
|
||||||
if (lineToAdd) {
|
if (lineToAdd) {
|
||||||
lineSegments.push({ line: lineToAdd });
|
lineSegments.push({ line: lineToAdd, isManual: true });
|
||||||
updateLastCourse(lineToAdd);
|
updateLastCourse(lineToAdd);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|||||||
@ -11,7 +11,6 @@ export const TerminatorsAF = (
|
|||||||
latitude: leg.WptLat,
|
latitude: leg.WptLat,
|
||||||
longitude: leg.WptLon,
|
longitude: leg.WptLon,
|
||||||
name: waypoint?.Ident ?? undefined,
|
name: waypoint?.Ident ?? undefined,
|
||||||
"marker-color": leg.IsFlyOver ? "#ff0000" : undefined,
|
|
||||||
isFlyOver: leg.IsFlyOver,
|
isFlyOver: leg.IsFlyOver,
|
||||||
altitude: leg.Alt ? leg.Alt.parseAltitude() : previousFix.altitude,
|
altitude: leg.Alt ? leg.Alt.parseAltitude() : previousFix.altitude,
|
||||||
speed: leg.SpeedLimit
|
speed: leg.SpeedLimit
|
||||||
|
|||||||
@ -11,7 +11,6 @@ export const TerminatorsCF = (
|
|||||||
latitude: leg.WptLat,
|
latitude: leg.WptLat,
|
||||||
longitude: leg.WptLon,
|
longitude: leg.WptLon,
|
||||||
name: waypoint?.Ident ?? undefined,
|
name: waypoint?.Ident ?? undefined,
|
||||||
"marker-color": leg.IsFlyOver ? "#ff0000" : undefined,
|
|
||||||
isFlyOver: leg.IsFlyOver,
|
isFlyOver: leg.IsFlyOver,
|
||||||
altitude: leg.Alt ? leg.Alt.parseAltitude() : previousFix.altitude,
|
altitude: leg.Alt ? leg.Alt.parseAltitude() : previousFix.altitude,
|
||||||
speed: leg.SpeedLimit
|
speed: leg.SpeedLimit
|
||||||
|
|||||||
@ -19,7 +19,6 @@ export const TerminatorsCI = (
|
|||||||
nextFix,
|
nextFix,
|
||||||
crs
|
crs
|
||||||
)!,
|
)!,
|
||||||
"marker-color": leg.IsFlyOver ? "#ff0000" : undefined,
|
|
||||||
isFlyOver: leg.IsFlyOver,
|
isFlyOver: leg.IsFlyOver,
|
||||||
altitude: leg.Alt ? leg.Alt.parseAltitude() : previousFix.altitude,
|
altitude: leg.Alt ? leg.Alt.parseAltitude() : previousFix.altitude,
|
||||||
speed: leg.SpeedLimit
|
speed: leg.SpeedLimit
|
||||||
|
|||||||
@ -16,7 +16,6 @@ export const TerminatorsCR = (
|
|||||||
{ latitude: leg.NavLat, longitude: leg.NavLon },
|
{ latitude: leg.NavLat, longitude: leg.NavLon },
|
||||||
leg.NavBear.toTrue({ latitude: leg.NavLat, longitude: leg.NavLon })
|
leg.NavBear.toTrue({ latitude: leg.NavLat, longitude: leg.NavLon })
|
||||||
)!,
|
)!,
|
||||||
"marker-color": leg.IsFlyOver ? "#ff0000" : undefined,
|
|
||||||
isFlyOver: leg.IsFlyOver,
|
isFlyOver: leg.IsFlyOver,
|
||||||
altitude: leg.Alt ? leg.Alt.parseAltitude() : previousFix.altitude,
|
altitude: leg.Alt ? leg.Alt.parseAltitude() : previousFix.altitude,
|
||||||
speed: leg.SpeedLimit
|
speed: leg.SpeedLimit
|
||||||
|
|||||||
@ -13,7 +13,6 @@ export const TerminatorsRF = (
|
|||||||
latitude: leg.WptLat,
|
latitude: leg.WptLat,
|
||||||
longitude: leg.WptLon,
|
longitude: leg.WptLon,
|
||||||
name: waypoint?.Ident ?? undefined,
|
name: waypoint?.Ident ?? undefined,
|
||||||
"marker-color": leg.IsFlyOver ? "#ff0000" : undefined,
|
|
||||||
isFlyOver: leg.IsFlyOver,
|
isFlyOver: leg.IsFlyOver,
|
||||||
altitude: leg.Alt ? leg.Alt.parseAltitude() : previousFix.altitude,
|
altitude: leg.Alt ? leg.Alt.parseAltitude() : previousFix.altitude,
|
||||||
speed: leg.SpeedLimit
|
speed: leg.SpeedLimit
|
||||||
|
|||||||
@ -12,7 +12,6 @@ export const TerminatorsTF = (
|
|||||||
latitude: leg.WptLat,
|
latitude: leg.WptLat,
|
||||||
longitude: leg.WptLon,
|
longitude: leg.WptLon,
|
||||||
name: waypoint?.Ident ?? undefined,
|
name: waypoint?.Ident ?? undefined,
|
||||||
"marker-color": leg.IsFlyOver ? "#ff0000" : undefined,
|
|
||||||
isFlyOver: leg.IsFlyOver,
|
isFlyOver: leg.IsFlyOver,
|
||||||
altitude: leg.Alt ? leg.Alt.parseAltitude() : previousFix.altitude,
|
altitude: leg.Alt ? leg.Alt.parseAltitude() : previousFix.altitude,
|
||||||
speed: leg.SpeedLimit
|
speed: leg.SpeedLimit
|
||||||
|
|||||||
@ -19,7 +19,6 @@ export const TerminatorsVA = (
|
|||||||
leg.Course.toTrue(previousFix)
|
leg.Course.toTrue(previousFix)
|
||||||
),
|
),
|
||||||
name: leg.Alt,
|
name: leg.Alt,
|
||||||
"marker-color": "#ff0000",
|
|
||||||
isFlyOver: true,
|
isFlyOver: true,
|
||||||
altitude: leg.Alt.parseAltitude(),
|
altitude: leg.Alt.parseAltitude(),
|
||||||
speed: leg.SpeedLimit
|
speed: leg.SpeedLimit
|
||||||
|
|||||||
@ -15,7 +15,6 @@ export const TerminatorsVD = (
|
|||||||
leg.Course.toTrue(previousFix)
|
leg.Course.toTrue(previousFix)
|
||||||
),
|
),
|
||||||
name: leg.Distance.toString(),
|
name: leg.Distance.toString(),
|
||||||
"marker-color": "#ff0000",
|
|
||||||
isFlyOver: true,
|
isFlyOver: true,
|
||||||
altitude: leg.Alt ? leg.Alt.parseAltitude() : previousFix.altitude,
|
altitude: leg.Alt ? leg.Alt.parseAltitude() : previousFix.altitude,
|
||||||
speed: leg.SpeedLimit
|
speed: leg.SpeedLimit
|
||||||
|
|||||||
@ -20,7 +20,6 @@ export const TerminatorsVI = (
|
|||||||
nextFix,
|
nextFix,
|
||||||
crs
|
crs
|
||||||
)!,
|
)!,
|
||||||
"marker-color": leg.IsFlyOver ? "#ff0000" : undefined,
|
|
||||||
isFlyOver: leg.IsFlyOver,
|
isFlyOver: leg.IsFlyOver,
|
||||||
altitude: leg.Alt ? leg.Alt.parseAltitude() : previousFix.altitude,
|
altitude: leg.Alt ? leg.Alt.parseAltitude() : previousFix.altitude,
|
||||||
speed: leg.SpeedLimit
|
speed: leg.SpeedLimit
|
||||||
|
|||||||
@ -85,5 +85,11 @@ export const computeIntersection = (
|
|||||||
const lat = φ3.toDegrees();
|
const lat = φ3.toDegrees();
|
||||||
const lon = λ3.toDegrees();
|
const lon = λ3.toDegrees();
|
||||||
|
|
||||||
return { ...p1, latitude: lat, longitude: lon, name: "INTC" };
|
return {
|
||||||
|
...p1,
|
||||||
|
latitude: lat,
|
||||||
|
longitude: lon,
|
||||||
|
name: "INTC",
|
||||||
|
isIntersection: true,
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|||||||
2
browser/src/types/geojson.d.ts
vendored
2
browser/src/types/geojson.d.ts
vendored
@ -1,3 +1,3 @@
|
|||||||
declare module "geojson" {
|
declare module "geojson" {
|
||||||
export const parse: (data: any, format: any) => any;
|
export const parse: (data: object, format: object) => object;
|
||||||
}
|
}
|
||||||
|
|||||||
24
browser/src/types/leaflet.d.ts
vendored
Normal file
24
browser/src/types/leaflet.d.ts
vendored
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
//eslint-disable-next-line @typescript-eslint/no-unused-vars
|
||||||
|
import * as L from "leaflet";
|
||||||
|
|
||||||
|
declare module "leaflet" {
|
||||||
|
export function shapeMarker(
|
||||||
|
latlng: LatLngExpression,
|
||||||
|
options?: PathOptions & {
|
||||||
|
shape?:
|
||||||
|
| "diamond"
|
||||||
|
| "square"
|
||||||
|
| "triangle"
|
||||||
|
| "triangle-up"
|
||||||
|
| "triangle-down"
|
||||||
|
| "arrowhead"
|
||||||
|
| "arrowhead-up"
|
||||||
|
| "arrowhead-down"
|
||||||
|
| "circle"
|
||||||
|
| "x"
|
||||||
|
| string;
|
||||||
|
radius?: number;
|
||||||
|
rotation?: number;
|
||||||
|
}
|
||||||
|
): Path;
|
||||||
|
}
|
||||||
2
browser/src/types/types.d.ts
vendored
2
browser/src/types/types.d.ts
vendored
@ -85,6 +85,8 @@ export declare global {
|
|||||||
"marker-color"?: string;
|
"marker-color"?: string;
|
||||||
altitudeConstraint?: string;
|
altitudeConstraint?: string;
|
||||||
speedConstraint?: number;
|
speedConstraint?: number;
|
||||||
|
// For map
|
||||||
|
isIntersection?: boolean;
|
||||||
};
|
};
|
||||||
|
|
||||||
type LineSegment = [number, number];
|
type LineSegment = [number, number];
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user