feat(map): 使用 OpenLayers 实现分屏地图功能

- 重写 SplitScreenManager 类,实现基于 OpenLayers 的分屏地图管理- 新增 tiandituLayers.js 工具模块,用于创建天地图图层
- 更新 TiandituMap.vue 组件,支持 OpenLayers 地图渲染
-调整 SplitScreenMap.vue组件,使用新的分屏地图管理器
- 移除对 @arcgis/core 的依赖,改为使用 ol (OpenLayers)
This commit is contained in:
zhangtao 2025-07-31 22:54:49 +08:00
parent 3efb239b23
commit 66f9ec56e0
8 changed files with 602 additions and 961 deletions

877
package-lock.json generated
View File

@ -8,7 +8,7 @@
"name": "geo-vue-app", "name": "geo-vue-app",
"version": "0.0.0", "version": "0.0.0",
"dependencies": { "dependencies": {
"@arcgis/core": "^4.33.11", "ol": "^8.2.0",
"vue": "^3.4.0" "vue": "^3.4.0"
}, },
"devDependencies": { "devDependencies": {
@ -16,44 +16,6 @@
"vite": "^5.0.0" "vite": "^5.0.0"
} }
}, },
"node_modules/@arcgis/components-utils": {
"version": "4.33.12",
"resolved": "https://registry.npmmirror.com/@arcgis/components-utils/-/components-utils-4.33.12.tgz",
"integrity": "sha512-B3cISRLbWEfTTYyjwLR5M5CT38fq6EerAeV8h+nYZMu7Zijy8rWrFLpDXGmDu9eD+KaWZG74Zq065UQv3nhWtg==",
"license": "SEE LICENSE IN LICENSE.md",
"dependencies": {
"tslib": "^2.8.1"
}
},
"node_modules/@arcgis/core": {
"version": "4.33.11",
"resolved": "https://registry.npmmirror.com/@arcgis/core/-/core-4.33.11.tgz",
"integrity": "sha512-mnBxie2VWktXylzEL0vTYY2brUFoLjyTlJI5Zlt8fQbTkqEr73QMOMkpM2zudFN18wGyWge1UvI1pTjWwtGLww==",
"license": "SEE LICENSE IN copyright.txt",
"dependencies": {
"@esri/arcgis-html-sanitizer": "~4.1.0",
"@esri/calcite-components": "^3.2.1",
"@vaadin/grid": "~24.7.6",
"@zip.js/zip.js": "~2.7.62",
"luxon": "~3.6.1",
"marked": "~15.0.12"
}
},
"node_modules/@arcgis/lumina": {
"version": "4.33.12",
"resolved": "https://registry.npmmirror.com/@arcgis/lumina/-/lumina-4.33.12.tgz",
"integrity": "sha512-KSkL9AfZX6R6OyxTesa7QLIYedtX2Cje4+9PbcZY5R/txiqGHeunnF842r/xuuNGWrp0L6hQI9zCKCaZkPqzPg==",
"license": "SEE LICENSE IN LICENSE.md",
"dependencies": {
"@arcgis/components-utils": "4.33.12",
"@lit-labs/ssr": "^3.2.2",
"@lit-labs/ssr-client": "^1.1.7",
"@lit/context": "^1.1.5",
"csstype": "^3.1.3",
"lit": "^3.3.0",
"tslib": "^2.8.1"
}
},
"node_modules/@babel/helper-string-parser": { "node_modules/@babel/helper-string-parser": {
"version": "7.27.1", "version": "7.27.1",
"resolved": "https://registry.npmmirror.com/@babel/helper-string-parser/-/helper-string-parser-7.27.1.tgz", "resolved": "https://registry.npmmirror.com/@babel/helper-string-parser/-/helper-string-parser-7.27.1.tgz",
@ -491,174 +453,18 @@
"node": ">=12" "node": ">=12"
} }
}, },
"node_modules/@esri/arcgis-html-sanitizer": {
"version": "4.1.0",
"resolved": "https://registry.npmmirror.com/@esri/arcgis-html-sanitizer/-/arcgis-html-sanitizer-4.1.0.tgz",
"integrity": "sha512-einEveDJ/k1180NOp78PB/4Hje9eBy3dyOGLLtLn6bSkizpUfCwuYBIXOA7Y3F/k/BsTQXgKqUVwQ0eiscWMdA==",
"license": "Apache-2.0",
"dependencies": {
"xss": "1.0.13"
},
"engines": {
"node": ">=18.0.0"
}
},
"node_modules/@esri/calcite-components": {
"version": "3.2.1",
"resolved": "https://registry.npmmirror.com/@esri/calcite-components/-/calcite-components-3.2.1.tgz",
"integrity": "sha512-NRBW/bhT4sQM5RAZF7W8/VymaOLgIzaR6yTZFI270Ig4NiQ4DRexjdeo/SwDMBlswFtBw5iya+/h+fAur2+Hlg==",
"license": "SEE LICENSE.md",
"dependencies": {
"@arcgis/components-utils": "^4.33.0-next.121",
"@arcgis/lumina": "^4.33.0-next.121",
"@esri/calcite-ui-icons": "4.2.0",
"@floating-ui/dom": "^1.6.12",
"@floating-ui/utils": "^0.2.8",
"@types/sortablejs": "^1.15.8",
"color": "^5.0.0",
"composed-offset-position": "^0.0.6",
"dayjs": "^1.11.13",
"focus-trap": "^7.6.2",
"interactjs": "^1.10.27",
"lodash-es": "^4.17.21",
"sortablejs": "^1.15.6",
"timezone-groups": "^0.10.4",
"type-fest": "^4.30.1"
}
},
"node_modules/@esri/calcite-ui-icons": {
"version": "4.2.0",
"resolved": "https://registry.npmmirror.com/@esri/calcite-ui-icons/-/calcite-ui-icons-4.2.0.tgz",
"integrity": "sha512-GS41gUt1tgnqG+U1a6yDRiKOHmuLST2uyOI7+cJ83JtLJ7CGduH9K6RERabTE2vRYbudaebI8jZgKNSNOHdGzw==",
"license": "SEE LICENSE.md",
"bin": {
"spriter": "bin/spriter.js"
}
},
"node_modules/@floating-ui/core": {
"version": "1.7.3",
"resolved": "https://registry.npmmirror.com/@floating-ui/core/-/core-1.7.3.tgz",
"integrity": "sha512-sGnvb5dmrJaKEZ+LDIpguvdX3bDlEllmv4/ClQ9awcmCZrlx5jQyyMWFM5kBI+EyNOCDDiKk8il0zeuX3Zlg/w==",
"license": "MIT",
"dependencies": {
"@floating-ui/utils": "^0.2.10"
}
},
"node_modules/@floating-ui/dom": {
"version": "1.7.3",
"resolved": "https://registry.npmmirror.com/@floating-ui/dom/-/dom-1.7.3.tgz",
"integrity": "sha512-uZA413QEpNuhtb3/iIKoYMSK07keHPYeXF02Zhd6e213j+d1NamLix/mCLxBUDW/Gx52sPH2m+chlUsyaBs/Ag==",
"license": "MIT",
"dependencies": {
"@floating-ui/core": "^1.7.3",
"@floating-ui/utils": "^0.2.10"
}
},
"node_modules/@floating-ui/utils": {
"version": "0.2.10",
"resolved": "https://registry.npmmirror.com/@floating-ui/utils/-/utils-0.2.10.tgz",
"integrity": "sha512-aGTxbpbg8/b5JfU1HXSrbH3wXZuLPJcNEcZQFMxLs3oSzgtVu6nFPkbbGGUvBcUjKV2YyB9Wxxabo+HEH9tcRQ==",
"license": "MIT"
},
"node_modules/@interactjs/types": {
"version": "1.10.27",
"resolved": "https://registry.npmmirror.com/@interactjs/types/-/types-1.10.27.tgz",
"integrity": "sha512-BUdv0cvs4H5ODuwft2Xp4eL8Vmi3LcihK42z0Ft/FbVJZoRioBsxH+LlsBdK4tAie7PqlKGy+1oyOncu1nQ6eA==",
"license": "MIT"
},
"node_modules/@jridgewell/sourcemap-codec": { "node_modules/@jridgewell/sourcemap-codec": {
"version": "1.5.4", "version": "1.5.4",
"resolved": "https://registry.npmmirror.com/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.5.4.tgz", "resolved": "https://registry.npmmirror.com/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.5.4.tgz",
"integrity": "sha512-VT2+G1VQs/9oz078bLrYbecdZKs912zQlkelYpuf+SXF+QvZDYJlbx/LSx+meSAwdDFnF8FVXW92AVjjkVmgFw==", "integrity": "sha512-VT2+G1VQs/9oz078bLrYbecdZKs912zQlkelYpuf+SXF+QvZDYJlbx/LSx+meSAwdDFnF8FVXW92AVjjkVmgFw==",
"license": "MIT" "license": "MIT"
}, },
"node_modules/@lit-labs/ssr": { "node_modules/@petamoriken/float16": {
"version": "3.3.1", "version": "3.9.2",
"resolved": "https://registry.npmmirror.com/@lit-labs/ssr/-/ssr-3.3.1.tgz", "resolved": "https://registry.npmmirror.com/@petamoriken/float16/-/float16-3.9.2.tgz",
"integrity": "sha512-JlF1PempxvzrGEpRFrF+Ki0MHzR3HA51SK8Zv0cFpW9p0bPW4k0FeCwrElCu371UEpXF7RcaE2wgYaE1az0XKg==", "integrity": "sha512-VgffxawQde93xKxT3qap3OH+meZf7VaSB5Sqd4Rqc+FP5alWbpOyan/7tRbOAvynjpG3GpdtAuGU/NdhQpmrog==",
"license": "BSD-3-Clause",
"dependencies": {
"@lit-labs/ssr-client": "^1.1.7",
"@lit-labs/ssr-dom-shim": "^1.3.0",
"@lit/reactive-element": "^2.0.4",
"@parse5/tools": "^0.3.0",
"@types/node": "^16.0.0",
"enhanced-resolve": "^5.10.0",
"lit": "^3.1.2",
"lit-element": "^4.0.4",
"lit-html": "^3.1.2",
"node-fetch": "^3.2.8",
"parse5": "^7.1.1"
},
"engines": {
"node": ">=13.9.0"
}
},
"node_modules/@lit-labs/ssr-client": {
"version": "1.1.7",
"resolved": "https://registry.npmmirror.com/@lit-labs/ssr-client/-/ssr-client-1.1.7.tgz",
"integrity": "sha512-VvqhY/iif3FHrlhkzEPsuX/7h/NqnfxLwVf0p8ghNIlKegRyRqgeaJevZ57s/u/LiFyKgqksRP5n+LmNvpxN+A==",
"license": "BSD-3-Clause",
"dependencies": {
"@lit/reactive-element": "^2.0.4",
"lit": "^3.1.2",
"lit-html": "^3.1.2"
}
},
"node_modules/@lit-labs/ssr-dom-shim": {
"version": "1.4.0",
"resolved": "https://registry.npmmirror.com/@lit-labs/ssr-dom-shim/-/ssr-dom-shim-1.4.0.tgz",
"integrity": "sha512-ficsEARKnmmW5njugNYKipTm4SFnbik7CXtoencDZzmzo/dQ+2Q0bgkzJuoJP20Aj0F+izzJjOqsnkd6F/o1bw==",
"license": "BSD-3-Clause"
},
"node_modules/@lit-labs/ssr/node_modules/@types/node": {
"version": "16.18.126",
"resolved": "https://registry.npmmirror.com/@types/node/-/node-16.18.126.tgz",
"integrity": "sha512-OTcgaiwfGFBKacvfwuHzzn1KLxH/er8mluiy8/uM3sGXHaRe73RrSIj01jow9t4kJEW633Ov+cOexXeiApTyAw==",
"license": "MIT" "license": "MIT"
}, },
"node_modules/@lit/context": {
"version": "1.1.6",
"resolved": "https://registry.npmmirror.com/@lit/context/-/context-1.1.6.tgz",
"integrity": "sha512-M26qDE6UkQbZA2mQ3RjJ3Gzd8TxP+/0obMgE5HfkfLhEEyYE3Bui4A5XHiGPjy0MUGAyxB3QgVuw2ciS0kHn6A==",
"license": "BSD-3-Clause",
"dependencies": {
"@lit/reactive-element": "^1.6.2 || ^2.1.0"
}
},
"node_modules/@lit/reactive-element": {
"version": "2.1.1",
"resolved": "https://registry.npmmirror.com/@lit/reactive-element/-/reactive-element-2.1.1.tgz",
"integrity": "sha512-N+dm5PAYdQ8e6UlywyyrgI2t++wFGXfHx+dSJ1oBrg6FAxUj40jId++EaRm80MKX5JnlH1sBsyZ5h0bcZKemCg==",
"license": "BSD-3-Clause",
"dependencies": {
"@lit-labs/ssr-dom-shim": "^1.4.0"
}
},
"node_modules/@open-wc/dedupe-mixin": {
"version": "1.4.0",
"resolved": "https://registry.npmmirror.com/@open-wc/dedupe-mixin/-/dedupe-mixin-1.4.0.tgz",
"integrity": "sha512-Sj7gKl1TLcDbF7B6KUhtvr+1UCxdhMbNY5KxdU5IfMFWqL8oy1ZeAcCANjoB1TL0AJTcPmcCFsCbHf8X2jGDUA==",
"license": "MIT"
},
"node_modules/@parse5/tools": {
"version": "0.3.0",
"resolved": "https://registry.npmmirror.com/@parse5/tools/-/tools-0.3.0.tgz",
"integrity": "sha512-zxRyTHkqb7WQMV8kTNBKWb1BeOFUKXBXTBWuxg9H9hfvQB3IwP6Iw2U75Ia5eyRxPNltmY7E8YAlz6zWwUnjKg==",
"license": "MIT",
"dependencies": {
"parse5": "^7.0.0"
}
},
"node_modules/@polymer/polymer": {
"version": "3.5.2",
"resolved": "https://registry.npmmirror.com/@polymer/polymer/-/polymer-3.5.2.tgz",
"integrity": "sha512-fWwImY/UH4bb2534DVSaX+Azs2yKg8slkMBHOyGeU2kKx7Xmxp6Lee0jP8p6B3d7c1gFUPB2Z976dTUtX81pQA==",
"license": "BSD-3-Clause",
"dependencies": {
"@webcomponents/shadycss": "^1.9.1"
}
},
"node_modules/@rollup/rollup-android-arm-eabi": { "node_modules/@rollup/rollup-android-arm-eabi": {
"version": "4.46.2", "version": "4.46.2",
"resolved": "https://registry.npmmirror.com/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.46.2.tgz", "resolved": "https://registry.npmmirror.com/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.46.2.tgz",
@ -958,199 +764,6 @@
"undici-types": "~7.8.0" "undici-types": "~7.8.0"
} }
}, },
"node_modules/@types/sortablejs": {
"version": "1.15.8",
"resolved": "https://registry.npmmirror.com/@types/sortablejs/-/sortablejs-1.15.8.tgz",
"integrity": "sha512-b79830lW+RZfwaztgs1aVPgbasJ8e7AXtZYHTELNXZPsERt4ymJdjV4OccDbHQAvHrCcFpbF78jkm0R6h/pZVg==",
"license": "MIT"
},
"node_modules/@types/trusted-types": {
"version": "2.0.7",
"resolved": "https://registry.npmmirror.com/@types/trusted-types/-/trusted-types-2.0.7.tgz",
"integrity": "sha512-ScaPdn1dQczgbl0QFTeTOmVHFULt394XJgOQNoyVhZ6r2vLnMLJfBPd53SB52T/3G36VI1/g2MZaX0cwDuXsfw==",
"license": "MIT"
},
"node_modules/@vaadin/a11y-base": {
"version": "24.7.11",
"resolved": "https://registry.npmmirror.com/@vaadin/a11y-base/-/a11y-base-24.7.11.tgz",
"integrity": "sha512-zNjv1ZJSQlxZxK+CPSMG0uet6owb0lw/zKFFLKSFqNRfVqyzW+SViQoxE22StQ5r4dwBxyZXuutu3iisIFwiwA==",
"license": "Apache-2.0",
"dependencies": {
"@open-wc/dedupe-mixin": "^1.3.0",
"@polymer/polymer": "^3.0.0",
"@vaadin/component-base": "~24.7.11",
"lit": "^3.0.0"
}
},
"node_modules/@vaadin/checkbox": {
"version": "24.7.11",
"resolved": "https://registry.npmmirror.com/@vaadin/checkbox/-/checkbox-24.7.11.tgz",
"integrity": "sha512-x4UZ+y/eXrK2AOESxkssjqJ+eQO1kZlFpXNfeLOBwIX8+mzmQpnV4B5roC9hHbX4V/J+ijlaY9YnYAZJaz6Acg==",
"license": "Apache-2.0",
"dependencies": {
"@open-wc/dedupe-mixin": "^1.3.0",
"@polymer/polymer": "^3.0.0",
"@vaadin/a11y-base": "~24.7.11",
"@vaadin/component-base": "~24.7.11",
"@vaadin/field-base": "~24.7.11",
"@vaadin/vaadin-lumo-styles": "~24.7.11",
"@vaadin/vaadin-material-styles": "~24.7.11",
"@vaadin/vaadin-themable-mixin": "~24.7.11",
"lit": "^3.0.0"
}
},
"node_modules/@vaadin/component-base": {
"version": "24.7.11",
"resolved": "https://registry.npmmirror.com/@vaadin/component-base/-/component-base-24.7.11.tgz",
"integrity": "sha512-KyRJT8clpAxExouD7DDDU0b7jxus0W+TqyUgbdHXfyLxKinf9AFsYKRLmRyIusVYRK9mT2QgT82t0m7nuw0bQA==",
"license": "Apache-2.0",
"dependencies": {
"@open-wc/dedupe-mixin": "^1.3.0",
"@polymer/polymer": "^3.0.0",
"@vaadin/vaadin-development-mode-detector": "^2.0.0",
"@vaadin/vaadin-usage-statistics": "^2.1.0",
"lit": "^3.0.0"
}
},
"node_modules/@vaadin/field-base": {
"version": "24.7.11",
"resolved": "https://registry.npmmirror.com/@vaadin/field-base/-/field-base-24.7.11.tgz",
"integrity": "sha512-5I1FVw9H/mJp9ZLurx/75/e0rjNLl8UGmNwCvV2pk7ibq7vrNzfa7dZSAgnp/MFBmvyZqHzUeZMpMnTPlfdbQQ==",
"license": "Apache-2.0",
"dependencies": {
"@open-wc/dedupe-mixin": "^1.3.0",
"@polymer/polymer": "^3.0.0",
"@vaadin/a11y-base": "~24.7.11",
"@vaadin/component-base": "~24.7.11",
"lit": "^3.0.0"
}
},
"node_modules/@vaadin/grid": {
"version": "24.7.11",
"resolved": "https://registry.npmmirror.com/@vaadin/grid/-/grid-24.7.11.tgz",
"integrity": "sha512-gZP7+vQDY6UZu0Lh27oIMzU2KEOcVe4n9336bHB6FaTZkovjMv7xpSfab/MWlHhdI7jETnW214pF5DnIVTHPcw==",
"license": "Apache-2.0",
"dependencies": {
"@open-wc/dedupe-mixin": "^1.3.0",
"@polymer/polymer": "^3.0.0",
"@vaadin/a11y-base": "~24.7.11",
"@vaadin/checkbox": "~24.7.11",
"@vaadin/component-base": "~24.7.11",
"@vaadin/lit-renderer": "~24.7.11",
"@vaadin/text-field": "~24.7.11",
"@vaadin/vaadin-lumo-styles": "~24.7.11",
"@vaadin/vaadin-material-styles": "~24.7.11",
"@vaadin/vaadin-themable-mixin": "~24.7.11",
"lit": "^3.0.0"
}
},
"node_modules/@vaadin/icon": {
"version": "24.7.11",
"resolved": "https://registry.npmmirror.com/@vaadin/icon/-/icon-24.7.11.tgz",
"integrity": "sha512-mJCdsQn7LzYMBdHk5MiyqfXJMe+i4AxBNDqCLC0akvB4pQFT9utWg3ighyPgcAGbnXhelU9pEu9EEhkhOZ2NYg==",
"license": "Apache-2.0",
"dependencies": {
"@open-wc/dedupe-mixin": "^1.3.0",
"@polymer/polymer": "^3.0.0",
"@vaadin/component-base": "~24.7.11",
"@vaadin/vaadin-lumo-styles": "~24.7.11",
"@vaadin/vaadin-themable-mixin": "~24.7.11",
"lit": "^3.0.0"
}
},
"node_modules/@vaadin/input-container": {
"version": "24.7.11",
"resolved": "https://registry.npmmirror.com/@vaadin/input-container/-/input-container-24.7.11.tgz",
"integrity": "sha512-6j0S2lG1ZMiVm06NDggHjtZ3AXEANP4wloM/GuhRP8Dot786f9ypkPqfWUqHV/LJPQ+kjpOvD6QsAF/xGm8mJQ==",
"license": "Apache-2.0",
"dependencies": {
"@polymer/polymer": "^3.0.0",
"@vaadin/component-base": "~24.7.11",
"@vaadin/vaadin-lumo-styles": "~24.7.11",
"@vaadin/vaadin-material-styles": "~24.7.11",
"@vaadin/vaadin-themable-mixin": "~24.7.11",
"lit": "^3.0.0"
}
},
"node_modules/@vaadin/lit-renderer": {
"version": "24.7.11",
"resolved": "https://registry.npmmirror.com/@vaadin/lit-renderer/-/lit-renderer-24.7.11.tgz",
"integrity": "sha512-IcUvORztp2USBuZnwwKr1VmamXQZTAs1QTpe+VWf9yglELX6lWAwA3fIAIAFwej+vBiO9v8XHPJK0bDiPiTLKA==",
"license": "Apache-2.0",
"dependencies": {
"lit": "^3.0.0"
}
},
"node_modules/@vaadin/text-field": {
"version": "24.7.11",
"resolved": "https://registry.npmmirror.com/@vaadin/text-field/-/text-field-24.7.11.tgz",
"integrity": "sha512-vnx/DJPyUzy9yXuj/gWGUHWQGjPIaRfeezV5E7MBpQLrwRcK/uDbnc2MqSsVkLEkClGQangmvDm6svX6KCzq7Q==",
"license": "Apache-2.0",
"dependencies": {
"@open-wc/dedupe-mixin": "^1.3.0",
"@polymer/polymer": "^3.0.0",
"@vaadin/a11y-base": "~24.7.11",
"@vaadin/component-base": "~24.7.11",
"@vaadin/field-base": "~24.7.11",
"@vaadin/input-container": "~24.7.11",
"@vaadin/vaadin-lumo-styles": "~24.7.11",
"@vaadin/vaadin-material-styles": "~24.7.11",
"@vaadin/vaadin-themable-mixin": "~24.7.11",
"lit": "^3.0.0"
}
},
"node_modules/@vaadin/vaadin-development-mode-detector": {
"version": "2.0.7",
"resolved": "https://registry.npmmirror.com/@vaadin/vaadin-development-mode-detector/-/vaadin-development-mode-detector-2.0.7.tgz",
"integrity": "sha512-9FhVhr0ynSR3X2ao+vaIEttcNU5XfzCbxtmYOV8uIRnUCtNgbvMOIcyGBvntsX9I5kvIP2dV3cFAOG9SILJzEA==",
"license": "Apache-2.0"
},
"node_modules/@vaadin/vaadin-lumo-styles": {
"version": "24.7.11",
"resolved": "https://registry.npmmirror.com/@vaadin/vaadin-lumo-styles/-/vaadin-lumo-styles-24.7.11.tgz",
"integrity": "sha512-MKRqX26XcvfHAWearEOpJmpj0Xg8G6PuMjHgkfqLEz9b9rX4xkIjKjFbrCjddujntmaGbzJfhKxWl+sj9Nkqzg==",
"license": "Apache-2.0",
"dependencies": {
"@polymer/polymer": "^3.0.0",
"@vaadin/component-base": "~24.7.11",
"@vaadin/icon": "~24.7.11",
"@vaadin/vaadin-themable-mixin": "~24.7.11"
}
},
"node_modules/@vaadin/vaadin-material-styles": {
"version": "24.7.11",
"resolved": "https://registry.npmmirror.com/@vaadin/vaadin-material-styles/-/vaadin-material-styles-24.7.11.tgz",
"integrity": "sha512-gqomj16K0vJYRnUIoH6TuvMMpS+XtALcDfkFQ51rj4icF+WpgrhEeFYEIx85Z4MSsE9ODMwytC+Cx4qPWBlcvQ==",
"license": "Apache-2.0",
"dependencies": {
"@polymer/polymer": "^3.0.0",
"@vaadin/component-base": "~24.7.11",
"@vaadin/vaadin-themable-mixin": "~24.7.11"
}
},
"node_modules/@vaadin/vaadin-themable-mixin": {
"version": "24.7.11",
"resolved": "https://registry.npmmirror.com/@vaadin/vaadin-themable-mixin/-/vaadin-themable-mixin-24.7.11.tgz",
"integrity": "sha512-/yjaJbMtRJQZgl6XH+aV6vtMt8lJA5NJwE/N4vPL87Wh3xcA+CIigedRlP9B7OeWhjZmrPJfjCdCktNJGq63BQ==",
"license": "Apache-2.0",
"dependencies": {
"@open-wc/dedupe-mixin": "^1.3.0",
"lit": "^3.0.0"
}
},
"node_modules/@vaadin/vaadin-usage-statistics": {
"version": "2.1.3",
"resolved": "https://registry.npmmirror.com/@vaadin/vaadin-usage-statistics/-/vaadin-usage-statistics-2.1.3.tgz",
"integrity": "sha512-8r4TNknD7OJQADe3VygeofFR7UNAXZ2/jjBFP5dgI8+2uMfnuGYgbuHivasKr9WSQ64sPej6m8rDoM1uSllXjQ==",
"hasInstallScript": true,
"license": "Apache-2.0",
"dependencies": {
"@vaadin/vaadin-development-mode-detector": "^2.0.0"
},
"engines": {
"node": "^12.20.0 || ^14.13.1 || >=16.0.0"
}
},
"node_modules/@vitejs/plugin-vue": { "node_modules/@vitejs/plugin-vue": {
"version": "5.2.4", "version": "5.2.4",
"resolved": "https://registry.npmmirror.com/@vitejs/plugin-vue/-/plugin-vue-5.2.4.tgz", "resolved": "https://registry.npmmirror.com/@vitejs/plugin-vue/-/plugin-vue-5.2.4.tgz",
@ -1265,48 +878,6 @@
"integrity": "sha512-cZy8Dq+uuIXbxCZpuLd2GJdeSO/lIzIspC2WtkqIpje5QyFbvLaI5wZtdUjLHjGZrlVX6GilejatWwVYYRc8tA==", "integrity": "sha512-cZy8Dq+uuIXbxCZpuLd2GJdeSO/lIzIspC2WtkqIpje5QyFbvLaI5wZtdUjLHjGZrlVX6GilejatWwVYYRc8tA==",
"license": "MIT" "license": "MIT"
}, },
"node_modules/@webcomponents/shadycss": {
"version": "1.11.2",
"resolved": "https://registry.npmmirror.com/@webcomponents/shadycss/-/shadycss-1.11.2.tgz",
"integrity": "sha512-vRq+GniJAYSBmTRnhCYPAPq6THYqovJ/gzGThWbgEZUQaBccndGTi1hdiUP15HzEco0I6t4RCtXyX0rsSmwgPw==",
"license": "BSD-3-Clause"
},
"node_modules/@zip.js/zip.js": {
"version": "2.7.70",
"resolved": "https://registry.npmmirror.com/@zip.js/zip.js/-/zip.js-2.7.70.tgz",
"integrity": "sha512-GkUtNfhrfR90xurdCUtFI6yDqlTI70dMolOZuyDAVNxvgn0uv8qvoGzbyYWcfkfTYBKNR4NJs6poQE/cr1pW3A==",
"license": "BSD-3-Clause",
"engines": {
"bun": ">=0.7.0",
"deno": ">=1.0.0",
"node": ">=16.5.0"
}
},
"node_modules/color": {
"version": "5.0.0",
"resolved": "https://registry.npmmirror.com/color/-/color-5.0.0.tgz",
"integrity": "sha512-16BlyiuyLq3MLxpRWyOTiWsO3ii/eLQLJUQXBSNcxMBBSnyt1ee9YUdaozQp03ifwm5woztEZGDbk9RGVuCsdw==",
"license": "MIT",
"dependencies": {
"color-convert": "^3.0.1",
"color-string": "^2.0.0"
},
"engines": {
"node": ">=18"
}
},
"node_modules/color-convert": {
"version": "3.1.0",
"resolved": "https://registry.npmmirror.com/color-convert/-/color-convert-3.1.0.tgz",
"integrity": "sha512-TVoqAq8ZDIpK5lsQY874DDnu65CSsc9vzq0wLpNQ6UMBq81GSZocVazPiBbYGzngzBOIRahpkTzCLVe2at4MfA==",
"license": "MIT",
"dependencies": {
"color-name": "^2.0.0"
},
"engines": {
"node": ">=14.6"
}
},
"node_modules/color-name": { "node_modules/color-name": {
"version": "2.0.0", "version": "2.0.0",
"resolved": "https://registry.npmmirror.com/color-name/-/color-name-2.0.0.tgz", "resolved": "https://registry.npmmirror.com/color-name/-/color-name-2.0.0.tgz",
@ -1316,38 +887,30 @@
"node": ">=12.20" "node": ">=12.20"
} }
}, },
"node_modules/color-string": { "node_modules/color-parse": {
"version": "2.0.1", "version": "2.0.2",
"resolved": "https://registry.npmmirror.com/color-string/-/color-string-2.0.1.tgz", "resolved": "https://registry.npmmirror.com/color-parse/-/color-parse-2.0.2.tgz",
"integrity": "sha512-5z9FbYTZPAo8iKsNEqRNv+OlpBbDcoE+SY9GjLfDUHEfcNNV7tS9eSAlFHEaub/r5tBL9LtskAeq1l9SaoZ5tQ==", "integrity": "sha512-eCtOz5w5ttWIUcaKLiktF+DxZO1R9KLNY/xhbV6CkhM7sR3GhVghmt6X6yOnzeaM24po+Z9/S1apbXMwA3Iepw==",
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
"color-name": "^2.0.0" "color-name": "^2.0.0"
},
"engines": {
"node": ">=18"
} }
}, },
"node_modules/commander": { "node_modules/color-rgba": {
"version": "2.20.3", "version": "3.0.0",
"resolved": "https://registry.npmmirror.com/commander/-/commander-2.20.3.tgz", "resolved": "https://registry.npmmirror.com/color-rgba/-/color-rgba-3.0.0.tgz",
"integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==", "integrity": "sha512-PPwZYkEY3M2THEHHV6Y95sGUie77S7X8v+h1r6LSAPF3/LL2xJ8duUXSrkic31Nzc4odPwHgUbiX/XuTYzQHQg==",
"license": "MIT"
},
"node_modules/composed-offset-position": {
"version": "0.0.6",
"resolved": "https://registry.npmmirror.com/composed-offset-position/-/composed-offset-position-0.0.6.tgz",
"integrity": "sha512-Q7dLompI6lUwd7LWyIcP66r4WcS9u7AL2h8HaeipiRfCRPLMWqRx8fYsjb4OHi6UQFifO7XtNC2IlEJ1ozIFxw==",
"license": "MIT", "license": "MIT",
"peerDependencies": { "dependencies": {
"@floating-ui/utils": "^0.2.5" "color-parse": "^2.0.0",
"color-space": "^2.0.0"
} }
}, },
"node_modules/cssfilter": { "node_modules/color-space": {
"version": "0.0.10", "version": "2.3.2",
"resolved": "https://registry.npmmirror.com/cssfilter/-/cssfilter-0.0.10.tgz", "resolved": "https://registry.npmmirror.com/color-space/-/color-space-2.3.2.tgz",
"integrity": "sha512-FAaLDaplstoRsDR8XGYH51znUN0UY7nMc6Z9/fvE8EXGwvJE9hu7W2vHwx1+bd6gCYnln9nLbzxFTrcO9YQDZw==", "integrity": "sha512-BcKnbOEsOarCwyoLstcoEztwT0IJxqqQkNwDuA3a65sICvvHL2yoeV13psoDFh5IuiOMnIOKdQDwB4Mk3BypiA==",
"license": "MIT" "license": "Unlicense"
}, },
"node_modules/csstype": { "node_modules/csstype": {
"version": "3.1.3", "version": "3.1.3",
@ -1355,33 +918,11 @@
"integrity": "sha512-M1uQkMl8rQK/szD0LNhtqxIPLpimGm8sOBwU7lLnCpSbTyY3yeU1Vc7l4KT5zT4s/yOxHH5O7tIuuLOCnLADRw==", "integrity": "sha512-M1uQkMl8rQK/szD0LNhtqxIPLpimGm8sOBwU7lLnCpSbTyY3yeU1Vc7l4KT5zT4s/yOxHH5O7tIuuLOCnLADRw==",
"license": "MIT" "license": "MIT"
}, },
"node_modules/data-uri-to-buffer": { "node_modules/earcut": {
"version": "4.0.1", "version": "2.2.4",
"resolved": "https://registry.npmmirror.com/data-uri-to-buffer/-/data-uri-to-buffer-4.0.1.tgz", "resolved": "https://registry.npmmirror.com/earcut/-/earcut-2.2.4.tgz",
"integrity": "sha512-0R9ikRb668HB7QDxT1vkpuUBtqc53YyAwMwGeUFKRojY/NWKvdZ+9UYtRfGmhqNbRkTSVpMbmyhXipFFv2cb/A==", "integrity": "sha512-/pjZsA1b4RPHbeWZQn66SWS8nZZWLQQ23oE3Eam7aroEFGEvwKAsJfZ9ytiEMycfzXWpca4FA9QIOehf7PocBQ==",
"license": "MIT", "license": "ISC"
"engines": {
"node": ">= 12"
}
},
"node_modules/dayjs": {
"version": "1.11.13",
"resolved": "https://registry.npmmirror.com/dayjs/-/dayjs-1.11.13.tgz",
"integrity": "sha512-oaMBel6gjolK862uaPQOVTA7q3TZhuSvuMQAAglQDOWYO9A91IrAOUJEyKVlqJlHE0vq5p5UXxzdPfMH/x6xNg==",
"license": "MIT"
},
"node_modules/enhanced-resolve": {
"version": "5.18.2",
"resolved": "https://registry.npmmirror.com/enhanced-resolve/-/enhanced-resolve-5.18.2.tgz",
"integrity": "sha512-6Jw4sE1maoRJo3q8MsSIn2onJFbLTOjY9hlx4DZXmOKvLRd1Ok2kXmAGXaafL2+ijsJZ1ClYbl/pmqr9+k4iUQ==",
"license": "MIT",
"dependencies": {
"graceful-fs": "^4.2.4",
"tapable": "^2.2.0"
},
"engines": {
"node": ">=10.13.0"
}
}, },
"node_modules/entities": { "node_modules/entities": {
"version": "4.5.0", "version": "4.5.0",
@ -1440,50 +981,6 @@
"integrity": "sha512-Rfkk/Mp/DL7JVje3u18FxFujQlTNR2q6QfMSMB7AvCBx91NGj/ba3kCfza0f6dVDbw7YlRf/nDrn7pQrCCyQ/w==", "integrity": "sha512-Rfkk/Mp/DL7JVje3u18FxFujQlTNR2q6QfMSMB7AvCBx91NGj/ba3kCfza0f6dVDbw7YlRf/nDrn7pQrCCyQ/w==",
"license": "MIT" "license": "MIT"
}, },
"node_modules/fetch-blob": {
"version": "3.2.0",
"resolved": "https://registry.npmmirror.com/fetch-blob/-/fetch-blob-3.2.0.tgz",
"integrity": "sha512-7yAQpD2UMJzLi1Dqv7qFYnPbaPx7ZfFK6PiIxQ4PfkGPyNyl2Ugx+a/umUonmKqjhM4DnfbMvdX6otXq83soQQ==",
"funding": [
{
"type": "github",
"url": "https://github.com/sponsors/jimmywarting"
},
{
"type": "paypal",
"url": "https://paypal.me/jimmywarting"
}
],
"license": "MIT",
"dependencies": {
"node-domexception": "^1.0.0",
"web-streams-polyfill": "^3.0.3"
},
"engines": {
"node": "^12.20 || >= 14.13"
}
},
"node_modules/focus-trap": {
"version": "7.6.5",
"resolved": "https://registry.npmmirror.com/focus-trap/-/focus-trap-7.6.5.tgz",
"integrity": "sha512-7Ke1jyybbbPZyZXFxEftUtxFGLMpE2n6A+z//m4CRDlj0hW+o3iYSmh8nFlYMurOiJVDmJRilUQtJr08KfIxlg==",
"license": "MIT",
"dependencies": {
"tabbable": "^6.2.0"
}
},
"node_modules/formdata-polyfill": {
"version": "4.0.10",
"resolved": "https://registry.npmmirror.com/formdata-polyfill/-/formdata-polyfill-4.0.10.tgz",
"integrity": "sha512-buewHzMvYL29jdeQTVILecSaZKnt/RJWjoZCF5OW60Z67/GmSLBkOFM7qh1PI3zFNtJbaZL5eQu1vLfazOwj4g==",
"license": "MIT",
"dependencies": {
"fetch-blob": "^3.1.2"
},
"engines": {
"node": ">=12.20.0"
}
},
"node_modules/fsevents": { "node_modules/fsevents": {
"version": "2.3.3", "version": "2.3.3",
"resolved": "https://registry.npmmirror.com/fsevents/-/fsevents-2.3.3.tgz", "resolved": "https://registry.npmmirror.com/fsevents/-/fsevents-2.3.3.tgz",
@ -1499,67 +996,51 @@
"node": "^8.16.0 || ^10.6.0 || >=11.0.0" "node": "^8.16.0 || ^10.6.0 || >=11.0.0"
} }
}, },
"node_modules/graceful-fs": { "node_modules/geotiff": {
"version": "4.2.11", "version": "2.1.3",
"resolved": "https://registry.npmmirror.com/graceful-fs/-/graceful-fs-4.2.11.tgz", "resolved": "https://registry.npmmirror.com/geotiff/-/geotiff-2.1.3.tgz",
"integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==", "integrity": "sha512-PT6uoF5a1+kbC3tHmZSUsLHBp2QJlHasxxxxPW47QIY1VBKpFB+FcDvX+MxER6UzgLQZ0xDzJ9s48B9JbOCTqA==",
"license": "ISC"
},
"node_modules/interactjs": {
"version": "1.10.27",
"resolved": "https://registry.npmmirror.com/interactjs/-/interactjs-1.10.27.tgz",
"integrity": "sha512-y/8RcCftGAF24gSp76X2JS3XpHiUvDQyhF8i7ujemBz77hwiHDuJzftHx7thY8cxGogwGiPJ+o97kWB6eAXnsA==",
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
"@interactjs/types": "1.10.27" "@petamoriken/float16": "^3.4.7",
} "lerc": "^3.0.0",
}, "pako": "^2.0.4",
"node_modules/lit": { "parse-headers": "^2.0.2",
"version": "3.3.1", "quick-lru": "^6.1.1",
"resolved": "https://registry.npmmirror.com/lit/-/lit-3.3.1.tgz", "web-worker": "^1.2.0",
"integrity": "sha512-Ksr/8L3PTapbdXJCk+EJVB78jDodUMaP54gD24W186zGRARvwrsPfS60wae/SSCTCNZVPd1chXqio1qHQmu4NA==", "xml-utils": "^1.0.2",
"license": "BSD-3-Clause", "zstddec": "^0.1.0"
"dependencies": { },
"@lit/reactive-element": "^2.1.0",
"lit-element": "^4.2.0",
"lit-html": "^3.3.0"
}
},
"node_modules/lit-element": {
"version": "4.2.1",
"resolved": "https://registry.npmmirror.com/lit-element/-/lit-element-4.2.1.tgz",
"integrity": "sha512-WGAWRGzirAgyphK2urmYOV72tlvnxw7YfyLDgQ+OZnM9vQQBQnumQ7jUJe6unEzwGU3ahFOjuz1iz1jjrpCPuw==",
"license": "BSD-3-Clause",
"dependencies": {
"@lit-labs/ssr-dom-shim": "^1.4.0",
"@lit/reactive-element": "^2.1.0",
"lit-html": "^3.3.0"
}
},
"node_modules/lit-html": {
"version": "3.3.1",
"resolved": "https://registry.npmmirror.com/lit-html/-/lit-html-3.3.1.tgz",
"integrity": "sha512-S9hbyDu/vs1qNrithiNyeyv64c9yqiW9l+DBgI18fL+MTvOtWoFR0FWiyq1TxaYef5wNlpEmzlXoBlZEO+WjoA==",
"license": "BSD-3-Clause",
"dependencies": {
"@types/trusted-types": "^2.0.2"
}
},
"node_modules/lodash-es": {
"version": "4.17.21",
"resolved": "https://registry.npmmirror.com/lodash-es/-/lodash-es-4.17.21.tgz",
"integrity": "sha512-mKnC+QJ9pWVzv+C4/U3rRsHapFfHvQFoFB92e52xeyGMcX6/OlIl78je1u8vePzYZSkkogMPJ2yjxxsb89cxyw==",
"license": "MIT"
},
"node_modules/luxon": {
"version": "3.6.1",
"resolved": "https://registry.npmmirror.com/luxon/-/luxon-3.6.1.tgz",
"integrity": "sha512-tJLxrKJhO2ukZ5z0gyjY1zPh3Rh88Ej9P7jNrZiHMUXHae1yvI2imgOZtL1TO8TW6biMMKfTtAOoEJANgtWBMQ==",
"license": "MIT",
"engines": { "engines": {
"node": ">=12" "node": ">=10.19"
} }
}, },
"node_modules/ieee754": {
"version": "1.2.1",
"resolved": "https://registry.npmmirror.com/ieee754/-/ieee754-1.2.1.tgz",
"integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==",
"funding": [
{
"type": "github",
"url": "https://github.com/sponsors/feross"
},
{
"type": "patreon",
"url": "https://www.patreon.com/feross"
},
{
"type": "consulting",
"url": "https://feross.org/support"
}
],
"license": "BSD-3-Clause"
},
"node_modules/lerc": {
"version": "3.0.0",
"resolved": "https://registry.npmmirror.com/lerc/-/lerc-3.0.0.tgz",
"integrity": "sha512-Rm4J/WaHhRa93nCN2mwWDZFoRVF18G1f47C+kvQWyHGEZxFpTUi73p7lMVSAndyxGt6lJ2/CFbOcf9ra5p8aww==",
"license": "Apache-2.0"
},
"node_modules/magic-string": { "node_modules/magic-string": {
"version": "0.30.17", "version": "0.30.17",
"resolved": "https://registry.npmmirror.com/magic-string/-/magic-string-0.30.17.tgz", "resolved": "https://registry.npmmirror.com/magic-string/-/magic-string-0.30.17.tgz",
@ -1569,18 +1050,6 @@
"@jridgewell/sourcemap-codec": "^1.5.0" "@jridgewell/sourcemap-codec": "^1.5.0"
} }
}, },
"node_modules/marked": {
"version": "15.0.12",
"resolved": "https://registry.npmmirror.com/marked/-/marked-15.0.12.tgz",
"integrity": "sha512-8dD6FusOQSrpv9Z1rdNMdlSgQOIP880DHqnohobOmYLElGEqAL/JvxvuxZO16r4HtjTlfPRDC1hbvxC9dPN2nA==",
"license": "MIT",
"bin": {
"marked": "bin/marked.js"
},
"engines": {
"node": ">= 18"
}
},
"node_modules/nanoid": { "node_modules/nanoid": {
"version": "3.3.11", "version": "3.3.11",
"resolved": "https://registry.npmmirror.com/nanoid/-/nanoid-3.3.11.tgz", "resolved": "https://registry.npmmirror.com/nanoid/-/nanoid-3.3.11.tgz",
@ -1599,66 +1068,47 @@
"node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1" "node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1"
} }
}, },
"node_modules/node-domexception": { "node_modules/ol": {
"version": "1.0.0", "version": "8.2.0",
"resolved": "https://registry.npmmirror.com/node-domexception/-/node-domexception-1.0.0.tgz", "resolved": "https://registry.npmmirror.com/ol/-/ol-8.2.0.tgz",
"integrity": "sha512-/jKZoMpw0F8GRwl4/eLROPA3cfcXtLApP0QzLmUT/HuPCZWyB7IY9ZrMeKw2O/nFIqPQB3PVM9aYm0F312AXDQ==", "integrity": "sha512-/m1ddd7Jsp4Kbg+l7+ozR5aKHAZNQOBAoNZ5pM9Jvh4Etkf0WGkXr9qXd7PnhmwiC1Hnc2Toz9XjCzBBvexfXw==",
"deprecated": "Use your platform's native DOMException instead", "license": "BSD-2-Clause",
"funding": [
{
"type": "github",
"url": "https://github.com/sponsors/jimmywarting"
},
{
"type": "github",
"url": "https://paypal.me/jimmywarting"
}
],
"license": "MIT",
"engines": {
"node": ">=10.5.0"
}
},
"node_modules/node-fetch": {
"version": "3.3.2",
"resolved": "https://registry.npmmirror.com/node-fetch/-/node-fetch-3.3.2.tgz",
"integrity": "sha512-dRB78srN/l6gqWulah9SrxeYnxeddIG30+GOqK/9OlLVyLg3HPnr6SqOWTWOXKRwC2eGYCkZ59NNuSgvSrpgOA==",
"license": "MIT",
"dependencies": { "dependencies": {
"data-uri-to-buffer": "^4.0.0", "color-rgba": "^3.0.0",
"fetch-blob": "^3.1.4", "color-space": "^2.0.1",
"formdata-polyfill": "^4.0.10" "earcut": "^2.2.3",
}, "geotiff": "^2.0.7",
"engines": { "pbf": "3.2.1",
"node": "^12.20.0 || ^14.13.1 || >=16.0.0" "rbush": "^3.0.1"
}, },
"funding": { "funding": {
"type": "opencollective", "type": "opencollective",
"url": "https://opencollective.com/node-fetch" "url": "https://opencollective.com/openlayers"
} }
}, },
"node_modules/parse5": { "node_modules/pako": {
"version": "7.3.0", "version": "2.1.0",
"resolved": "https://registry.npmmirror.com/parse5/-/parse5-7.3.0.tgz", "resolved": "https://registry.npmmirror.com/pako/-/pako-2.1.0.tgz",
"integrity": "sha512-IInvU7fabl34qmi9gY8XOVxhYyMyuH2xUNpb2q8/Y+7552KlejkRvqvD19nMoUW/uQGGbqNpA6Tufu5FL5BZgw==", "integrity": "sha512-w+eufiZ1WuJYgPXbV/PO3NCMEc3xqylkKHzp8bxp1uW4qaSNQUkwmLLEc3kKsfz8lpV1F8Ht3U1Cm+9Srog2ug==",
"license": "MIT", "license": "(MIT AND Zlib)"
},
"node_modules/parse-headers": {
"version": "2.0.6",
"resolved": "https://registry.npmmirror.com/parse-headers/-/parse-headers-2.0.6.tgz",
"integrity": "sha512-Tz11t3uKztEW5FEVZnj1ox8GKblWn+PvHY9TmJV5Mll2uHEwRdR/5Li1OlXoECjLYkApdhWy44ocONwXLiKO5A==",
"license": "MIT"
},
"node_modules/pbf": {
"version": "3.2.1",
"resolved": "https://registry.npmmirror.com/pbf/-/pbf-3.2.1.tgz",
"integrity": "sha512-ClrV7pNOn7rtmoQVF4TS1vyU0WhYRnP92fzbfF75jAIwpnzdJXf8iTd4CMEqO4yUenH6NDqLiwjqlh6QgZzgLQ==",
"license": "BSD-3-Clause",
"dependencies": { "dependencies": {
"entities": "^6.0.0" "ieee754": "^1.1.12",
"resolve-protobuf-schema": "^2.1.0"
}, },
"funding": { "bin": {
"url": "https://github.com/inikulin/parse5?sponsor=1" "pbf": "bin/pbf"
}
},
"node_modules/parse5/node_modules/entities": {
"version": "6.0.1",
"resolved": "https://registry.npmmirror.com/entities/-/entities-6.0.1.tgz",
"integrity": "sha512-aN97NXWF6AWBTahfVOIrB/NShkzi5H7F9r1s9mD3cDj4Ko5f2qhhVoYMibXF7GlLveb/D2ioWay8lxI97Ven3g==",
"license": "BSD-2-Clause",
"engines": {
"node": ">=0.12"
},
"funding": {
"url": "https://github.com/fb55/entities?sponsor=1"
} }
}, },
"node_modules/picocolors": { "node_modules/picocolors": {
@ -1695,6 +1145,48 @@
"node": "^10 || ^12 || >=14" "node": "^10 || ^12 || >=14"
} }
}, },
"node_modules/protocol-buffers-schema": {
"version": "3.6.0",
"resolved": "https://registry.npmmirror.com/protocol-buffers-schema/-/protocol-buffers-schema-3.6.0.tgz",
"integrity": "sha512-TdDRD+/QNdrCGCE7v8340QyuXd4kIWIgapsE2+n/SaGiSSbomYl4TjHlvIoCWRpE7wFt02EpB35VVA2ImcBVqw==",
"license": "MIT"
},
"node_modules/quick-lru": {
"version": "6.1.2",
"resolved": "https://registry.npmmirror.com/quick-lru/-/quick-lru-6.1.2.tgz",
"integrity": "sha512-AAFUA5O1d83pIHEhJwWCq/RQcRukCkn/NSm2QsTEMle5f2hP0ChI2+3Xb051PZCkLryI/Ir1MVKviT2FIloaTQ==",
"license": "MIT",
"engines": {
"node": ">=12"
},
"funding": {
"url": "https://github.com/sponsors/sindresorhus"
}
},
"node_modules/quickselect": {
"version": "2.0.0",
"resolved": "https://registry.npmmirror.com/quickselect/-/quickselect-2.0.0.tgz",
"integrity": "sha512-RKJ22hX8mHe3Y6wH/N3wCM6BWtjaxIyyUIkpHOvfFnxdI4yD4tBXEBKSbriGujF6jnSVkJrffuo6vxACiSSxIw==",
"license": "ISC"
},
"node_modules/rbush": {
"version": "3.0.1",
"resolved": "https://registry.npmmirror.com/rbush/-/rbush-3.0.1.tgz",
"integrity": "sha512-XRaVO0YecOpEuIvbhbpTrZgoiI6xBlz6hnlr6EHhd+0x9ase6EmeN+hdwwUaJvLcsFFQ8iWVF1GAK1yB0BWi0w==",
"license": "MIT",
"dependencies": {
"quickselect": "^2.0.0"
}
},
"node_modules/resolve-protobuf-schema": {
"version": "2.1.0",
"resolved": "https://registry.npmmirror.com/resolve-protobuf-schema/-/resolve-protobuf-schema-2.1.0.tgz",
"integrity": "sha512-kI5ffTiZWmJaS/huM8wZfEMer1eRd7oJQhDuxeCLe3t7N7mX3z94CN0xPxBQxFYQTSNz9T0i+v6inKqSdK8xrQ==",
"license": "MIT",
"dependencies": {
"protocol-buffers-schema": "^3.3.1"
}
},
"node_modules/rollup": { "node_modules/rollup": {
"version": "4.46.2", "version": "4.46.2",
"resolved": "https://registry.npmmirror.com/rollup/-/rollup-4.46.2.tgz", "resolved": "https://registry.npmmirror.com/rollup/-/rollup-4.46.2.tgz",
@ -1735,12 +1227,6 @@
"fsevents": "~2.3.2" "fsevents": "~2.3.2"
} }
}, },
"node_modules/sortablejs": {
"version": "1.15.6",
"resolved": "https://registry.npmmirror.com/sortablejs/-/sortablejs-1.15.6.tgz",
"integrity": "sha512-aNfiuwMEpfBM/CN6LY0ibyhxPfPbyFeBTYJKCvzkJ2GkUpazIt3H+QIPAMHwqQ7tMKaHz1Qj+rJJCqljnf4p3A==",
"license": "MIT"
},
"node_modules/source-map-js": { "node_modules/source-map-js": {
"version": "1.2.1", "version": "1.2.1",
"resolved": "https://registry.npmmirror.com/source-map-js/-/source-map-js-1.2.1.tgz", "resolved": "https://registry.npmmirror.com/source-map-js/-/source-map-js-1.2.1.tgz",
@ -1750,48 +1236,6 @@
"node": ">=0.10.0" "node": ">=0.10.0"
} }
}, },
"node_modules/tabbable": {
"version": "6.2.0",
"resolved": "https://registry.npmmirror.com/tabbable/-/tabbable-6.2.0.tgz",
"integrity": "sha512-Cat63mxsVJlzYvN51JmVXIgNoUokrIaT2zLclCXjRd8boZ0004U4KCs/sToJ75C6sdlByWxpYnb5Boif1VSFew==",
"license": "MIT"
},
"node_modules/tapable": {
"version": "2.2.2",
"resolved": "https://registry.npmmirror.com/tapable/-/tapable-2.2.2.tgz",
"integrity": "sha512-Re10+NauLTMCudc7T5WLFLAwDhQ0JWdrMK+9B2M8zR5hRExKmsRDCBA7/aV/pNJFltmBFO5BAMlQFi/vq3nKOg==",
"license": "MIT",
"engines": {
"node": ">=6"
}
},
"node_modules/timezone-groups": {
"version": "0.10.4",
"resolved": "https://registry.npmmirror.com/timezone-groups/-/timezone-groups-0.10.4.tgz",
"integrity": "sha512-AnkJYrbb7uPkDCEqGeVJiawZNiwVlSkkeX4jZg1gTEguClhyX+/Ezn07KB6DT29tG3UN418ldmS/W6KqGOTDjg==",
"license": "MIT",
"engines": {
"node": ">=18.12.0"
}
},
"node_modules/tslib": {
"version": "2.8.1",
"resolved": "https://registry.npmmirror.com/tslib/-/tslib-2.8.1.tgz",
"integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==",
"license": "0BSD"
},
"node_modules/type-fest": {
"version": "4.41.0",
"resolved": "https://registry.npmmirror.com/type-fest/-/type-fest-4.41.0.tgz",
"integrity": "sha512-TeTSQ6H5YHvpqVwBRcnLDCBnDOHWYu7IvGbHT6N8AOymcr9PJGjc1GTtiWZTYg0NCgYwvnYWEkVChQAr9bjfwA==",
"license": "(MIT OR CC0-1.0)",
"engines": {
"node": ">=16"
},
"funding": {
"url": "https://github.com/sponsors/sindresorhus"
}
},
"node_modules/undici-types": { "node_modules/undici-types": {
"version": "7.8.0", "version": "7.8.0",
"resolved": "https://registry.npmmirror.com/undici-types/-/undici-types-7.8.0.tgz", "resolved": "https://registry.npmmirror.com/undici-types/-/undici-types-7.8.0.tgz",
@ -1882,30 +1326,23 @@
} }
} }
}, },
"node_modules/web-streams-polyfill": { "node_modules/web-worker": {
"version": "3.3.3", "version": "1.5.0",
"resolved": "https://registry.npmmirror.com/web-streams-polyfill/-/web-streams-polyfill-3.3.3.tgz", "resolved": "https://registry.npmmirror.com/web-worker/-/web-worker-1.5.0.tgz",
"integrity": "sha512-d2JWLCivmZYTSIoge9MsgFCZrt571BikcWGYkjC1khllbTeDlGqZ2D8vD8E/lJa8WGWbb7Plm8/XJYV7IJHZZw==", "integrity": "sha512-RiMReJrTAiA+mBjGONMnjVDP2u3p9R1vkcGz6gDIrOMT3oGuYwX2WRMYI9ipkphSuE5XKEhydbhNEJh4NY9mlw==",
"license": "MIT", "license": "Apache-2.0"
"engines": {
"node": ">= 8"
}
}, },
"node_modules/xss": { "node_modules/xml-utils": {
"version": "1.0.13", "version": "1.10.2",
"resolved": "https://registry.npmmirror.com/xss/-/xss-1.0.13.tgz", "resolved": "https://registry.npmmirror.com/xml-utils/-/xml-utils-1.10.2.tgz",
"integrity": "sha512-clu7dxTm1e8Mo5fz3n/oW3UCXBfV89xZ72jM8yzo1vR/pIS0w3sgB3XV2H8Vm6zfGnHL0FzvLJPJEBhd86/z4Q==", "integrity": "sha512-RqM+2o1RYs6T8+3DzDSoTRAUfrvaejbVHcp3+thnAtDKo8LskR+HomLajEy5UjTz24rpka7AxVBRR3g2wTUkJA==",
"license": "MIT", "license": "CC0-1.0"
"dependencies": { },
"commander": "^2.20.3", "node_modules/zstddec": {
"cssfilter": "0.0.10" "version": "0.1.0",
}, "resolved": "https://registry.npmmirror.com/zstddec/-/zstddec-0.1.0.tgz",
"bin": { "integrity": "sha512-w2NTI8+3l3eeltKAdK8QpiLo/flRAr2p8AGeakfMZOXBxOg9HIu4LVDxBi81sYgVhFhdJjv1OrB5ssI8uFPoLg==",
"xss": "bin/xss" "license": "MIT AND BSD-3-Clause"
},
"engines": {
"node": ">= 0.10.0"
}
} }
} }
} }

View File

@ -9,7 +9,7 @@
"preview": "vite preview" "preview": "vite preview"
}, },
"dependencies": { "dependencies": {
"@arcgis/core": "^4.33.11", "ol": "^8.2.0",
"vue": "^3.4.0" "vue": "^3.4.0"
}, },
"devDependencies": { "devDependencies": {

View File

@ -46,79 +46,42 @@
<script setup> <script setup>
import { ref, onMounted, onUnmounted } from 'vue' import { ref, onMounted, onUnmounted } from 'vue'
import Map from '@arcgis/core/Map'
import MapView from '@arcgis/core/views/MapView'
import WebTileLayer from '@arcgis/core/layers/WebTileLayer'
import { TIANDITU_CONFIG } from '../config/tianditu.js' import { TIANDITU_CONFIG } from '../config/tianditu.js'
import { createVectorLayers, createSatelliteLayers } from '../utils/tiandituLayers.js'
import { SplitScreenManager, SplitScreenAnimator, SPLIT_PRESETS } from '../utils/splitScreen.js' import { SplitScreenManager, SplitScreenAnimator, SPLIT_PRESETS } from '../utils/splitScreen.js'
const mapDiv = ref() const mapDiv = ref()
let view = null
let splitManager = null let splitManager = null
let animator = null let animator = null
const isVertical = ref(true) const isVertical = ref(true)
const currentPosition = ref(50) const currentPosition = ref(50)
//
const createTiandituLayer = (serviceUrl, id) => {
return new WebTileLayer({
id: id,
urlTemplate: serviceUrl.replace('{key}', TIANDITU_CONFIG.API_KEY),
subDomains: TIANDITU_CONFIG.SUB_DOMAINS,
copyright: '天地图'
})
}
// //
const initSplitScreenMap = () => { const initSplitScreenMap = () => {
// //
const vectorLayer = createTiandituLayer(TIANDITU_CONFIG.SERVICES.VECTOR, 'vector') const vectorLayers = createVectorLayers()
const vectorAnnotation = createTiandituLayer(TIANDITU_CONFIG.SERVICES.VECTOR_ANNOTATION, 'vector-annotation')
// //
const satelliteLayer = createTiandituLayer(TIANDITU_CONFIG.SERVICES.SATELLITE, 'satellite') const satelliteLayers = createSatelliteLayers()
const satelliteAnnotation = createTiandituLayer(TIANDITU_CONFIG.SERVICES.SATELLITE_ANNOTATION, 'satellite-annotation')
// //
const map = new Map({ splitManager = new SplitScreenManager(mapDiv.value, {
layers: [
vectorLayer,
vectorAnnotation,
satelliteLayer,
satelliteAnnotation
]
})
//
view = new MapView({
container: mapDiv.value,
map: map,
center: TIANDITU_CONFIG.DEFAULT_CENTER, center: TIANDITU_CONFIG.DEFAULT_CENTER,
zoom: TIANDITU_CONFIG.DEFAULT_ZOOM zoom: TIANDITU_CONFIG.DEFAULT_ZOOM
}) })
// animator = new SplitScreenAnimator(splitManager)
view.when(() => {
//
splitManager = new SplitScreenManager(view)
animator = new SplitScreenAnimator(splitManager)
// //
const leadingLayers = [satelliteLayer, satelliteAnnotation] splitManager.setLayers(satelliteLayers, vectorLayers)
const trailingLayers = [vectorLayer, vectorAnnotation]
splitManager.createSwipe(leadingLayers, trailingLayers, { //
direction: isVertical.value ? 'vertical' : 'horizontal', const updatePosition = () => {
position: currentPosition.value currentPosition.value = splitManager.getPosition()
}) }
// //
if (splitManager.swipeWidget) { setInterval(updatePosition, 100)
splitManager.swipeWidget.watch('position', (newPosition) => {
currentPosition.value = newPosition
})
}
})
} }
// 线 // 线
@ -130,10 +93,9 @@ const resetSplit = async () => {
// //
const toggleSplitDirection = () => { const toggleSplitDirection = () => {
isVertical.value = !isVertical.value
if (splitManager) { if (splitManager) {
splitManager.toggleDirection() const newDirection = splitManager.toggleDirection()
isVertical.value = newDirection
} }
} }
@ -166,10 +128,7 @@ onMounted(() => {
onUnmounted(() => { onUnmounted(() => {
if (splitManager) { if (splitManager) {
splitManager.destroySwipe() splitManager.destroy()
}
if (view) {
view.destroy()
} }
}) })
</script> </script>
@ -312,20 +271,4 @@ onUnmounted(() => {
font-size: 13px; font-size: 13px;
} }
} }
/* 分屏小部件样式定制 */
:global(.esri-swipe__container) {
border: 2px solid #007ac8 !important;
}
:global(.esri-swipe__divider) {
background-color: #007ac8 !important;
width: 4px !important;
}
:global(.esri-swipe__divider::before) {
background-color: #005a96 !important;
border: 2px solid white !important;
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3) !important;
}
</style> </style>

View File

@ -22,62 +22,46 @@
<script setup> <script setup>
import { ref, onMounted, onUnmounted } from 'vue' import { ref, onMounted, onUnmounted } from 'vue'
import Map from '@arcgis/core/Map' import Map from 'ol/Map'
import MapView from '@arcgis/core/views/MapView' import View from 'ol/View'
import WebTileLayer from '@arcgis/core/layers/WebTileLayer' import { fromLonLat } from 'ol/proj'
import { TIANDITU_CONFIG } from '../config/tianditu.js' import { TIANDITU_CONFIG } from '../config/tianditu.js'
import { createVectorLayers, createSatelliteLayers } from '../utils/tiandituLayers.js'
const mapDiv = ref() const mapDiv = ref()
let view = null let map = null
const currentLayer = ref('vector') const currentLayer = ref('vector')
//
const createTiandituLayer = (serviceUrl, id) => {
return new WebTileLayer({
id: id,
urlTemplate: serviceUrl.replace('{key}', TIANDITU_CONFIG.API_KEY),
subDomains: TIANDITU_CONFIG.SUB_DOMAINS,
copyright: '天地图'
})
}
// //
const initMap = () => { const initMap = () => {
// //
const vectorLayer = createTiandituLayer(TIANDITU_CONFIG.SERVICES.VECTOR, 'vector') const vectorLayers = createVectorLayers()
const vectorAnnotation = createTiandituLayer(TIANDITU_CONFIG.SERVICES.VECTOR_ANNOTATION, 'vector-annotation')
const map = new Map({ map = new Map({
layers: [vectorLayer, vectorAnnotation] target: mapDiv.value,
}) layers: vectorLayers,
view: new View({
view = new MapView({ center: fromLonLat(TIANDITU_CONFIG.DEFAULT_CENTER),
container: mapDiv.value, zoom: TIANDITU_CONFIG.DEFAULT_ZOOM
map: map, })
center: TIANDITU_CONFIG.DEFAULT_CENTER,
zoom: TIANDITU_CONFIG.DEFAULT_ZOOM
}) })
} }
// //
const switchLayer = (layerType) => { const switchLayer = (layerType) => {
if (!view) return if (!map) return
currentLayer.value = layerType currentLayer.value = layerType
view.map.removeAll() map.getLayers().clear()
if (layerType === 'vector') { if (layerType === 'vector') {
// //
const vectorLayer = createTiandituLayer(TIANDITU_CONFIG.SERVICES.VECTOR, 'vector') const vectorLayers = createVectorLayers()
const vectorAnnotation = createTiandituLayer(TIANDITU_CONFIG.SERVICES.VECTOR_ANNOTATION, 'vector-annotation') vectorLayers.forEach(layer => map.addLayer(layer))
view.map.add(vectorLayer)
view.map.add(vectorAnnotation)
} else if (layerType === 'satellite') { } else if (layerType === 'satellite') {
// //
const satelliteLayer = createTiandituLayer(TIANDITU_CONFIG.SERVICES.SATELLITE, 'satellite') const satelliteLayers = createSatelliteLayers()
const satelliteAnnotation = createTiandituLayer(TIANDITU_CONFIG.SERVICES.SATELLITE_ANNOTATION, 'satellite-annotation') satelliteLayers.forEach(layer => map.addLayer(layer))
view.map.add(satelliteLayer)
view.map.add(satelliteAnnotation)
} }
} }
@ -86,8 +70,9 @@ onMounted(() => {
}) })
onUnmounted(() => { onUnmounted(() => {
if (view) { if (map) {
view.destroy() map.setTarget(undefined)
map = null
} }
}) })
</script> </script>

View File

@ -7,27 +7,30 @@ export const TIANDITU_CONFIG = {
// 如果没有API Key地图将无法正常显示 // 如果没有API Key地图将无法正常显示
API_KEY: '4559200347e75489c4474f5b11846368', API_KEY: '4559200347e75489c4474f5b11846368',
// 天地图服务URL配置 // 天地图服务URL配置 (使用子域名轮询)
SERVICES: { SERVICES: {
// 矢量底图 // 矢量底图
VECTOR: 'http://t{subDomain}.tianditu.gov.cn/vec_w/wmts?SERVICE=WMTS&REQUEST=GetTile&VERSION=1.0.0&LAYER=vec&STYLE=default&TILEMATRIXSET=w&FORMAT=tiles&TILEMATRIX={level}&TILEROW={row}&TILECOL={col}&tk={key}', VECTOR: 'http://t{0-7}.tianditu.gov.cn/vec_w/wmts?SERVICE=WMTS&REQUEST=GetTile&VERSION=1.0.0&LAYER=vec&STYLE=default&TILEMATRIXSET=w&FORMAT=tiles&TILEMATRIX={z}&TILEROW={y}&TILECOL={x}&tk={key}',
// 矢量注记 // 矢量注记
VECTOR_ANNOTATION: 'http://t{subDomain}.tianditu.gov.cn/cva_w/wmts?SERVICE=WMTS&REQUEST=GetTile&VERSION=1.0.0&LAYER=cva&STYLE=default&TILEMATRIXSET=w&FORMAT=tiles&TILEMATRIX={level}&TILEROW={row}&TILECOL={col}&tk={key}', VECTOR_ANNOTATION: 'http://t{0-7}.tianditu.gov.cn/cva_w/wmts?SERVICE=WMTS&REQUEST=GetTile&VERSION=1.0.0&LAYER=cva&STYLE=default&TILEMATRIXSET=w&FORMAT=tiles&TILEMATRIX={z}&TILEROW={y}&TILECOL={x}&tk={key}',
// 影像底图 // 影像底图
SATELLITE: 'http://t{subDomain}.tianditu.gov.cn/img_w/wmts?SERVICE=WMTS&REQUEST=GetTile&VERSION=1.0.0&LAYER=img&STYLE=default&TILEMATRIXSET=w&FORMAT=tiles&TILEMATRIX={level}&TILEROW={row}&TILECOL={col}&tk={key}', SATELLITE: 'http://t{0-7}.tianditu.gov.cn/img_w/wmts?SERVICE=WMTS&REQUEST=GetTile&VERSION=1.0.0&LAYER=img&STYLE=default&TILEMATRIXSET=w&FORMAT=tiles&TILEMATRIX={z}&TILEROW={y}&TILECOL={x}&tk={key}',
// 影像注记 // 影像注记
SATELLITE_ANNOTATION: 'http://t{subDomain}.tianditu.gov.cn/cia_w/wmts?SERVICE=WMTS&REQUEST=GetTile&VERSION=1.0.0&LAYER=cia&STYLE=default&TILEMATRIXSET=w&FORMAT=tiles&TILEMATRIX={level}&TILEROW={row}&TILECOL={col}&tk={key}' SATELLITE_ANNOTATION: 'http://t{0-7}.tianditu.gov.cn/cia_w/wmts?SERVICE=WMTS&REQUEST=GetTile&VERSION=1.0.0&LAYER=cia&STYLE=default&TILEMATRIXSET=w&FORMAT=tiles&TILEMATRIX={z}&TILEROW={y}&TILECOL={x}&tk={key}'
}, },
// 服务器子域名 // 服务器子域名
SUB_DOMAINS: ['0', '1', '2', '3', '4', '5', '6', '7'], SUB_DOMAINS: ['0', '1', '2', '3', '4', '5', '6', '7'],
// 默认地图中心点(北京 // 默认地图中心点(上海
DEFAULT_CENTER: [116.4074, 39.9042], DEFAULT_CENTER: [121.4737, 31.2304],
// 默认缩放级别 // 默认缩放级别
DEFAULT_ZOOM: 10 DEFAULT_ZOOM: 14,
// OpenLayers 投影配置
PROJECTION: 'EPSG:4326'
} }

View File

@ -1,68 +1,300 @@
// splitScreen.js - 分屏地图工具类 // splitScreen.js - OpenLayers 分屏地图工具类
// 提供分屏地图的创建、管理和控制功能 // 提供分屏地图的创建、管理和控制功能
import Swipe from '@arcgis/core/widgets/Swipe' import Map from 'ol/Map'
import View from 'ol/View'
import TileLayer from 'ol/layer/Tile'
import XYZ from 'ol/source/XYZ'
import { fromLonLat } from 'ol/proj'
/** /**
* 分屏地图管理器 * 分屏地图管理器
*/ */
export class SplitScreenManager { export class SplitScreenManager {
constructor(view) { constructor(container, options = {}) {
this.view = view this.container = container
this.swipeWidget = null this.options = {
center: [116.4074, 39.9042],
zoom: 10,
...options
}
this.leftMap = null
this.rightMap = null
this.isVertical = true this.isVertical = true
this.position = 50 this.position = 50
this.leadingLayers = [] this.leadingLayers = []
this.trailingLayers = [] this.trailingLayers = []
this.splitElement = null
this.init()
} }
/** /**
* 创建分屏小部件 * 初始化分屏地图
* @param {Array} leadingLayers - 前景图层右侧/下方显示
* @param {Array} trailingLayers - 背景图层左侧/上方显示
* @param {Object} options - 配置选项
*/ */
createSwipe(leadingLayers = [], trailingLayers = [], options = {}) { init() {
// 如果已存在分屏小部件,先销毁 // 创建容器结构
this.destroySwipe() this.createContainerStructure()
// 保存图层引用 // 创建左侧地图
this.leftMap = this.createMap(this.leftContainer, this.options)
// 创建右侧地图
this.rightMap = this.createMap(this.rightContainer, this.options)
// 同步地图视图
this.syncMaps()
// 创建分割线
this.createSplitLine()
}
/**
* 创建容器结构
*/
createContainerStructure() {
// 清空容器
this.container.innerHTML = ''
if (this.isVertical) {
// 垂直分割
// 创建左侧容器
this.leftContainer = document.createElement('div')
this.leftContainer.className = 'split-left'
this.leftContainer.style.cssText = `
position: absolute;
top: 0;
left: 0;
width: ${this.position}%;
height: 100%;
overflow: hidden;
`
// 创建右侧容器
this.rightContainer = document.createElement('div')
this.rightContainer.className = 'split-right'
this.rightContainer.style.cssText = `
position: absolute;
top: 0;
left: ${this.position}%;
width: ${100 - this.position}%;
height: 100%;
overflow: hidden;
`
// 创建分割线
this.splitElement = document.createElement('div')
this.splitElement.className = 'split-line'
this.splitElement.style.cssText = `
position: absolute;
top: 0;
left: ${this.position}%;
width: 4px;
height: 100%;
background: #007ac8;
cursor: col-resize;
z-index: 1000;
box-shadow: 0 0 10px rgba(0, 122, 200, 0.5);
`
} else {
// 水平分割
// 创建上方容器
this.leftContainer = document.createElement('div')
this.leftContainer.className = 'split-top'
this.leftContainer.style.cssText = `
position: absolute;
top: 0;
left: 0;
width: 100%;
height: ${this.position}%;
overflow: hidden;
`
// 创建下方容器
this.rightContainer = document.createElement('div')
this.rightContainer.className = 'split-bottom'
this.rightContainer.style.cssText = `
position: absolute;
top: ${this.position}%;
left: 0;
width: 100%;
height: ${100 - this.position}%;
overflow: hidden;
`
// 创建分割线
this.splitElement = document.createElement('div')
this.splitElement.className = 'split-line'
this.splitElement.style.cssText = `
position: absolute;
top: ${this.position}%;
left: 0;
width: 100%;
height: 4px;
background: #007ac8;
cursor: row-resize;
z-index: 1000;
box-shadow: 0 0 10px rgba(0, 122, 200, 0.5);
`
}
// 添加拖拽功能
this.addDragFunctionality()
// 添加到容器
this.container.appendChild(this.leftContainer)
this.container.appendChild(this.rightContainer)
this.container.appendChild(this.splitElement)
}
/**
* 创建地图
*/
createMap(container, options) {
return new Map({
target: container,
view: new View({
center: fromLonLat(options.center),
zoom: options.zoom
}),
controls: []
})
}
/**
* 同步地图视图
*/
syncMaps() {
if (!this.leftMap || !this.rightMap) return
// 同步左侧地图到右侧
this.leftMap.getView().on('change', () => {
const view = this.leftMap.getView()
this.rightMap.getView().setCenter(view.getCenter())
this.rightMap.getView().setZoom(view.getZoom())
this.rightMap.getView().setRotation(view.getRotation())
})
// 同步右侧地图到左侧
this.rightMap.getView().on('change', () => {
const view = this.rightMap.getView()
this.leftMap.getView().setCenter(view.getCenter())
this.leftMap.getView().setZoom(view.getZoom())
this.leftMap.getView().setRotation(view.getRotation())
})
}
/**
* 添加拖拽功能
*/
addDragFunctionality() {
let isDragging = false
let startX = 0
let startY = 0
let startPosition = 0
const startDrag = (e) => {
isDragging = true
startX = e.clientX
startY = e.clientY
startPosition = this.position
document.body.style.cursor = this.isVertical ? 'col-resize' : 'row-resize'
document.addEventListener('mousemove', drag)
document.addEventListener('mouseup', stopDrag)
}
const drag = (e) => {
if (!isDragging) return
if (this.isVertical) {
// 垂直分割 - 水平拖拽
const deltaX = e.clientX - startX
const containerWidth = this.container.offsetWidth
const newPosition = Math.max(10, Math.min(90, startPosition + (deltaX / containerWidth) * 100))
this.setPosition(newPosition)
} else {
// 水平分割 - 垂直拖拽
const deltaY = e.clientY - startY
const containerHeight = this.container.offsetHeight
const newPosition = Math.max(10, Math.min(90, startPosition + (deltaY / containerHeight) * 100))
this.setPosition(newPosition)
}
}
const stopDrag = () => {
isDragging = false
document.body.style.cursor = ''
document.removeEventListener('mousemove', drag)
document.removeEventListener('mouseup', stopDrag)
}
this.splitElement.addEventListener('mousedown', startDrag)
}
/**
* 创建分割线
*/
createSplitLine() {
this.updateSplitPosition()
}
/**
* 更新分割位置
*/
updateSplitPosition() {
if (!this.leftContainer || !this.rightContainer || !this.splitElement) return
if (this.isVertical) {
this.leftContainer.style.width = `${this.position}%`
this.rightContainer.style.left = `${this.position}%`
this.rightContainer.style.width = `${100 - this.position}%`
this.splitElement.style.left = `${this.position}%`
} else {
this.leftContainer.style.height = `${this.position}%`
this.rightContainer.style.top = `${this.position}%`
this.rightContainer.style.height = `${100 - this.position}%`
this.splitElement.style.top = `${this.position}%`
}
// 重新渲染地图
if (this.leftMap) this.leftMap.updateSize()
if (this.rightMap) this.rightMap.updateSize()
}
/**
* 创建天地图图层
*/
createTiandituLayer(url, apiKey) {
return new TileLayer({
source: new XYZ({
url: url.replace('{key}', apiKey),
tileGrid: undefined,
crossOrigin: 'anonymous'
})
})
}
/**
* 设置图层
*/
setLayers(leadingLayers = [], trailingLayers = []) {
this.leadingLayers = leadingLayers this.leadingLayers = leadingLayers
this.trailingLayers = trailingLayers this.trailingLayers = trailingLayers
// 合并默认配置 // 清空现有图层
const config = { this.leftMap.getLayers().clear()
view: this.view, this.rightMap.getLayers().clear()
leadingLayers: leadingLayers,
trailingLayers: trailingLayers,
direction: options.direction || (this.isVertical ? 'vertical' : 'horizontal'),
position: options.position || this.position,
...options
}
// 创建分屏小部件 // 添加图层到左侧地图(背景图层)
this.swipeWidget = new Swipe(config) trailingLayers.forEach(layer => {
this.leftMap.addLayer(layer)
// 添加到视图
this.view.ui.add(this.swipeWidget)
// 监听位置变化
this.swipeWidget.watch('position', (newPosition) => {
this.position = newPosition
}) })
return this.swipeWidget // 添加图层到右侧地图(前景图层)
} leadingLayers.forEach(layer => {
this.rightMap.addLayer(layer)
/** })
* 销毁分屏小部件
*/
destroySwipe() {
if (this.swipeWidget) {
this.view.ui.remove(this.swipeWidget)
this.swipeWidget.destroy()
this.swipeWidget = null
}
} }
/** /**
@ -71,12 +303,19 @@ export class SplitScreenManager {
toggleDirection() { toggleDirection() {
this.isVertical = !this.isVertical this.isVertical = !this.isVertical
if (this.swipeWidget) { // 重新创建容器结构
// 重新创建分屏小部件 this.createContainerStructure()
this.createSwipe(this.leadingLayers, this.trailingLayers, {
direction: this.isVertical ? 'vertical' : 'horizontal', // 重新创建地图
position: this.position this.leftMap = this.createMap(this.leftContainer, this.options)
}) this.rightMap = this.createMap(this.rightContainer, this.options)
// 同步地图视图
this.syncMaps()
// 重新设置图层
if (this.leadingLayers.length > 0 || this.trailingLayers.length > 0) {
this.setLayers(this.leadingLayers, this.trailingLayers)
} }
return this.isVertical return this.isVertical
@ -84,15 +323,10 @@ export class SplitScreenManager {
/** /**
* 设置分割线位置 * 设置分割线位置
* @param {number} position - 位置百分比 (0-100)
*/ */
setPosition(position) { setPosition(position) {
this.position = Math.max(0, Math.min(100, position)) this.position = Math.max(10, Math.min(90, position))
this.updateSplitPosition()
if (this.swipeWidget) {
this.swipeWidget.position = this.position
}
return this.position return this.position
} }
@ -118,55 +352,21 @@ export class SplitScreenManager {
} }
/** /**
* 更新前景图层 * 销毁分屏地图
* @param {Array} layers - 新的前景图层
*/ */
updateLeadingLayers(layers) { destroy() {
this.leadingLayers = layers if (this.leftMap) {
if (this.swipeWidget) { this.leftMap.setTarget(undefined)
this.swipeWidget.leadingLayers = layers this.leftMap = null
}
if (this.rightMap) {
this.rightMap.setTarget(undefined)
this.rightMap = null
}
if (this.container) {
this.container.innerHTML = ''
} }
} }
/**
* 更新背景图层
* @param {Array} layers - 新的背景图层
*/
updateTrailingLayers(layers) {
this.trailingLayers = layers
if (this.swipeWidget) {
this.swipeWidget.trailingLayers = layers
}
}
/**
* 检查分屏小部件是否存在
*/
isActive() {
return this.swipeWidget !== null
}
}
/**
* 创建天地图分屏对比
* @param {MapView} view - 地图视图
* @param {Object} vectorLayers - 矢量图层 {base, annotation}
* @param {Object} satelliteLayers - 影像图层 {base, annotation}
* @param {Object} options - 配置选项
*/
export function createTiandituSplitScreen(view, vectorLayers, satelliteLayers, options = {}) {
const manager = new SplitScreenManager(view)
// 设置影像图层为前景(右侧/下方)
const leadingLayers = [satelliteLayers.base, satelliteLayers.annotation].filter(Boolean)
// 矢量图层作为背景(左侧/上方)
const trailingLayers = [vectorLayers.base, vectorLayers.annotation].filter(Boolean)
// 创建分屏
manager.createSwipe(leadingLayers, trailingLayers, options)
return manager
} }
/** /**
@ -209,11 +409,9 @@ export class SplitScreenAnimator {
/** /**
* 动画移动分割线 * 动画移动分割线
* @param {number} targetPosition - 目标位置
* @param {number} duration - 动画时长(ms)
*/ */
async animateToPosition(targetPosition, duration = 1000) { async animateToPosition(targetPosition, duration = 1000) {
if (this.isAnimating || !this.manager.isActive()) { if (this.isAnimating) {
return false return false
} }
@ -256,7 +454,7 @@ export class SplitScreenAnimator {
* 摆动动画 * 摆动动画
*/ */
async wiggle(amplitude = 10, cycles = 3, duration = 1000) { async wiggle(amplitude = 10, cycles = 3, duration = 1000) {
if (this.isAnimating || !this.manager.isActive()) { if (this.isAnimating) {
return false return false
} }

View File

@ -0,0 +1,83 @@
// 天地图图层工具函数
import TileLayer from 'ol/layer/Tile'
import XYZ from 'ol/source/XYZ'
import { TIANDITU_CONFIG } from '../config/tianditu.js'
// 子域名计数器,用于轮询
let subdomainCounter = 0
/**
* 获取下一个子域名
* @returns {string} 子域名
*/
function getNextSubdomain() {
const subdomain = TIANDITU_CONFIG.SUB_DOMAINS[subdomainCounter % TIANDITU_CONFIG.SUB_DOMAINS.length]
subdomainCounter++
return subdomain
}
/**
* 创建天地图图层
* @param {string} serviceType - 服务类型 ('vector', 'satellite', 'vector_annotation', 'satellite_annotation')
* @param {string} id - 图层ID
* @returns {TileLayer} OpenLayers 图层
*/
export function createTiandituLayer(serviceType, id) {
const serviceMap = {
'vector': 'vec_w',
'satellite': 'img_w',
'vector_annotation': 'cva_w',
'satellite_annotation': 'cia_w'
}
const layerType = serviceMap[serviceType]
if (!layerType) {
throw new Error(`未知的服务类型: ${serviceType}`)
}
// 获取图层名称
const layerName = serviceType === 'vector' ? 'vec' :
serviceType === 'satellite' ? 'img' :
serviceType === 'vector_annotation' ? 'cva' : 'cia'
return new TileLayer({
id: id,
source: new XYZ({
tileUrlFunction: function(tileCoord) {
if (!tileCoord) return undefined
const z = tileCoord[0]
const x = tileCoord[1]
const y = tileCoord[2]
// 使用轮询的子域名
const subdomain = getNextSubdomain()
return `http://t${subdomain}.tianditu.gov.cn/${layerType}/wmts?SERVICE=WMTS&REQUEST=GetTile&VERSION=1.0.0&LAYER=${layerName}&STYLE=default&TILEMATRIXSET=w&FORMAT=tiles&TILEMATRIX=${z}&TILEROW=${y}&TILECOL=${x}&tk=${TIANDITU_CONFIG.API_KEY}`
},
crossOrigin: 'anonymous'
})
})
}
/**
* 创建矢量地图图层组
* @returns {Array} 图层数组 [底图, 注记]
*/
export function createVectorLayers() {
return [
createTiandituLayer('vector', 'vector'),
createTiandituLayer('vector_annotation', 'vector-annotation')
]
}
/**
* 创建影像地图图层组
* @returns {Array} 图层数组 [底图, 注记]
*/
export function createSatelliteLayers() {
return [
createTiandituLayer('satellite', 'satellite'),
createTiandituLayer('satellite_annotation', 'satellite-annotation')
]
}

View File

@ -4,14 +4,6 @@ import vue from '@vitejs/plugin-vue'
// https://vitejs.dev/config/ // https://vitejs.dev/config/
export default defineConfig({ export default defineConfig({
plugins: [vue()], plugins: [vue()],
define: {
// 解决ArcGIS API中的process.env问题
'process.env': {}
},
optimizeDeps: {
// 排除ArcGIS模块从预构建中因为它们已经是优化的
exclude: ['@arcgis/core']
},
server: { server: {
// 允许从外部域加载资源 // 允许从外部域加载资源
cors: true cors: true