|
@@ -3,7 +3,7 @@ import CityGis from "@/utils/map/CityGis.Bridge";
|
|
|
import { ElMessage } from 'element-plus'
|
|
|
import 'element-plus/es/components/message/style/css'
|
|
|
import {onLocationBoat} from '@/utils/map/Boat'
|
|
|
-import {setCenter} from "@/utils/map/Common";
|
|
|
+import bus from '@/utils/bus';
|
|
|
|
|
|
let bridge
|
|
|
let calculateFinish = false
|
|
@@ -11,11 +11,13 @@ let drawGeometry
|
|
|
let showBoat = false
|
|
|
let mapExtent
|
|
|
let mapScale
|
|
|
+let clickGraphic
|
|
|
|
|
|
export function initBridge(){
|
|
|
bridge = new CityGis.Bridge({
|
|
|
id: "i_map",
|
|
|
- url: "http://10.83.68.108:8090/mapVue/#/map", //政务网
|
|
|
+ // url: "http://10.83.68.108:8090/mapVue/#/map", //政务网
|
|
|
+ url: "http://10.83.68.108:8090/mapWidgetVue/#/map", //政务网
|
|
|
// url: "http://localhost:8081/#/map", //政务网
|
|
|
onReady: function(){
|
|
|
console.log("地图创建完成");
|
|
@@ -34,6 +36,11 @@ export function initBridge(){
|
|
|
onLocationBoat()
|
|
|
}
|
|
|
break;
|
|
|
+ case "BoatClickObject":
|
|
|
+ clickGraphic = arg.data.graphic
|
|
|
+ console.log('mmsi:',clickGraphic.attributes.mmsi)
|
|
|
+ bus.emit('ueRec_BoatClick',{'mmsi':clickGraphic.attributes.mmsi})
|
|
|
+ break
|
|
|
default:
|
|
|
console.log(JSON.stringify(arg.data, null, 4))
|
|
|
}
|
|
@@ -50,7 +57,10 @@ export function getMapScale() {
|
|
|
return mapScale
|
|
|
}
|
|
|
|
|
|
-/*切换底图*/
|
|
|
+/*切换底图
|
|
|
+* 基础地图:baseMap
|
|
|
+* 遥感地图:airMap
|
|
|
+*/
|
|
|
export function changeMap(type){
|
|
|
let params = {
|
|
|
"ActionName": "ChangeBaseMap",
|