merge
parent
7597d451e0
commit
83d9edbae1
|
|
@ -56,7 +56,9 @@ enum Api {
|
|||
// 获取案件图片坐标、方位角信息
|
||||
LoadCaseImgList = "/api/DroneCaseInfoSingle/LoadCaseImgList",
|
||||
// 获取范围内影像服务信息
|
||||
GetIntersects = "/api/GeoTiffManager/GetIntersects"
|
||||
GetIntersects = "/api/GeoTiffManager/GetIntersects",
|
||||
// 获取网络环境
|
||||
GetNetWorkEev = "/api/DroneCloudQuery/IsPublic",
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -169,4 +171,8 @@ export function getLoadCaseImgList(params){
|
|||
|
||||
export function getIntersectTif(params){
|
||||
return defHttp.get({ url: Api.GetIntersects, params });
|
||||
}
|
||||
|
||||
export function getNetworkType(){
|
||||
return defHttp.get({ url: Api.GetNetWorkEev });
|
||||
}
|
||||
|
|
@ -31,7 +31,7 @@
|
|||
import mapboxgl, { Map, Popup } from 'mapbox-gl';
|
||||
import { MAPBOX_TOKEN, TINADITU_TOKEN, MAP_VIEWER } from './config.ts';
|
||||
import heatGeoJson from './data.json';
|
||||
import { getPolygonCenter, getUserOrgs } from '@/api/tiankongdi';
|
||||
import { getPolygonCenter, getUserOrgs,getNetworkType } from '@/api/tiankongdi';
|
||||
import axios from 'axios';
|
||||
import SearchComponent from './SearchComponent.vue';
|
||||
import { getAppEnvConfig } from '@/utils/env';
|
||||
|
|
@ -41,6 +41,10 @@
|
|||
const mapContainerName = ref<String>();
|
||||
mapContainerName.value = 'mapContainer-' + generateUUID();
|
||||
const { VITE_GLOB_YINGXIANG_SERVER, VITE_GLOB_YAOGANYINGXIANG_SERVER } = getAppEnvConfig();
|
||||
|
||||
const networkType = ref("WAN");
|
||||
|
||||
|
||||
//
|
||||
import { TableOutlined, GlobalOutlined, HomeOutlined } from '@ant-design/icons-vue';
|
||||
|
||||
|
|
@ -89,8 +93,6 @@
|
|||
`http://t0.tianditu.gov.cn/DataServer?T=img_w&x={x}&y={y}&l={z}&tk=${TINADITU_TOKEN}`,
|
||||
],
|
||||
tileSize: 256,
|
||||
minzoom: 0,
|
||||
maxzoom: 17,
|
||||
},
|
||||
'raster-tiles-font': {
|
||||
type: 'raster',
|
||||
|
|
@ -132,7 +134,7 @@
|
|||
type: 'raster',
|
||||
source: 'yaogan',
|
||||
layout: {
|
||||
visibility: 'visible',
|
||||
visibility: networkType.value == 'LAN' ? 'visible' : 'none',
|
||||
},
|
||||
minzoom: 9,
|
||||
maxzoom: 15,
|
||||
|
|
@ -142,7 +144,7 @@
|
|||
type: 'raster',
|
||||
source: 'yingxiang',
|
||||
layout: {
|
||||
visibility: 'visible',
|
||||
visibility: networkType.value == 'LAN' ? 'visible' : 'none',
|
||||
},
|
||||
minzoom: 13,
|
||||
maxzoom: 24,
|
||||
|
|
@ -814,25 +816,17 @@
|
|||
|
||||
onMounted(() => {
|
||||
mapboxgl.accessToken = MAPBOX_TOKEN;
|
||||
map = initMap();
|
||||
|
||||
map.on('zoom', function (e) {
|
||||
let zoom = map.getZoom();
|
||||
if (zoom > 18) {
|
||||
console.log('zoom', zoom);
|
||||
if (!isZoomVisible) {
|
||||
isZoomVisible = true;
|
||||
} else {
|
||||
return;
|
||||
}
|
||||
} else {
|
||||
isZoomVisible = false;
|
||||
// 获取网络环境
|
||||
getNetworkType().then(res=>{
|
||||
if(res){
|
||||
networkType.value = "WAN";
|
||||
}else{
|
||||
networkType.value = "LAN";
|
||||
}
|
||||
|
||||
if (isZoomVisible) {
|
||||
} else {
|
||||
}
|
||||
}),
|
||||
map = initMap();
|
||||
|
||||
map.on('load', () => {
|
||||
//挂载mapbox-gl-utils
|
||||
U.init(map);
|
||||
|
|
@ -863,7 +857,12 @@
|
|||
// 视频监控
|
||||
addMonitorLayer();
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
})
|
||||
|
||||
|
||||
|
||||
|
||||
// 抛出函数
|
||||
defineExpose({
|
||||
|
|
|
|||
|
|
@ -48,12 +48,10 @@
|
|||
</a-checkbox>
|
||||
</div>
|
||||
<a-empty size="small" :description="'暂无专题图层数据'" v-if="speciaLayerList.length <= 0" />
|
||||
|
||||
</div>
|
||||
|
||||
<p class="cate-name">地图底图</p>
|
||||
<p class="cate-name">工作底图</p>
|
||||
<div class="case-list">
|
||||
|
||||
<a-radio-group v-model:value="baseLayer" style="width:100%;">
|
||||
<div class="case-item" v-for="item in baseLayerList" :key="index" >
|
||||
<img src="/statistical/prove-icon.png" alt="" />
|
||||
|
|
@ -146,15 +144,15 @@
|
|||
|
||||
const baseLayerList = ref([
|
||||
{
|
||||
id:2,
|
||||
name:"影像地图",
|
||||
checked:false,
|
||||
value:"2"
|
||||
},{
|
||||
id:1,
|
||||
name:"导航地图",
|
||||
checked:false,
|
||||
value:"1"
|
||||
},{
|
||||
id:2,
|
||||
name:"卫星地图",
|
||||
checked:false,
|
||||
value:"2"
|
||||
},{
|
||||
id:3,
|
||||
name:"白板地图",
|
||||
|
|
|
|||
Loading…
Reference in New Issue