|
@@ -431,7 +431,7 @@ export default {
|
|
|
Cesium.ScreenSpaceEventType.LEFT_DOUBLE_CLICK
|
|
Cesium.ScreenSpaceEventType.LEFT_DOUBLE_CLICK
|
|
|
);
|
|
);
|
|
|
// 设置相机离地表的最小距离(单位:米)
|
|
// 设置相机离地表的最小距离(单位:米)
|
|
|
- viewer.scene.screenSpaceCameraController.minimumZoomDistance = 10000;
|
|
|
|
|
|
|
+ // viewer.scene.screenSpaceCameraController.minimumZoomDistance = 10000;
|
|
|
|
|
|
|
|
const handler = new Cesium.ScreenSpaceEventHandler(viewer.scene.canvas);
|
|
const handler = new Cesium.ScreenSpaceEventHandler(viewer.scene.canvas);
|
|
|
handler.setInputAction(function(movement) {
|
|
handler.setInputAction(function(movement) {
|
|
@@ -453,7 +453,7 @@ export default {
|
|
|
this.viewer = viewer;
|
|
this.viewer = viewer;
|
|
|
|
|
|
|
|
// this.setMapImageryProvider();
|
|
// this.setMapImageryProvider();
|
|
|
- // this.initCesiumTerrain();
|
|
|
|
|
|
|
+ // this.initCesiumTerrain();
|
|
|
this.initCesiumBaseMapImage();
|
|
this.initCesiumBaseMapImage();
|
|
|
// this.switchWindLayer();
|
|
// this.switchWindLayer();
|
|
|
this.showAllStation(viewer, allStationJson.station);
|
|
this.showAllStation(viewer, allStationJson.station);
|
|
@@ -464,7 +464,8 @@ export default {
|
|
|
async initCesiumTerrain() {
|
|
async initCesiumTerrain() {
|
|
|
const terrainProvider = await Cesium.CesiumTerrainProvider.fromUrl(
|
|
const terrainProvider = await Cesium.CesiumTerrainProvider.fromUrl(
|
|
|
// "http://localhost:3007/tiles/dixing",
|
|
// "http://localhost:3007/tiles/dixing",
|
|
|
- "/static/dixing",
|
|
|
|
|
|
|
+ // "/static/dixing",
|
|
|
|
|
+ "/static/dixing/wlcb",
|
|
|
{
|
|
{
|
|
|
requestWaterMask: true, // 如果需要水效果,设置为true
|
|
requestWaterMask: true, // 如果需要水效果,设置为true
|
|
|
requestVertexNormals: true, // 如果需要光照效果,设置为true
|
|
requestVertexNormals: true, // 如果需要光照效果,设置为true
|
|
@@ -504,9 +505,9 @@ export default {
|
|
|
// 初始化底图
|
|
// 初始化底图
|
|
|
async initCesiumBaseMapImage() {
|
|
async initCesiumBaseMapImage() {
|
|
|
const imageryProvider = await new Cesium.UrlTemplateImageryProvider({
|
|
const imageryProvider = await new Cesium.UrlTemplateImageryProvider({
|
|
|
- url: "https://webst02.is.autonavi.com/appmaptile?style=6&x={x}&y={y}&z={z}",
|
|
|
|
|
|
|
+ // url: "https://webst02.is.autonavi.com/appmaptile?style=6&x={x}&y={y}&z={z}",
|
|
|
// url: "http://localhost:3007/tiles/map/{z}/{x}/{y}",
|
|
// url: "http://localhost:3007/tiles/map/{z}/{x}/{y}",
|
|
|
- // url: "/static/ditu/{z}/{x}/{y}.png",
|
|
|
|
|
|
|
+ url: "/static/ditu/{z}/{x}/{y}.png",
|
|
|
credit: "影像地图",
|
|
credit: "影像地图",
|
|
|
// minimumLevel: 10,
|
|
// minimumLevel: 10,
|
|
|
maximumLevel: 18,
|
|
maximumLevel: 18,
|