| | |
| | | <left-nav ref="leftNav"></left-nav> |
| | | |
| | | <mapPopup /> |
| | | |
| | | <campusBuildingSearch /> |
| | | |
| | | <campusNav ref="campusNavRoute" |
| | | v-show="campusNavFlag" /> |
| | | </div> |
| | | </template> |
| | | <script> |
| | | |
| | | import { mapGetters } from 'vuex' |
| | | import mapPopup from './component/mapPopup.vue' |
| | | import mapPopup from './components/mapPopup.vue' |
| | | import campusBuildingSearch from './components/campusBuildingSearch.vue' |
| | | |
| | | export default { |
| | | name: 'mapBox', |
| | | components: { |
| | | mapPopup |
| | | mapPopup, |
| | | campusBuildingSearch |
| | | }, |
| | | data () { |
| | | return { |
| | |
| | | // 详情弹框显示关闭 |
| | | 'detailsPopup', |
| | | // 全景弹框显示关闭 |
| | | 'panoramaPopup' |
| | | 'panoramaPopup', |
| | | // 校内导航的显示关闭 |
| | | 'campusNavFlag' |
| | | ]) |
| | | }, |
| | | mounted () { |
| | |
| | | |
| | | popup.hide() |
| | | |
| | | const baselayer = that.DC.ImageryLayerFactory.createArcGisImageryLayer({ |
| | | url: |
| | | 'http://services.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer' |
| | | const baselayer = that.DC.ImageryLayerFactory.createImageryLayer(that.DC.ImageryType.XYZ, { |
| | | // url: 'https://webmap-tile.sf-express.com/MapTileService/rt?x={col}&y={row}&z={level}' |
| | | |
| | | url: 'https://webmap-tile.sf-express.com/MapTileService/rt?fetchtype=static&x={x}&y={y}&z={z}&project=sfmap&pic_size=256&pic_type=png8&data_name=361100&data_format=merged-dat&data_type=normal' // 行政区划 |
| | | |
| | | }) |
| | | viewer.addBaseLayer(baselayer, { |
| | | iconUrl: 'examples/images/icon/img.png', |
| | |
| | | } |
| | | ) |
| | | tilesetLayer.addOverlay(tileset) |
| | | viewer.flyTo(tileset) |
| | | setTimeout(() => { |
| | | viewer.flyTo(tileset) |
| | | }, 1500) |
| | | tileset.on(that.DC.MouseEventType.CLICK, e => { |
| | | viewer.scene.globe.depthTestAgainstTerrain = false |
| | | |
| | |
| | | ) |
| | | wall.setStyle({ |
| | | material: new that.DC.WallTrailMaterialProperty({ |
| | | color: that.DC.Color.DEEPSKYBLUE, |
| | | speed: 4 |
| | | color: that.DC.Namespace.Cesium.Color.fromBytes(0, 142, 255, 150), |
| | | // color: that.DC.Color.CYAN, |
| | | speed: 10 |
| | | }) |
| | | }) |
| | | wallLayer.addOverlay(wall) |
| | | |
| | | viewer.use(new that.DC.Measure()) |
| | | // viewer.use(new that.DC.Measure()) |
| | | |
| | | // viewer.flyTo(wallLayer) |
| | | |
| | |
| | | |
| | | viewer.compass.enable = true |
| | | viewer.zoomController.enable = true |
| | | viewer.locationBar.enable = true |
| | | viewer.distanceLegend.enable = true |
| | | // viewer.locationBar.enable = true |
| | | // viewer.distanceLegend.enable = true |
| | | } |
| | | |
| | | that.DC.ready(initViewer) |