|  | @@ -1,359 +1,404 @@
 | 
	
		
			
				|  |  | -<template>
 | 
	
		
			
				|  |  | -	<div id="cesiumContainer" class="jt-map"></div>
 | 
	
		
			
				|  |  | -</template>
 | 
	
		
			
				|  |  | -<script setup>
 | 
	
		
			
				|  |  | -import { defineExpose, onMounted, getCurrentInstance } from 'vue';
 | 
	
		
			
				|  |  | -/* 注册方法 */
 | 
	
		
			
				|  |  | -// const emit = defineEmits(['onMeasureLength']);
 | 
	
		
			
				|  |  | -import { CrMap } from './CrMap.js';
 | 
	
		
			
				|  |  | -import CommonTools from './CommonTools.js';
 | 
	
		
			
				|  |  | -import { SketchViewModel } from './SketchViewModel.js';
 | 
	
		
			
				|  |  | -import { point } from '@turf/turf';
 | 
	
		
			
				|  |  | -const { proxy } = getCurrentInstance();
 | 
	
		
			
				|  |  | -/* 组件对外提供的方法 */
 | 
	
		
			
				|  |  | -defineExpose({
 | 
	
		
			
				|  |  | -	/* 长度测量方法 */
 | 
	
		
			
				|  |  | -	onMeasureLength: function() {
 | 
	
		
			
				|  |  | -		proxy.commonTools.measureLength();
 | 
	
		
			
				|  |  | -	},
 | 
	
		
			
				|  |  | -	/* 面积测量方法 */
 | 
	
		
			
				|  |  | -	onMeasureArea: function() {
 | 
	
		
			
				|  |  | -		proxy.commonTools.measureArea();
 | 
	
		
			
				|  |  | -	},
 | 
	
		
			
				|  |  | -	/* 测量高度方法 */
 | 
	
		
			
				|  |  | -	onMeasureHeight: function() {
 | 
	
		
			
				|  |  | -		proxy.commonTools.measureHeight();
 | 
	
		
			
				|  |  | -	},
 | 
	
		
			
				|  |  | -	/* 空间测距 */
 | 
	
		
			
				|  |  | -	onMeasureSpatialLength: function() {
 | 
	
		
			
				|  |  | -		proxy.commonTools.measureSpatialLength();
 | 
	
		
			
				|  |  | -	},
 | 
	
		
			
				|  |  | -	/* 三角测量 */
 | 
	
		
			
				|  |  | -	onMeasureTriangle: function() {
 | 
	
		
			
				|  |  | -		proxy.commonTools.measureTriangle();
 | 
	
		
			
				|  |  | -	},
 | 
	
		
			
				|  |  | -	/* 清理资源 */
 | 
	
		
			
				|  |  | -	onClear: function() {
 | 
	
		
			
				|  |  | -		proxy.commonTools.clear();
 | 
	
		
			
				|  |  | -	},
 | 
	
		
			
				|  |  | -	/* 区域查询 */
 | 
	
		
			
				|  |  | -	onQueryByPolygon: function() {
 | 
	
		
			
				|  |  | -		proxy.commonTools.queryByPolygon(function(res) {
 | 
	
		
			
				|  |  | -			console.log('坐标串', res);
 | 
	
		
			
				|  |  | -		});
 | 
	
		
			
				|  |  | -	},
 | 
	
		
			
				|  |  | -	/* 点查询 */
 | 
	
		
			
				|  |  | -	onQueryByPoint: function() {
 | 
	
		
			
				|  |  | -		proxy.commonTools.queryByPoint(function(res) {
 | 
	
		
			
				|  |  | -			console.log('坐标串', res);
 | 
	
		
			
				|  |  | -		});
 | 
	
		
			
				|  |  | -	},
 | 
	
		
			
				|  |  | -	/* 多点查询 */
 | 
	
		
			
				|  |  | -	onQueryByMultiplePoint: function() {
 | 
	
		
			
				|  |  | -		proxy.commonTools.queryByMultiplePoint(function(res) {
 | 
	
		
			
				|  |  | -			console.log('坐标数组', res);
 | 
	
		
			
				|  |  | -		});
 | 
	
		
			
				|  |  | -	},
 | 
	
		
			
				|  |  | -	/**
 | 
	
		
			
				|  |  | -	 * 线查询
 | 
	
		
			
				|  |  | -	 */
 | 
	
		
			
				|  |  | -	onQueryByLine: function() {
 | 
	
		
			
				|  |  | -		proxy.commonTools.queryByLine(function(res) {
 | 
	
		
			
				|  |  | -			console.log('坐标串', res);
 | 
	
		
			
				|  |  | -		});
 | 
	
		
			
				|  |  | -	},
 | 
	
		
			
				|  |  | -	/**
 | 
	
		
			
				|  |  | -	 * 圆查询
 | 
	
		
			
				|  |  | -	 */
 | 
	
		
			
				|  |  | -	onQueryByCircle: function() {
 | 
	
		
			
				|  |  | -		proxy.commonTools.queryByCircle(function(center, radius) {
 | 
	
		
			
				|  |  | -			console.log('中心点及半径', center, radius);
 | 
	
		
			
				|  |  | -		});
 | 
	
		
			
				|  |  | -	},
 | 
	
		
			
				|  |  | -	/**
 | 
	
		
			
				|  |  | -	 * 矩形查询
 | 
	
		
			
				|  |  | -	 */
 | 
	
		
			
				|  |  | -	onQueryByRectangle: function() {
 | 
	
		
			
				|  |  | -		proxy.commonTools.queryByRectangle(function(res) {
 | 
	
		
			
				|  |  | -			console.log('坐标串', res);
 | 
	
		
			
				|  |  | -		});
 | 
	
		
			
				|  |  | -	},
 | 
	
		
			
				|  |  | -
 | 
	
		
			
				|  |  | -	/* 绘制体 */
 | 
	
		
			
				|  |  | -	onDrawPolygonBody: function() {
 | 
	
		
			
				|  |  | -		proxy.commonTools.drawPolygonBody(function() {});
 | 
	
		
			
				|  |  | -	},
 | 
	
		
			
				|  |  | -
 | 
	
		
			
				|  |  | -	/* 拾取物体 */
 | 
	
		
			
				|  |  | -	onPickPolygonBody: function(callComplete) {
 | 
	
		
			
				|  |  | -		proxy.commonTools.pickPolygonBody(function(res) {
 | 
	
		
			
				|  |  | -			if (res != undefined) callComplete(res);
 | 
	
		
			
				|  |  | -		});
 | 
	
		
			
				|  |  | -	},
 | 
	
		
			
				|  |  | -
 | 
	
		
			
				|  |  | -	/**
 | 
	
		
			
				|  |  | -	 * 设置拾取的体对象样式及高度
 | 
	
		
			
				|  |  | -	 * @@param {JSON} options 配置项
 | 
	
		
			
				|  |  | -	 * @param {Array<Number>} options.color 颜色[0~~255,0~255,0~255,0~1]
 | 
	
		
			
				|  |  | -	 * @param {Number} options.height 高度
 | 
	
		
			
				|  |  | -	 * @param {Function} options.onComplete(message) 完成回调,如果message为undefined则代表成功,否则为失败消息
 | 
	
		
			
				|  |  | -	 */
 | 
	
		
			
				|  |  | -	onSetPolygonBody: function(options) {
 | 
	
		
			
				|  |  | -		proxy.commonTools.setPolygonBody({
 | 
	
		
			
				|  |  | -			color: options.color,
 | 
	
		
			
				|  |  | -			height: options.height,
 | 
	
		
			
				|  |  | -			onComplete: options.onComplete
 | 
	
		
			
				|  |  | -		});
 | 
	
		
			
				|  |  | -	},
 | 
	
		
			
				|  |  | -
 | 
	
		
			
				|  |  | -	/**
 | 
	
		
			
				|  |  | -	 * 移除拾取的体对象
 | 
	
		
			
				|  |  | -	 * @param {Function} onComplete(message) 完成回调,message为undifined为成功,否则为失败消息
 | 
	
		
			
				|  |  | -	 */
 | 
	
		
			
				|  |  | -	onRemovePolygonBody: function(onComplete) {
 | 
	
		
			
				|  |  | -		proxy.commonTools.removePolygonBody(onComplete);
 | 
	
		
			
				|  |  | -	},
 | 
	
		
			
				|  |  | -
 | 
	
		
			
				|  |  | -	/* 测试工具 */
 | 
	
		
			
				|  |  | -	onTestDemo: function() {
 | 
	
		
			
				|  |  | -		let cameraViewer = {
 | 
	
		
			
				|  |  | -			lng: 118.22480916041573,
 | 
	
		
			
				|  |  | -			lat: 35.140818266338854,
 | 
	
		
			
				|  |  | -			alt: 164.9208475038474,
 | 
	
		
			
				|  |  | -			pitch: -40.80823993511622,
 | 
	
		
			
				|  |  | -			heading: 1.717840652315993,
 | 
	
		
			
				|  |  | -			roll: 359.9998582097622
 | 
	
		
			
				|  |  | -		};
 | 
	
		
			
				|  |  | -
 | 
	
		
			
				|  |  | -		proxy.CMapApi.cameraFlyToo(cameraViewer);
 | 
	
		
			
				|  |  | -
 | 
	
		
			
				|  |  | -		proxy.commonTools.testDemo();
 | 
	
		
			
				|  |  | -	},
 | 
	
		
			
				|  |  | -	/**
 | 
	
		
			
				|  |  | -	 * 获取相机视角
 | 
	
		
			
				|  |  | -	 */
 | 
	
		
			
				|  |  | -	onGetCameraViewer: function() {
 | 
	
		
			
				|  |  | -		let param = proxy.CMapApi.getCameraViewParams();
 | 
	
		
			
				|  |  | -		console.log('相机视角', JSON.stringify(param));
 | 
	
		
			
				|  |  | -	},
 | 
	
		
			
				|  |  | -
 | 
	
		
			
				|  |  | -	/**
 | 
	
		
			
				|  |  | -	 * 绘制要素
 | 
	
		
			
				|  |  | -	 * @param {Array<Number>} points 经纬度点集合
 | 
	
		
			
				|  |  | -	 */
 | 
	
		
			
				|  |  | -	onDrawFeacture: function(points) {
 | 
	
		
			
				|  |  | -		proxy.commonTools.drawPolygonFeacture(points);
 | 
	
		
			
				|  |  | -	},
 | 
	
		
			
				|  |  | -
 | 
	
		
			
				|  |  | -	/**
 | 
	
		
			
				|  |  | -	 * 清除绘制内容
 | 
	
		
			
				|  |  | -	 */
 | 
	
		
			
				|  |  | -	onClearDraw: function() {
 | 
	
		
			
				|  |  | -		proxy.sketchViewModel.sketchClear();
 | 
	
		
			
				|  |  | -	},
 | 
	
		
			
				|  |  | -
 | 
	
		
			
				|  |  | -	/**
 | 
	
		
			
				|  |  | -	 * 鼠标点击绘制可编辑贴地线
 | 
	
		
			
				|  |  | -	 */
 | 
	
		
			
				|  |  | -	onMouseDrawEditLine: function() {
 | 
	
		
			
				|  |  | -		proxy.sketchViewModel.sketchTools(SketchViewModel.SketchType.Line, {
 | 
	
		
			
				|  |  | -			isEdit: true
 | 
	
		
			
				|  |  | -		});
 | 
	
		
			
				|  |  | -	},
 | 
	
		
			
				|  |  | -
 | 
	
		
			
				|  |  | -	/**
 | 
	
		
			
				|  |  | -	 * 鼠标点击绘制可编辑贴地面
 | 
	
		
			
				|  |  | -	 */
 | 
	
		
			
				|  |  | -	onMouseDrawEditPolygon: function() {
 | 
	
		
			
				|  |  | -		proxy.sketchViewModel.sketchTools(SketchViewModel.SketchType.Polygon, {
 | 
	
		
			
				|  |  | -			isEdit: true
 | 
	
		
			
				|  |  | -		});
 | 
	
		
			
				|  |  | -	},
 | 
	
		
			
				|  |  | -
 | 
	
		
			
				|  |  | -	/**
 | 
	
		
			
				|  |  | -	 * 鼠标点击绘制可编辑矩形
 | 
	
		
			
				|  |  | -	 */
 | 
	
		
			
				|  |  | -	onMouseDrawEditRectangle: function() {
 | 
	
		
			
				|  |  | -		proxy.sketchViewModel.sketchTools(SketchViewModel.SketchType.Rectangle, {
 | 
	
		
			
				|  |  | -			isEdit: true
 | 
	
		
			
				|  |  | -		});
 | 
	
		
			
				|  |  | -	},
 | 
	
		
			
				|  |  | -
 | 
	
		
			
				|  |  | -	/**
 | 
	
		
			
				|  |  | -	 * 鼠标点击绘制可编辑圆
 | 
	
		
			
				|  |  | -	 */
 | 
	
		
			
				|  |  | -	onMouseDrawEditCircle: function() {
 | 
	
		
			
				|  |  | -		proxy.sketchViewModel.sketchTools(SketchViewModel.SketchType.Circle, {
 | 
	
		
			
				|  |  | -			isEdit: true
 | 
	
		
			
				|  |  | -		});
 | 
	
		
			
				|  |  | -	},
 | 
	
		
			
				|  |  | -
 | 
	
		
			
				|  |  | -	/**
 | 
	
		
			
				|  |  | -	 * 鼠标点击绘制可编辑墙
 | 
	
		
			
				|  |  | -	 */
 | 
	
		
			
				|  |  | -	onMouseDrawEditWall: function() {
 | 
	
		
			
				|  |  | -		proxy.sketchViewModel.sketchTools(SketchViewModel.SketchType.Wall, {
 | 
	
		
			
				|  |  | -			isEdit: true
 | 
	
		
			
				|  |  | -		});
 | 
	
		
			
				|  |  | -	}
 | 
	
		
			
				|  |  | -});
 | 
	
		
			
				|  |  | -/* 初始化 */
 | 
	
		
			
				|  |  | -onMounted(() => {
 | 
	
		
			
				|  |  | -	let _self = proxy;
 | 
	
		
			
				|  |  | -	proxy.CMapApi = new CrMap({
 | 
	
		
			
				|  |  | -		selector: 'cesiumContainer',
 | 
	
		
			
				|  |  | -		sourcePath: './resource/'
 | 
	
		
			
				|  |  | -	});
 | 
	
		
			
				|  |  | -
 | 
	
		
			
				|  |  | -	/* 创建工具集 */
 | 
	
		
			
				|  |  | -	proxy.commonTools = new CommonTools(proxy.CMapApi.getViewer(), {
 | 
	
		
			
				|  |  | -		isClear: false
 | 
	
		
			
				|  |  | -	});
 | 
	
		
			
				|  |  | -
 | 
	
		
			
				|  |  | -	/* 创建绘制类工具 */
 | 
	
		
			
				|  |  | -	proxy.sketchViewModel = new SketchViewModel(proxy.CMapApi.getViewer(), {
 | 
	
		
			
				|  |  | -		iconType: SketchViewModel.SketchIconType.Blue,
 | 
	
		
			
				|  |  | -		isDrawPoint: true,
 | 
	
		
			
				|  |  | -		isRetainDrawPoint: true
 | 
	
		
			
				|  |  | -	});
 | 
	
		
			
				|  |  | -
 | 
	
		
			
				|  |  | -	/* 添加暗夜版图层 */
 | 
	
		
			
				|  |  | -	proxy.CMapApi.addLayer({
 | 
	
		
			
				|  |  | -		layId: 'mapbox',
 | 
	
		
			
				|  |  | -		layName: '暗夜版底图',
 | 
	
		
			
				|  |  | -		layType: CrMap.LayerType.mapboxLayer,
 | 
	
		
			
				|  |  | -		isShow: true,
 | 
	
		
			
				|  |  | -		config: {}
 | 
	
		
			
				|  |  | -	});
 | 
	
		
			
				|  |  | -
 | 
	
		
			
				|  |  | -	/* 添加实景地图 */
 | 
	
		
			
				|  |  | -	proxy.CMapApi.addLayer({
 | 
	
		
			
				|  |  | -		layId: 'yt3d',
 | 
	
		
			
				|  |  | -		layName: '烟台实景',
 | 
	
		
			
				|  |  | -		layType: CrMap.LayerType.tilesetsLayer,
 | 
	
		
			
				|  |  | -		isShow: true,
 | 
	
		
			
				|  |  | -		config: {
 | 
	
		
			
				|  |  | -			url: ['http://218.59.194.82:13080/crdata/sdly/crtiles/tileset.json', 'http://218.59.194.82:13080/crdata/sdyt/crtile/zxc/1tiles/tileset1.json']
 | 
	
		
			
				|  |  | -		}
 | 
	
		
			
				|  |  | -	});
 | 
	
		
			
				|  |  | -
 | 
	
		
			
				|  |  | -	/* 添加实景地图 */
 | 
	
		
			
				|  |  | -	proxy.CMapApi.addLayer({
 | 
	
		
			
				|  |  | -		layId: 'qp3d01',
 | 
	
		
			
				|  |  | -		layName: '牟平三维',
 | 
	
		
			
				|  |  | -		layType: CrMap.LayerType.tilesetsLayer,
 | 
	
		
			
				|  |  | -		isShow: true,
 | 
	
		
			
				|  |  | -		config: {
 | 
	
		
			
				|  |  | -			url: ['http://218.59.194.82:13480/ytmp/3dtiles/shijing/1/tileset1.json'],
 | 
	
		
			
				|  |  | -			offsetHeight: 10
 | 
	
		
			
				|  |  | -		}
 | 
	
		
			
				|  |  | -	});
 | 
	
		
			
				|  |  | -
 | 
	
		
			
				|  |  | -	// /* 添加实景地图 */
 | 
	
		
			
				|  |  | -	// proxy.CMapApi.addLayer({
 | 
	
		
			
				|  |  | -	// 	layId: 'lsq3d',
 | 
	
		
			
				|  |  | -	// 	layName: '兰山区实景',
 | 
	
		
			
				|  |  | -	// 	layType: CrMap.LayerType.tilesetsLayer,
 | 
	
		
			
				|  |  | -	// 	isShow: true,
 | 
	
		
			
				|  |  | -	// 	config: {
 | 
	
		
			
				|  |  | -	// 		url: [
 | 
	
		
			
				|  |  | -	// 			'http://218.59.194.82:13080/crdata/sdly/crtiles/tileset.json',
 | 
	
		
			
				|  |  | -	// 			'http://218.59.194.82:13080/crdata/lyls/tiles/tileset.json',
 | 
	
		
			
				|  |  | -	// 			'http://218.59.194.82:13080/crdata/lyls/3Dtiles/tileset.json'
 | 
	
		
			
				|  |  | -	// 		]
 | 
	
		
			
				|  |  | -	// 	}
 | 
	
		
			
				|  |  | -	// });
 | 
	
		
			
				|  |  | -
 | 
	
		
			
				|  |  | -	//http://10.88.77.134/lyls/3Dtiles/tileset.json
 | 
	
		
			
				|  |  | -	// 'http://218.59.194.82:13080/crdata/sdly/crtiles/tileset.json',
 | 
	
		
			
				|  |  | -	// 'http://218.59.194.82:13080/crdata/lyls/tiles/tileset.json',
 | 
	
		
			
				|  |  | -	// 'http://218.59.194.82:13080/crdata/lyls/3Dtiles/tileset.json'
 | 
	
		
			
				|  |  | -
 | 
	
		
			
				|  |  | -	/* 添加影像图 */
 | 
	
		
			
				|  |  | -	// proxy.CMapApi.addLayer({
 | 
	
		
			
				|  |  | -	// 	layId: 'yxt',
 | 
	
		
			
				|  |  | -	// 	layName: '影像图',
 | 
	
		
			
				|  |  | -	// 	layType: CrMap.LayerType.wmtsLayer,
 | 
	
		
			
				|  |  | -	// 	isShow: true,
 | 
	
		
			
				|  |  | -	// 	config: {
 | 
	
		
			
				|  |  | -	// 		url: 'http://218.59.194.74:6080/arcgis/rest/services/LYLSQ_YX_102100_202112/MapServer/WMTS'
 | 
	
		
			
				|  |  | -	// 	}
 | 
	
		
			
				|  |  | -	// });
 | 
	
		
			
				|  |  | -
 | 
	
		
			
				|  |  | -	/* 添加模版影像地图 */
 | 
	
		
			
				|  |  | -	proxy.CMapApi.addLayer({
 | 
	
		
			
				|  |  | -		layId: 'mpYxt',
 | 
	
		
			
				|  |  | -		layName: '牟平影像图',
 | 
	
		
			
				|  |  | -		layType: CrMap.LayerType.templateLayer,
 | 
	
		
			
				|  |  | -		isShow: true,
 | 
	
		
			
				|  |  | -		config: {
 | 
	
		
			
				|  |  | -			url: 'http://202.102.167.52:16282/geoserver/gwc/service/tms/1.0.0/ytmp%3Atdt@EPSG%3A900913@png/{z}/{x}/{reverseY}.png',
 | 
	
		
			
				|  |  | -			minimumLevel: 0,
 | 
	
		
			
				|  |  | -			maximumLevel: 18
 | 
	
		
			
				|  |  | -		}
 | 
	
		
			
				|  |  | -	});
 | 
	
		
			
				|  |  | -
 | 
	
		
			
				|  |  | -	/* 进入中国位置 */
 | 
	
		
			
				|  |  | -	proxy.CMapApi.setMapRange({
 | 
	
		
			
				|  |  | -		lng: 103.84, //经度
 | 
	
		
			
				|  |  | -		lat: 31.15, // 维度
 | 
	
		
			
				|  |  | -		alt: 24000000, // 高度
 | 
	
		
			
				|  |  | -		heading: 0, //偏航
 | 
	
		
			
				|  |  | -		pitch: -90, //俯仰,人如果在赤道上空,俯仰角为0可见地球。如果在北纬,俯仰角为负才能见地球
 | 
	
		
			
				|  |  | -		roll: 0.0 //翻滚
 | 
	
		
			
				|  |  | -	});
 | 
	
		
			
				|  |  | -
 | 
	
		
			
				|  |  | -	/* 飞行到指定位置 */
 | 
	
		
			
				|  |  | -	proxy.CMapApi.flyToRectangle({
 | 
	
		
			
				|  |  | -		// strLng: 118.22087954757484,
 | 
	
		
			
				|  |  | -		// strLat: 35.14124100849915,
 | 
	
		
			
				|  |  | -		// endLng: 118.22865486061352,
 | 
	
		
			
				|  |  | -		// endLat: 35.14589687229257,
 | 
	
		
			
				|  |  | -		strLng: 118.05,
 | 
	
		
			
				|  |  | -		strLat: 34.953,
 | 
	
		
			
				|  |  | -		endLng: 118.53,
 | 
	
		
			
				|  |  | -		endLat: 35.434,
 | 
	
		
			
				|  |  | -		success: function() {
 | 
	
		
			
				|  |  | -			/* 设置地形*/
 | 
	
		
			
				|  |  | -			_self.CMapApi.setTerrain({
 | 
	
		
			
				|  |  | -				// url: 'http://218.59.194.82:13080/crdata/shandong/dem'
 | 
	
		
			
				|  |  | -				// url: 'http://202.102.167.52:16381/crdata/dem'
 | 
	
		
			
				|  |  | -				// url: 'https://www.supermapol.com/realspace/services/3D-stk_terrain/rest/realspace/datas/info/data/path'
 | 
	
		
			
				|  |  | -				url: 'http://218.59.194.82:13480/sddem/dem/'
 | 
	
		
			
				|  |  | -			});
 | 
	
		
			
				|  |  | -			/* 初始化显示图层 */
 | 
	
		
			
				|  |  | -			_self.CMapApi.showInit();
 | 
	
		
			
				|  |  | -		}
 | 
	
		
			
				|  |  | -	});
 | 
	
		
			
				|  |  | -
 | 
	
		
			
				|  |  | -	/* 查询ArcGIS服务试试 */
 | 
	
		
			
				|  |  | -	proxy.CMapApi.queryAGServerExtent(
 | 
	
		
			
				|  |  | -		'http://218.59.194.82:6080/arcgis/rest/services/LSQZRZY_RE_WEB_V1/MapServer',
 | 
	
		
			
				|  |  | -		'0',
 | 
	
		
			
				|  |  | -		function(res) {
 | 
	
		
			
				|  |  | -			console.log(JSON.stringify(res));
 | 
	
		
			
				|  |  | -		},
 | 
	
		
			
				|  |  | -		function(err) {
 | 
	
		
			
				|  |  | -			console.log('查询范围错误', err);
 | 
	
		
			
				|  |  | -		}
 | 
	
		
			
				|  |  | -	);
 | 
	
		
			
				|  |  | -});
 | 
	
		
			
				|  |  | -</script>
 | 
	
		
			
				|  |  | -<style>
 | 
	
		
			
				|  |  | -.jt-map {
 | 
	
		
			
				|  |  | -	position: relative;
 | 
	
		
			
				|  |  | -	top: 0px;
 | 
	
		
			
				|  |  | -	width: 100%;
 | 
	
		
			
				|  |  | -	height: 100%;
 | 
	
		
			
				|  |  | -	margin: 0;
 | 
	
		
			
				|  |  | -	padding: 0;
 | 
	
		
			
				|  |  | -	overflow: hidden;
 | 
	
		
			
				|  |  | -	background-color: blue;
 | 
	
		
			
				|  |  | -}
 | 
	
		
			
				|  |  | -
 | 
	
		
			
				|  |  | -.cesium-performanceDisplay-defaultContainer {
 | 
	
		
			
				|  |  | -	top: unset !important;
 | 
	
		
			
				|  |  | -	bottom: 100px !important;
 | 
	
		
			
				|  |  | -	right: 10px !important;
 | 
	
		
			
				|  |  | -}
 | 
	
		
			
				|  |  | +<template>
 | 
	
		
			
				|  |  | +	<div id="cesiumContainer" class="jt-map"></div>
 | 
	
		
			
				|  |  | +</template>
 | 
	
		
			
				|  |  | +<script setup>
 | 
	
		
			
				|  |  | +import { param } from 'jquery';
 | 
	
		
			
				|  |  | +import { defineExpose, onMounted, getCurrentInstance } from 'vue';
 | 
	
		
			
				|  |  | +/* 注册方法 */
 | 
	
		
			
				|  |  | +const emit = defineEmits(['onEditWall']);
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +import { CrMap } from './CrMap.js';
 | 
	
		
			
				|  |  | +import CommonTools from './CommonTools.js';
 | 
	
		
			
				|  |  | +import { SketchViewModel } from './SketchViewModel.js';
 | 
	
		
			
				|  |  | +import { point } from '@turf/turf';
 | 
	
		
			
				|  |  | +const { proxy } = getCurrentInstance();
 | 
	
		
			
				|  |  | +/* 组件对外提供的方法 */
 | 
	
		
			
				|  |  | +defineExpose({
 | 
	
		
			
				|  |  | +	/* 长度测量方法 */
 | 
	
		
			
				|  |  | +	onMeasureLength: function() {
 | 
	
		
			
				|  |  | +		proxy.commonTools.measureLength();
 | 
	
		
			
				|  |  | +	},
 | 
	
		
			
				|  |  | +	/* 面积测量方法 */
 | 
	
		
			
				|  |  | +	onMeasureArea: function() {
 | 
	
		
			
				|  |  | +		proxy.commonTools.measureArea();
 | 
	
		
			
				|  |  | +	},
 | 
	
		
			
				|  |  | +	/* 测量高度方法 */
 | 
	
		
			
				|  |  | +	onMeasureHeight: function() {
 | 
	
		
			
				|  |  | +		proxy.commonTools.measureHeight();
 | 
	
		
			
				|  |  | +	},
 | 
	
		
			
				|  |  | +	/* 空间测距 */
 | 
	
		
			
				|  |  | +	onMeasureSpatialLength: function() {
 | 
	
		
			
				|  |  | +		proxy.commonTools.measureSpatialLength();
 | 
	
		
			
				|  |  | +	},
 | 
	
		
			
				|  |  | +	/* 三角测量 */
 | 
	
		
			
				|  |  | +	onMeasureTriangle: function() {
 | 
	
		
			
				|  |  | +		proxy.commonTools.measureTriangle();
 | 
	
		
			
				|  |  | +	},
 | 
	
		
			
				|  |  | +	/* 清理资源 */
 | 
	
		
			
				|  |  | +	onClear: function() {
 | 
	
		
			
				|  |  | +		proxy.commonTools.clear();
 | 
	
		
			
				|  |  | +	},
 | 
	
		
			
				|  |  | +	/* 区域查询 */
 | 
	
		
			
				|  |  | +	onQueryByPolygon: function() {
 | 
	
		
			
				|  |  | +		proxy.commonTools.queryByPolygon(function(res) {
 | 
	
		
			
				|  |  | +			console.log('坐标串', res);
 | 
	
		
			
				|  |  | +		});
 | 
	
		
			
				|  |  | +	},
 | 
	
		
			
				|  |  | +	/* 点查询 */
 | 
	
		
			
				|  |  | +	onQueryByPoint: function() {
 | 
	
		
			
				|  |  | +		proxy.commonTools.queryByPoint(function(res) {
 | 
	
		
			
				|  |  | +			console.log('坐标串', res);
 | 
	
		
			
				|  |  | +		});
 | 
	
		
			
				|  |  | +	},
 | 
	
		
			
				|  |  | +	/* 多点查询 */
 | 
	
		
			
				|  |  | +	onQueryByMultiplePoint: function() {
 | 
	
		
			
				|  |  | +		proxy.commonTools.queryByMultiplePoint(function(res) {
 | 
	
		
			
				|  |  | +			console.log('坐标数组', res);
 | 
	
		
			
				|  |  | +		});
 | 
	
		
			
				|  |  | +	},
 | 
	
		
			
				|  |  | +	/**
 | 
	
		
			
				|  |  | +	 * 线查询
 | 
	
		
			
				|  |  | +	 */
 | 
	
		
			
				|  |  | +	onQueryByLine: function() {
 | 
	
		
			
				|  |  | +		proxy.commonTools.queryByLine(function(res) {
 | 
	
		
			
				|  |  | +			console.log('坐标串', res);
 | 
	
		
			
				|  |  | +		});
 | 
	
		
			
				|  |  | +	},
 | 
	
		
			
				|  |  | +	/**
 | 
	
		
			
				|  |  | +	 * 圆查询
 | 
	
		
			
				|  |  | +	 */
 | 
	
		
			
				|  |  | +	onQueryByCircle: function() {
 | 
	
		
			
				|  |  | +		proxy.commonTools.queryByCircle(function(center, radius) {
 | 
	
		
			
				|  |  | +			console.log('中心点及半径', center, radius);
 | 
	
		
			
				|  |  | +		});
 | 
	
		
			
				|  |  | +	},
 | 
	
		
			
				|  |  | +	/**
 | 
	
		
			
				|  |  | +	 * 矩形查询
 | 
	
		
			
				|  |  | +	 */
 | 
	
		
			
				|  |  | +	onQueryByRectangle: function() {
 | 
	
		
			
				|  |  | +		proxy.commonTools.queryByRectangle(function(res) {
 | 
	
		
			
				|  |  | +			console.log('坐标串', res);
 | 
	
		
			
				|  |  | +		});
 | 
	
		
			
				|  |  | +	},
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +	/* 绘制体 */
 | 
	
		
			
				|  |  | +	onDrawPolygonBody: function() {
 | 
	
		
			
				|  |  | +		proxy.commonTools.drawPolygonBody(function() {});
 | 
	
		
			
				|  |  | +	},
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +	/* 拾取物体 */
 | 
	
		
			
				|  |  | +	onPickPolygonBody: function(callComplete) {
 | 
	
		
			
				|  |  | +		proxy.commonTools.pickPolygonBody(function(res) {
 | 
	
		
			
				|  |  | +			if (res != undefined) callComplete(res);
 | 
	
		
			
				|  |  | +		});
 | 
	
		
			
				|  |  | +	},
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +	/**
 | 
	
		
			
				|  |  | +	 * 设置拾取的体对象样式及高度
 | 
	
		
			
				|  |  | +	 * @@param {JSON} options 配置项
 | 
	
		
			
				|  |  | +	 * @param {Array<Number>} options.color 颜色[0~~255,0~255,0~255,0~1]
 | 
	
		
			
				|  |  | +	 * @param {Number} options.height 高度
 | 
	
		
			
				|  |  | +	 * @param {Function} options.onComplete(message) 完成回调,如果message为undefined则代表成功,否则为失败消息
 | 
	
		
			
				|  |  | +	 */
 | 
	
		
			
				|  |  | +	onSetPolygonBody: function(options) {
 | 
	
		
			
				|  |  | +		proxy.commonTools.setPolygonBody({
 | 
	
		
			
				|  |  | +			color: options.color,
 | 
	
		
			
				|  |  | +			height: options.height,
 | 
	
		
			
				|  |  | +			onComplete: options.onComplete
 | 
	
		
			
				|  |  | +		});
 | 
	
		
			
				|  |  | +	},
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +	/**
 | 
	
		
			
				|  |  | +	 * 移除拾取的体对象
 | 
	
		
			
				|  |  | +	 * @param {Function} onComplete(message) 完成回调,message为undifined为成功,否则为失败消息
 | 
	
		
			
				|  |  | +	 */
 | 
	
		
			
				|  |  | +	onRemovePolygonBody: function(onComplete) {
 | 
	
		
			
				|  |  | +		proxy.commonTools.removePolygonBody(onComplete);
 | 
	
		
			
				|  |  | +	},
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +	/* 测试工具 */
 | 
	
		
			
				|  |  | +	onTestDemo: function() {
 | 
	
		
			
				|  |  | +		let cameraViewer = {
 | 
	
		
			
				|  |  | +			lng: 118.22480916041573,
 | 
	
		
			
				|  |  | +			lat: 35.140818266338854,
 | 
	
		
			
				|  |  | +			alt: 164.9208475038474,
 | 
	
		
			
				|  |  | +			pitch: -40.80823993511622,
 | 
	
		
			
				|  |  | +			heading: 1.717840652315993,
 | 
	
		
			
				|  |  | +			roll: 359.9998582097622
 | 
	
		
			
				|  |  | +		};
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +		proxy.CMapApi.cameraFlyToo(cameraViewer);
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +		proxy.commonTools.testDemo();
 | 
	
		
			
				|  |  | +	},
 | 
	
		
			
				|  |  | +	/**
 | 
	
		
			
				|  |  | +	 * 获取相机视角
 | 
	
		
			
				|  |  | +	 */
 | 
	
		
			
				|  |  | +	onGetCameraViewer: function() {
 | 
	
		
			
				|  |  | +		let param = proxy.CMapApi.getCameraViewParams();
 | 
	
		
			
				|  |  | +		console.log('相机视角', JSON.stringify(param));
 | 
	
		
			
				|  |  | +	},
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +	/**
 | 
	
		
			
				|  |  | +	 * 绘制要素
 | 
	
		
			
				|  |  | +	 * @param {Array<Number>} points 经纬度点集合
 | 
	
		
			
				|  |  | +	 */
 | 
	
		
			
				|  |  | +	onDrawFeacture: function(points) {
 | 
	
		
			
				|  |  | +		proxy.commonTools.drawPolygonFeacture(points);
 | 
	
		
			
				|  |  | +	},
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +	/**
 | 
	
		
			
				|  |  | +	 * 清除绘制内容
 | 
	
		
			
				|  |  | +	 */
 | 
	
		
			
				|  |  | +	onClearDraw: function() {
 | 
	
		
			
				|  |  | +		proxy.sketchViewModel.sketchClear();
 | 
	
		
			
				|  |  | +	},
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +	/**
 | 
	
		
			
				|  |  | +	 * 鼠标点击绘制可编辑贴地线
 | 
	
		
			
				|  |  | +	 */
 | 
	
		
			
				|  |  | +	onMouseDrawEditLine: function() {
 | 
	
		
			
				|  |  | +		proxy.sketchViewModel.sketchTools(SketchViewModel.SketchType.Line, {
 | 
	
		
			
				|  |  | +			isEdit: true
 | 
	
		
			
				|  |  | +		});
 | 
	
		
			
				|  |  | +	},
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +	/**
 | 
	
		
			
				|  |  | +	 * 鼠标点击绘制可编辑贴地面
 | 
	
		
			
				|  |  | +	 */
 | 
	
		
			
				|  |  | +	onMouseDrawEditPolygon: function() {
 | 
	
		
			
				|  |  | +		proxy.sketchViewModel.sketchTools(SketchViewModel.SketchType.Polygon, {
 | 
	
		
			
				|  |  | +			isEdit: true
 | 
	
		
			
				|  |  | +		});
 | 
	
		
			
				|  |  | +	},
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +	/**
 | 
	
		
			
				|  |  | +	 * 鼠标点击绘制可编辑矩形
 | 
	
		
			
				|  |  | +	 */
 | 
	
		
			
				|  |  | +	onMouseDrawEditRectangle: function() {
 | 
	
		
			
				|  |  | +		proxy.sketchViewModel.sketchTools(SketchViewModel.SketchType.Rectangle, {
 | 
	
		
			
				|  |  | +			isEdit: true
 | 
	
		
			
				|  |  | +		});
 | 
	
		
			
				|  |  | +	},
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +	/**
 | 
	
		
			
				|  |  | +	 * 鼠标点击绘制可编辑圆
 | 
	
		
			
				|  |  | +	 */
 | 
	
		
			
				|  |  | +	onMouseDrawEditCircle: function() {
 | 
	
		
			
				|  |  | +		proxy.sketchViewModel.sketchTools(SketchViewModel.SketchType.Circle, {
 | 
	
		
			
				|  |  | +			isEdit: true
 | 
	
		
			
				|  |  | +		});
 | 
	
		
			
				|  |  | +	},
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +	/**
 | 
	
		
			
				|  |  | +	 * 鼠标点击绘制可编辑动态墙
 | 
	
		
			
				|  |  | +	 */
 | 
	
		
			
				|  |  | +	onMouseDrawDynamicEditWall: function() {
 | 
	
		
			
				|  |  | +		proxy.sketchViewModel.sketchTools(SketchViewModel.SketchType.Wall, {
 | 
	
		
			
				|  |  | +			isEdit: true,
 | 
	
		
			
				|  |  | +			wallType: SketchViewModel.SketchWallType.DynamicWall
 | 
	
		
			
				|  |  | +		});
 | 
	
		
			
				|  |  | +	},
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +	/**
 | 
	
		
			
				|  |  | +	 * 鼠标点击绘制可编辑颜色墙
 | 
	
		
			
				|  |  | +	 */
 | 
	
		
			
				|  |  | +	onMouseDrawColorEditWall: function() {
 | 
	
		
			
				|  |  | +		proxy.sketchViewModel.sketchTools(SketchViewModel.SketchType.Wall, {
 | 
	
		
			
				|  |  | +			isEdit: true,
 | 
	
		
			
				|  |  | +			wallType: SketchViewModel.SketchWallType.ColorWall
 | 
	
		
			
				|  |  | +		});
 | 
	
		
			
				|  |  | +	},
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +	/**
 | 
	
		
			
				|  |  | +	 * 鼠标点击绘制可编辑文字墙
 | 
	
		
			
				|  |  | +	 */
 | 
	
		
			
				|  |  | +	onMouseDrawEditText: function() {
 | 
	
		
			
				|  |  | +		proxy.sketchViewModel.sketchTools(SketchViewModel.SketchType.Wall, {
 | 
	
		
			
				|  |  | +			isEdit: true,
 | 
	
		
			
				|  |  | +			wallType: SketchViewModel.SketchWallType.Text
 | 
	
		
			
				|  |  | +		});
 | 
	
		
			
				|  |  | +	},
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +	/**
 | 
	
		
			
				|  |  | +	 * 绘制可编辑动态圆
 | 
	
		
			
				|  |  | +	 */
 | 
	
		
			
				|  |  | +	onMouseDrawDynamicCircle: function() {
 | 
	
		
			
				|  |  | +		proxy.sketchViewModel.sketchTools(SketchViewModel.SketchType.DynamicCircle, {
 | 
	
		
			
				|  |  | +			isEdit: true
 | 
	
		
			
				|  |  | +		});
 | 
	
		
			
				|  |  | +	},
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +	/**
 | 
	
		
			
				|  |  | +	 * 更新墙属性
 | 
	
		
			
				|  |  | +	 * @param {JSON} params 参数配置项
 | 
	
		
			
				|  |  | +	 */
 | 
	
		
			
				|  |  | +	onSubmitEditWall: function(params) {
 | 
	
		
			
				|  |  | +		proxy.sketchViewModel.updateEditEntityWall(params);
 | 
	
		
			
				|  |  | +	}
 | 
	
		
			
				|  |  | +});
 | 
	
		
			
				|  |  | +/* 初始化 */
 | 
	
		
			
				|  |  | +onMounted(() => {
 | 
	
		
			
				|  |  | +	let _self = proxy;
 | 
	
		
			
				|  |  | +	proxy.CMapApi = new CrMap({
 | 
	
		
			
				|  |  | +		selector: 'cesiumContainer',
 | 
	
		
			
				|  |  | +		sourcePath: './resource/'
 | 
	
		
			
				|  |  | +	});
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +	/* 创建工具集 */
 | 
	
		
			
				|  |  | +	proxy.commonTools = new CommonTools(proxy.CMapApi.getViewer(), {
 | 
	
		
			
				|  |  | +		isClear: false
 | 
	
		
			
				|  |  | +	});
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +	/* 创建绘制类工具 */
 | 
	
		
			
				|  |  | +	proxy.sketchViewModel = new SketchViewModel(proxy.CMapApi.getViewer(), {
 | 
	
		
			
				|  |  | +		iconType: SketchViewModel.SketchIconType.Blue,
 | 
	
		
			
				|  |  | +		isDrawPoint: true,
 | 
	
		
			
				|  |  | +		isRetainDrawPoint: true
 | 
	
		
			
				|  |  | +	});
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +	/* 创建监听 */
 | 
	
		
			
				|  |  | +	proxy.sketchViewModel.onEditWall = param => {
 | 
	
		
			
				|  |  | +		emit('onEditWall', param);
 | 
	
		
			
				|  |  | +	};
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +	/* 添加暗夜版图层 */
 | 
	
		
			
				|  |  | +	proxy.CMapApi.addLayer({
 | 
	
		
			
				|  |  | +		layId: 'mapbox',
 | 
	
		
			
				|  |  | +		layName: '暗夜版底图',
 | 
	
		
			
				|  |  | +		layType: CrMap.LayerType.mapboxLayer,
 | 
	
		
			
				|  |  | +		isShow: true,
 | 
	
		
			
				|  |  | +		config: {}
 | 
	
		
			
				|  |  | +	});
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +	/* 添加实景地图 */
 | 
	
		
			
				|  |  | +	proxy.CMapApi.addLayer({
 | 
	
		
			
				|  |  | +		layId: 'yt3d',
 | 
	
		
			
				|  |  | +		layName: '烟台实景',
 | 
	
		
			
				|  |  | +		layType: CrMap.LayerType.tilesetsLayer,
 | 
	
		
			
				|  |  | +		isShow: true,
 | 
	
		
			
				|  |  | +		config: {
 | 
	
		
			
				|  |  | +			url: ['http://218.59.194.82:13080/crdata/sdly/crtiles/tileset.json', 'http://218.59.194.82:13080/crdata/sdyt/crtile/zxc/1tiles/tileset1.json']
 | 
	
		
			
				|  |  | +		}
 | 
	
		
			
				|  |  | +	});
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +	/* 添加实景地图 */
 | 
	
		
			
				|  |  | +	proxy.CMapApi.addLayer({
 | 
	
		
			
				|  |  | +		layId: 'qp3d01',
 | 
	
		
			
				|  |  | +		layName: '牟平三维',
 | 
	
		
			
				|  |  | +		layType: CrMap.LayerType.tilesetsLayer,
 | 
	
		
			
				|  |  | +		isShow: true,
 | 
	
		
			
				|  |  | +		config: {
 | 
	
		
			
				|  |  | +			url: ['http://218.59.194.82:13480/ytmp/3dtiles/shijing/1/tileset1.json'],
 | 
	
		
			
				|  |  | +			offsetHeight: 10
 | 
	
		
			
				|  |  | +		}
 | 
	
		
			
				|  |  | +	});
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +	// /* 添加实景地图 */
 | 
	
		
			
				|  |  | +	// proxy.CMapApi.addLayer({
 | 
	
		
			
				|  |  | +	// 	layId: 'lsq3d',
 | 
	
		
			
				|  |  | +	// 	layName: '兰山区实景',
 | 
	
		
			
				|  |  | +	// 	layType: CrMap.LayerType.tilesetsLayer,
 | 
	
		
			
				|  |  | +	// 	isShow: true,
 | 
	
		
			
				|  |  | +	// 	config: {
 | 
	
		
			
				|  |  | +	// 		url: [
 | 
	
		
			
				|  |  | +	// 			'http://218.59.194.82:13080/crdata/sdly/crtiles/tileset.json',
 | 
	
		
			
				|  |  | +	// 			'http://218.59.194.82:13080/crdata/lyls/tiles/tileset.json',
 | 
	
		
			
				|  |  | +	// 			'http://218.59.194.82:13080/crdata/lyls/3Dtiles/tileset.json'
 | 
	
		
			
				|  |  | +	// 		]
 | 
	
		
			
				|  |  | +	// 	}
 | 
	
		
			
				|  |  | +	// });
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +	//http://10.88.77.134/lyls/3Dtiles/tileset.json
 | 
	
		
			
				|  |  | +	// 'http://218.59.194.82:13080/crdata/sdly/crtiles/tileset.json',
 | 
	
		
			
				|  |  | +	// 'http://218.59.194.82:13080/crdata/lyls/tiles/tileset.json',
 | 
	
		
			
				|  |  | +	// 'http://218.59.194.82:13080/crdata/lyls/3Dtiles/tileset.json'
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +	/* 添加影像图 */
 | 
	
		
			
				|  |  | +	// proxy.CMapApi.addLayer({
 | 
	
		
			
				|  |  | +	// 	layId: 'yxt',
 | 
	
		
			
				|  |  | +	// 	layName: '影像图',
 | 
	
		
			
				|  |  | +	// 	layType: CrMap.LayerType.wmtsLayer,
 | 
	
		
			
				|  |  | +	// 	isShow: true,
 | 
	
		
			
				|  |  | +	// 	config: {
 | 
	
		
			
				|  |  | +	// 		url: 'http://218.59.194.74:6080/arcgis/rest/services/LYLSQ_YX_102100_202112/MapServer/WMTS'
 | 
	
		
			
				|  |  | +	// 	}
 | 
	
		
			
				|  |  | +	// });
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +	/* 添加模版影像地图 */
 | 
	
		
			
				|  |  | +	proxy.CMapApi.addLayer({
 | 
	
		
			
				|  |  | +		layId: 'mpYxt',
 | 
	
		
			
				|  |  | +		layName: '牟平影像图',
 | 
	
		
			
				|  |  | +		layType: CrMap.LayerType.templateLayer,
 | 
	
		
			
				|  |  | +		isShow: true,
 | 
	
		
			
				|  |  | +		config: {
 | 
	
		
			
				|  |  | +			url: 'http://202.102.167.52:16282/geoserver/gwc/service/tms/1.0.0/ytmp%3Atdt@EPSG%3A900913@png/{z}/{x}/{reverseY}.png',
 | 
	
		
			
				|  |  | +			minimumLevel: 0,
 | 
	
		
			
				|  |  | +			maximumLevel: 18
 | 
	
		
			
				|  |  | +		}
 | 
	
		
			
				|  |  | +	});
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +	/* 进入中国位置 */
 | 
	
		
			
				|  |  | +	proxy.CMapApi.setMapRange({
 | 
	
		
			
				|  |  | +		lng: 103.84, //经度
 | 
	
		
			
				|  |  | +		lat: 31.15, // 维度
 | 
	
		
			
				|  |  | +		alt: 24000000, // 高度
 | 
	
		
			
				|  |  | +		heading: 0, //偏航
 | 
	
		
			
				|  |  | +		pitch: -90, //俯仰,人如果在赤道上空,俯仰角为0可见地球。如果在北纬,俯仰角为负才能见地球
 | 
	
		
			
				|  |  | +		roll: 0.0 //翻滚
 | 
	
		
			
				|  |  | +	});
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +	/* 飞行到指定位置 */
 | 
	
		
			
				|  |  | +	proxy.CMapApi.flyToRectangle({
 | 
	
		
			
				|  |  | +		// strLng: 118.22087954757484,
 | 
	
		
			
				|  |  | +		// strLat: 35.14124100849915,
 | 
	
		
			
				|  |  | +		// endLng: 118.22865486061352,
 | 
	
		
			
				|  |  | +		// endLat: 35.14589687229257,
 | 
	
		
			
				|  |  | +		strLng: 118.05,
 | 
	
		
			
				|  |  | +		strLat: 34.953,
 | 
	
		
			
				|  |  | +		endLng: 118.53,
 | 
	
		
			
				|  |  | +		endLat: 35.434,
 | 
	
		
			
				|  |  | +		success: function() {
 | 
	
		
			
				|  |  | +			/* 设置地形*/
 | 
	
		
			
				|  |  | +			_self.CMapApi.setTerrain({
 | 
	
		
			
				|  |  | +				// url: 'http://218.59.194.82:13080/crdata/shandong/dem'
 | 
	
		
			
				|  |  | +				// url: 'http://202.102.167.52:16381/crdata/dem'
 | 
	
		
			
				|  |  | +				// url: 'https://www.supermapol.com/realspace/services/3D-stk_terrain/rest/realspace/datas/info/data/path'
 | 
	
		
			
				|  |  | +				url: 'http://218.59.194.82:13480/sddem/dem/'
 | 
	
		
			
				|  |  | +			});
 | 
	
		
			
				|  |  | +			/* 初始化显示图层 */
 | 
	
		
			
				|  |  | +			_self.CMapApi.showInit();
 | 
	
		
			
				|  |  | +		}
 | 
	
		
			
				|  |  | +	});
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +	/* 查询ArcGIS服务试试 */
 | 
	
		
			
				|  |  | +	proxy.CMapApi.queryAGServerExtent(
 | 
	
		
			
				|  |  | +		'http://218.59.194.82:6080/arcgis/rest/services/LSQZRZY_RE_WEB_V1/MapServer',
 | 
	
		
			
				|  |  | +		'0',
 | 
	
		
			
				|  |  | +		function(res) {
 | 
	
		
			
				|  |  | +			console.log(JSON.stringify(res));
 | 
	
		
			
				|  |  | +		},
 | 
	
		
			
				|  |  | +		function(err) {
 | 
	
		
			
				|  |  | +			console.log('查询范围错误', err);
 | 
	
		
			
				|  |  | +		}
 | 
	
		
			
				|  |  | +	);
 | 
	
		
			
				|  |  | +});
 | 
	
		
			
				|  |  | +</script>
 | 
	
		
			
				|  |  | +<style>
 | 
	
		
			
				|  |  | +.jt-map {
 | 
	
		
			
				|  |  | +	position: relative;
 | 
	
		
			
				|  |  | +	top: 0px;
 | 
	
		
			
				|  |  | +	width: 100%;
 | 
	
		
			
				|  |  | +	height: 100%;
 | 
	
		
			
				|  |  | +	margin: 0;
 | 
	
		
			
				|  |  | +	padding: 0;
 | 
	
		
			
				|  |  | +	overflow: hidden;
 | 
	
		
			
				|  |  | +	background-color: blue;
 | 
	
		
			
				|  |  | +}
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +.cesium-performanceDisplay-defaultContainer {
 | 
	
		
			
				|  |  | +	top: unset !important;
 | 
	
		
			
				|  |  | +	bottom: 100px !important;
 | 
	
		
			
				|  |  | +	right: 10px !important;
 | 
	
		
			
				|  |  | +}
 | 
	
		
			
				|  |  |  </style>
 |