| | |
| | | /* eslint-disable camelcase */ |
| | | <template> |
| | | <div id="viewer-container" style="height: 100%; width: 100%" @click="mapClick($event)"> |
| | | <video |
| | | id="video" |
| | | style="position: fixed; visibility: hidden" |
| | | muted |
| | | autoplay |
| | | loop |
| | | crossorigin |
| | | controls |
| | | > |
| | | <source src="http://dc.dvgis.cn/examples/data/demo.mp4" type="video/mp4" /> |
| | | </video> |
| | | |
| | | <div |
| | | style=" |
| | | position: fixed; |
| | |
| | | preserveDrawingBuffer: true |
| | | } |
| | | } |
| | | }).setOptions({ |
| | | globe: { |
| | | baseColor: new global.DC.Color(1, 1, 1, 1) |
| | | } |
| | | }) |
| | | |
| | | console.log(window.devicePixelRatio) |
| | | global.viewer.scene.globe.baseColor = global.DC.Namespace.Cesium.Color.WHITE |
| | | |
| | | if (global.DC.Namespace.Cesium.FeatureDetection.supportsImageRenderingPixelated()) { // 判断是否支持图像渲染像素化处理 |
| | | global.viewer.setOptions({ |
| | |
| | | selectionIndicator: false, |
| | | timeline: false, |
| | | navigationHelpButton: false, |
| | | navigationInstructionsInitiallyVisible: false, |
| | | creditContainer: undefined |
| | | navigationInstructionsInitiallyVisible: false |
| | | // sceneMode: global.DC.Namespace.Cesium.SceneMode.SCENE2D |
| | | }) |
| | | |
| | | global.eagleViewer.imageryLayers.addImageryProvider( |
| | | new global.DC.Namespace.Cesium.UrlTemplateImageryProvider({ |
| | | url: 'http://t{s}.tianditu.gov.cn/DataServer?T=vec_w&x={x}&y={y}&l={z}&tk=9ae78c51a0a28f06444d541148496e36', |
| | | url: 'http://t{s}.tianditu.gov.cn/DataServer?T=vec_w&x={x}&y={y}&l={z}&tk=e9533f5acb2ac470b07f406a4d24b4f0', |
| | | subdomains: ['0', '1', '2', '3', '4', '5', '6', '7'], |
| | | format: 'image/jpeg', |
| | | show: true, |
| | |
| | | |
| | | global.eagleViewer.imageryLayers.addImageryProvider( |
| | | new global.DC.Namespace.Cesium.UrlTemplateImageryProvider({ |
| | | url: 'http://t{s}.tianditu.gov.cn/DataServer?T=cva_w&x={x}&y={y}&l={z}&tk=9ae78c51a0a28f06444d541148496e36', |
| | | url: 'http://t{s}.tianditu.gov.cn/DataServer?T=cva_w&x={x}&y={y}&l={z}&tk=e9533f5acb2ac470b07f406a4d24b4f0', |
| | | subdomains: ['0', '1', '2', '3', '4', '5', '6', '7'], |
| | | format: 'image/jpeg', |
| | | show: true, |
| | |
| | | // }) |
| | | // }) |
| | | |
| | | that.$refs.leftNav.initialize() |
| | | |
| | | // const key = '0f7c1d161d7352116a21aacf0e9f44c1' |
| | | // const key = 'e9533f5acb2ac470b07f406a4d24b4f0' |
| | | // const vec = global.DC.ImageryLayerFactory.createTdtImageryLayer({ |
| | | // key |
| | | // }) |
| | |
| | | } |
| | | |
| | | global.DC.ready(initViewer) |
| | | |
| | | that.$refs.leftNav.initialize() |
| | | }, |
| | | methods: { |
| | | changeWheel (val, type) { |
| | |
| | | var res = [] |
| | | for (var i = 0; i < data.length; i++) { |
| | | var dataItem = data[i] |
| | | // console.log('dataItem',dataItem) //第二个数据 |
| | | var fromCoord = [115.8716, 28.7436] |
| | | var toCoord = chinaGeoCoordMap[dataItem[0].name] |
| | | // console.log('toCoord',toCoord);//第一个地址 |
| | | if (fromCoord && toCoord) { |
| | | res.push([ |
| | | { |
| | |
| | | // color: '#f00' |
| | | color: function (params) { |
| | | // 圆环显示文字 |
| | | // console.log('redName',redName) |
| | | |
| | | return '#ffa022' |
| | | }, |
| | |
| | | extraCssText: 'z-index:100', |
| | | formatter: function (params, ticket, callback) { |
| | | // 根据业务自己拓展要显示的内容 |
| | | // console.log('params--2',params) |
| | | let res = '' |
| | | const name = params.data.dataItem[0].name |
| | | const price = params.data.dataItem[0].price |
| | |
| | | } |
| | | }, |
| | | data: item[1].map(function (dataItem) { |
| | | // console.log('dataItem',dataItem[0]); |
| | | return { |
| | | dataItem: dataItem, |
| | | name: dataItem[0].name, |