|
@@ -12,9 +12,10 @@
|
|
:extraOptions="extraOptions"
|
|
:extraOptions="extraOptions"
|
|
:center="[113.27243, 23.13795]"
|
|
:center="[113.27243, 23.13795]"
|
|
>
|
|
>
|
|
- <div slot="layerSwitcher">
|
|
|
|
|
|
+ <div slot="layerSwitcher" v-if="mapInstance">
|
|
<!-- 地图图层切换组件 -->
|
|
<!-- 地图图层切换组件 -->
|
|
<mapol-layer-switcher
|
|
<mapol-layer-switcher
|
|
|
|
+ v-if="mapInstance"
|
|
:show="show"
|
|
:show="show"
|
|
ref="switcher"
|
|
ref="switcher"
|
|
:map="map"
|
|
:map="map"
|
|
@@ -167,7 +168,7 @@ export default {
|
|
targetId: "", // 渲染地图ID
|
|
targetId: "", // 渲染地图ID
|
|
mapType: "satellite", // 默认地图图层类型
|
|
mapType: "satellite", // 默认地图图层类型
|
|
map: {}, // 地图实例
|
|
map: {}, // 地图实例
|
|
- mapInstance: {}, // 地图实例
|
|
|
|
|
|
+ mapInstance: null, // 地图实例
|
|
show: false, // 控制地图工具显示
|
|
show: false, // 控制地图工具显示
|
|
customStyle: {
|
|
customStyle: {
|
|
// 缩放控制器自定义样式
|
|
// 缩放控制器自定义样式
|
|
@@ -1845,6 +1846,16 @@ export default {
|
|
this.map = e;
|
|
this.map = e;
|
|
this.targetId = targetId;
|
|
this.targetId = targetId;
|
|
this.mapInstance = e?.map || e;
|
|
this.mapInstance = e?.map || e;
|
|
|
|
+
|
|
|
|
+ // 导航 路线规划
|
|
|
|
+ let option = {
|
|
|
|
+ width: '8',
|
|
|
|
+ color: '#f40'
|
|
|
|
+ };
|
|
|
|
+ let toolRoute = new CTMapOl.extend.ToolRoute(e.map, option);
|
|
|
|
+ toolRoute.route([125,43], [125.8,43.8]).then(data => {
|
|
|
|
+ toolRoute.drawPath(data.routs)
|
|
|
|
+ })
|
|
// 获取摄像头点位列表信息
|
|
// 获取摄像头点位列表信息
|
|
this.$requestSDK(
|
|
this.$requestSDK(
|
|
"/jilin-devloper/jilin/querySiteCodeAndDevices",
|
|
"/jilin-devloper/jilin/querySiteCodeAndDevices",
|