12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152 |
- <template>
- <div id="map">
- <iframe id="i_map" name="i_map">
- </iframe>
- </div>
- </template>
- <script>
- import CityGis from '../../unit/map/CityGis.Bridge.js';
- import {myBridge} from "../../unit/map/map.js";
- import {useMapStore} from "../../store/mapStore.js";
- import {nextTick,ref,onMounted} from "vue";
- import {AddSingleLayer, MapClickByType, SetBackground} from "../../unit/map/addLayer.js";
- let bridge;
- export default {
- name: "Map",
- setup(){
- onMounted(()=>{
- myBridge.bridgeContent = bridge = new CityGis.Bridge({
- id: "i_map",
- // url: 'https://cimweb.zjw.sh.cegn.cn:2007/VUE-Map-Tool-Widget/#/jk_map?theme=dark&type=3D', //建科发布
- url: 'http://localhost:8081/#/jk_map?theme=dark&type=3D',
- onReady: function () {
- console.log("地图创建完成")
- }
- })
- MapClickByType('show');
- AddSingleLayer()
- })
- }
- }
- </script>
- <style scoped lang="scss">
- #map{
- position: absolute;
- top: 0;
- left: 0;
- width: 100%;
- height: 100%;
- z-index: 1;
- }
- #i_map {
- position: fixed;
- width: 100%;
- height: 100%;
- left: 0;
- top: 0;
- border: none;
- }
- </style>
|