Merge branch 'wangmengqi' of zhangtao/gis into develop

This commit is contained in:
wangmengqi 2022-11-22 10:21:24 +08:00
commit 65ac2098ee
12 changed files with 2082626 additions and 240 deletions

View File

@ -1,5 +1,6 @@
<!DOCTYPE html> <!DOCTYPE html>
<html lang="en"> <html lang="en">
<head> <head>
<meta charset="UTF-8" /> <meta charset="UTF-8" />
<link rel="icon" href="/favicon.ico" /> <link rel="icon" href="/favicon.ico" />
@ -8,11 +9,17 @@
<link rel="stylesheet" href="https://g.alicdn.com/de/prismplayer/2.9.21/skins/default/aliplayer-min.css" /> <link rel="stylesheet" href="https://g.alicdn.com/de/prismplayer/2.9.21/skins/default/aliplayer-min.css" />
<link rel="stylesheet" href="src/assets/mapbox/mapbox-gl.css" /> <link rel="stylesheet" href="src/assets/mapbox/mapbox-gl.css" />
<script type="text/javascript" src="src/assets/mapbox/mapbox-gl.js"></script> <script type="text/javascript" src="src/assets/mapbox/mapbox-gl.js"></script>
<script charset="utf-8" type="text/javascript" src="https://g.alicdn.com/de/prismplayer/2.9.21/aliplayer-h5-min.js"></script> <script src='https://code.jquery.com/jquery-3.6.0.min.js'></script>
<script charset="utf-8" type="text/javascript"
src="https://g.alicdn.com/de/prismplayer/2.9.21/aliplayer-h5-min.js"></script>
</head> </head>
<body> <body>
<div id="app"></div> <div id="app"></div>
<script type="module" src="/src/main.js"></script> <script type="module" src="/src/main.js"></script>
</body> </body>
</html> </html>

15
package-lock.json generated
View File

@ -4759,6 +4759,21 @@
"thenify": ">= 3.1.0 < 4" "thenify": ">= 3.1.0 < 4"
} }
}, },
"three": {
"version": "0.146.0",
"resolved": "https://registry.npmjs.org/three/-/three-0.146.0.tgz",
"integrity": "sha512-1lvNfLezN6OJ9NaFAhfX4sm5e9YCzHtaRgZ1+B4C+Hv6TibRMsuBAM5/wVKzxjpYIlMymvgsHEFrrigEfXnb2A=="
},
"threebox": {
"version": "0.1.5",
"resolved": "https://registry.npmjs.org/threebox/-/threebox-0.1.5.tgz",
"integrity": "sha512-SAxLgJ6Qwqvzehic25DFkhJT7dPvWnwwHPgrAHoDZiIzlO5uG0CD1XPkv4kq6/lA94yK2Nf7BI8q5xCKdXBalw=="
},
"threebox-plugin": {
"version": "2.2.7",
"resolved": "https://registry.npmjs.org/threebox-plugin/-/threebox-plugin-2.2.7.tgz",
"integrity": "sha512-H87Nm4w1PfisHPHzavTGXlwIoJpx2+QU57GooQYIhF51lsg+U5A0KGf3Jrv/HWsLCGOwV2BTnv7UTLfpO1EccQ=="
},
"through": { "through": {
"version": "2.3.8", "version": "2.3.8",
"resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz", "resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz",

View File

@ -18,6 +18,9 @@
"mockjs": "^1.1.0", "mockjs": "^1.1.0",
"pinia": "^2.0.13", "pinia": "^2.0.13",
"pinia-plugin-persist": "^1.0.0", "pinia-plugin-persist": "^1.0.0",
"three": "^0.146.0",
"threebox": "^0.1.5",
"threebox-plugin": "^2.2.7",
"tinymce": "^5.10.2", "tinymce": "^5.10.2",
"vue": "^3.2.16", "vue": "^3.2.16",
"vue-router": "^4.0.14", "vue-router": "^4.0.14",

View File

@ -15,20 +15,21 @@ export default {
* @param clusterLayerOption Object 只需传filter layout paint * @param clusterLayerOption Object 只需传filter layout paint
* @param unclusterLayerOption Object 只需传filter paint * @param unclusterLayerOption Object 只需传filter paint
*/ */
loadAggregationGraph (map, url, sourceOption, layerOption, clusterLayerOption, unclusterLayerOption) { loadAggregationGraph (map, geodata, sourceOption, layerOption, clusterLayerOption, unclusterLayerOption) {
axios.get(url).then((res) => { // axios.get(url).then((res) => {
if (res) { // if (res) {
// console.log(res, '返回的数据')
const data = res.data
const sourceId = res.data.crs.properties.name const data = geodata
this.sourceId = sourceId const sourceId = 'sourceis_1'
const layerId = sourceId + 'layer' const layerId = 'layerId_1'
this.layerId = layerId // const sourceId = res.data.crs.properties.name
const clusterCountId = sourceId + 'clusterCount' // this.sourceId = sourceId
this.clusterCountId = clusterCountId // const layerId = sourceId + 'layer'
const unclusteredId = sourceId + 'unclustered' // this.layerId = layerId
this.unclusteredId = unclusteredId // const clusterCountId = sourceId + 'clusterCount'
// this.clusterCountId = clusterCountId
// const unclusteredId = sourceId + 'unclustered'
// this.unclusteredId = unclusteredId
map.addSource(sourceId, { map.addSource(sourceId, {
type: 'geojson', type: 'geojson',
data: data, data: data,
@ -89,7 +90,7 @@ export default {
}) })
// 聚合图圆圈中的数字 // 聚合图圆圈中的数字
map.addLayer({ map.addLayer({
id: clusterCountId, id: 'clusterCountId',
type: 'symbol', type: 'symbol',
source: sourceId, source: sourceId,
// filter: ['has', 'poi_id'], // filter: ['has', 'poi_id'],
@ -108,7 +109,7 @@ export default {
}) })
// 聚合图中没有数字的显示小圆点 // 聚合图中没有数字的显示小圆点
map.addLayer({ map.addLayer({
id: unclusteredId, id: 'unclusteredId',
type: 'circle', type: 'circle',
source: sourceId, source: sourceId,
// filter: ['!', ['has', 'poi_id']], // filter: ['!', ['has', 'poi_id']],
@ -126,8 +127,6 @@ export default {
// 'circle-stroke-color': '#fff' // 'circle-stroke-color': '#fff'
// } // }
}) })
}
})
}, },
/** /**
* 移除聚合图层 * 移除聚合图层

View File

@ -164,7 +164,7 @@ export function loadTMSLayer (map, url, option) {
map.addSource(option.source, { map.addSource(option.source, {
type: 'raster', type: 'raster',
tiles: [url], tiles: [url],
scheme: 'tms',
tileSize: 256 tileSize: 256
}) })
map.addLayer({ map.addLayer({

1901629
src/assets/json/aaa.json Normal file

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

7538
src/assets/json/heat.json Normal file

File diff suppressed because it is too large Load Diff

View File

@ -1,9 +1,10 @@
/* Mapbox GL JS is Copyright © 2020 Mapbox and subject to the Mapbox Terms of Service ((https://www.mapbox.com/legal/tos/). */ /* Mapbox GL JS is Copyright © 2020 Mapbox and subject to the Mapbox Terms of Service ((https://www.mapbox.com/legal/tos/). */
(function (global, factory) { (function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() : typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory()
typeof define === 'function' && define.amd ? define(factory) : : typeof define === 'function' && define.amd ? define(factory)
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.mapboxgl = factory()); : (global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.mapboxgl = factory())
})(this, (function () { 'use strict'; })(this, function () {
'use strict'
/* eslint-disable */ /* eslint-disable */
@ -40,6 +41,5 @@
return mapboxgl$1; return mapboxgl$1;
})); });
//# sourceMappingURL=mapbox-gl.js.map //# sourceMappingURL=mapbox-gl.js.map

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.7 KiB