|
@@ -172,23 +172,23 @@ export default {
|
|
|
// let shuixi_name_url = that.superMapRootUrl+'/3D-shuixi_Name/rest/realspace';
|
|
|
// that.shuixi_name = that.scene.open(shuixi_name_url);
|
|
|
|
|
|
- //9.添加乡镇界
|
|
|
- let layer_xiangzhenjie = that.viewer.imageryLayers.addImageryProvider(new Cesium.SuperMapImageryProvider({
|
|
|
- url : that.superMapRootUrl+"/map-SIPING/rest/maps/XiangZhenJie",
|
|
|
- }));
|
|
|
-
|
|
|
- //10.添加县界
|
|
|
+ //9.添加县界和乡镇界
|
|
|
let layer_xianjie = that.viewer.imageryLayers.addImageryProvider(new Cesium.SuperMapImageryProvider({
|
|
|
- url : that.superMapRootUrl+"/map-SIPING/rest/maps/XianJie",
|
|
|
+ url : that.superMapRootUrl+"/map-SIPING/rest/maps/XianJie_XiangZhenJie",
|
|
|
}));
|
|
|
|
|
|
- //11.添加县界名称 此处要先添加县界名称 否则县界名会不显示
|
|
|
- let layer_xianjie_name = that.superMapRootUrl+'/3D-XianJie_Name/rest/realspace';
|
|
|
- that.scene.open(layer_xianjie_name);
|
|
|
-
|
|
|
- //12.添加乡镇界名称
|
|
|
- let layer_xiangzhenjie_name = that.superMapRootUrl+'/3D-XiangZhenJie_Name/rest/realspace';
|
|
|
+ //10.添加区县乡镇村名称
|
|
|
+ let layer_xiangzhenjie_name = that.superMapRootUrl+'/3D-Name_he/rest/realspace';
|
|
|
that.scene.open(layer_xiangzhenjie_name);
|
|
|
+ that.road_name.then(function (layers) {
|
|
|
+ let xianJie_textLayer = that.scene.layers.find('XianJie@SiPing#1');//区县文字图层
|
|
|
+ let xiangZhenJie_textLayer = that.scene.layers.find('XiangZhenJie@SiPing#2');//乡镇文字图层
|
|
|
+ let cun_textLayer = that.scene.layers.find('Cun@SiPing#1');//村文字图层
|
|
|
+ //关闭避让
|
|
|
+ xianJie_textLayer.isOverlapDisplayed = true;
|
|
|
+ xiangZhenJie_textLayer.isOverlapDisplayed = true;
|
|
|
+ cun_textLayer.isOverlapDisplayed = true;
|
|
|
+ });
|
|
|
|
|
|
}, 3000);
|
|
|
|
|
@@ -227,6 +227,85 @@ export default {
|
|
|
that.createRightClickDescription();
|
|
|
},
|
|
|
/**
|
|
|
+ * 地图落点
|
|
|
+ */
|
|
|
+ setMarkers(makerList){
|
|
|
+ let that = this;
|
|
|
+ that.handler = new Cesium.ScreenSpaceEventHandler(this.viewer.scene.canvas);
|
|
|
+ clearInterval(that.aac);
|
|
|
+ for (let i in makerList) {
|
|
|
+ let longitude = makerList[i].lng;
|
|
|
+ let latitude = makerList[i].lat;
|
|
|
+ that.viewer.entities.add({
|
|
|
+ name:"",
|
|
|
+ position: Cesium.Cartesian3.fromDegrees(longitude, latitude),
|
|
|
+ billboard: {
|
|
|
+ image: iconList[makerList[i].icon],
|
|
|
+ width: 48,
|
|
|
+ height: 48,
|
|
|
+ heightReference: Cesium.HeightReference.CLAMP_TO_GROUND,
|
|
|
+ disableDepthTestDistance:Number.POSITIVE_INFINITY
|
|
|
+ },
|
|
|
+ description: makerList[i].bindPopupHtml,
|
|
|
+ click: makerList[i].click,
|
|
|
+ parameter: makerList[i].parameter,
|
|
|
+ });
|
|
|
+ }
|
|
|
+ // const carmodel = [];
|
|
|
+ // carmodel[0] = that.viewer.entities.add({
|
|
|
+ // name:"",
|
|
|
+ // position: Cesium.Cartesian3.fromDegrees(makerList[0].lng, makerList[0].lat),
|
|
|
+ // billboard: {
|
|
|
+ // image: iconList[makerList[0].icon],
|
|
|
+ // width: 48,
|
|
|
+ // height: 48,
|
|
|
+ // heightReference: Cesium.HeightReference.CLAMP_TO_GROUND,
|
|
|
+ // disableDepthTestDistance:Number.POSITIVE_INFINITY
|
|
|
+ // },
|
|
|
+ // description: makerList[0].bindPopupHtml,
|
|
|
+ // click: makerList[0].click,
|
|
|
+ // parameter: makerList[0].parameter,
|
|
|
+ // });
|
|
|
+ // carmodel[0].ellipse = {
|
|
|
+ // semiMinorAxis: makerList[0].radius
|
|
|
+ // semiMajorAxis: makerList[0].radius
|
|
|
+ // height: 0.0,
|
|
|
+ // material: Cesium.Color.RED.withAlpha(e),
|
|
|
+ // outline: true,
|
|
|
+ // outlineColor: Cesium.Color.BLUE.withAlpha(0.5),
|
|
|
+ // outlineWidth: 2,
|
|
|
+ // heightReference: Cesium.HeightReference.CLAMP_TO_GROUND,
|
|
|
+ // }
|
|
|
+ // carmodel[1] = that.viewer.entities.add({
|
|
|
+ // name:"",
|
|
|
+ // position: Cesium.Cartesian3.fromDegrees(makerList[1].lng, makerList[1].lat),
|
|
|
+ // billboard: {
|
|
|
+ // image: iconList[makerList[1].icon],
|
|
|
+ // width: 48,
|
|
|
+ // height: 48,
|
|
|
+ // heightReference: Cesium.HeightReference.CLAMP_TO_GROUND,
|
|
|
+ // disableDepthTestDistance:Number.POSITIVE_INFINITY
|
|
|
+ // },
|
|
|
+ // description: makerList[1].bindPopupHtml,
|
|
|
+ // click: makerList[1].click,
|
|
|
+ // parameter: makerList[1].parameter,
|
|
|
+ // });
|
|
|
+ // carmodel[0].ellipse = {
|
|
|
+ // semiMinorAxis: makerList[0].radius
|
|
|
+ // semiMajorAxis: makerList[0].radius
|
|
|
+ // height: 0.0,
|
|
|
+ // material: Cesium.Color.RED.withAlpha(e),
|
|
|
+ // outline: true,
|
|
|
+ // outlineColor: Cesium.Color.BLUE.withAlpha(0.5),
|
|
|
+ // outlineWidth: 2,
|
|
|
+ // heightReference: Cesium.HeightReference.CLAMP_TO_GROUND,
|
|
|
+ // }
|
|
|
+
|
|
|
+ that.viewer.scene.globe.depthTestAgainstTerrain=false;
|
|
|
+ that.createLeftClickDescription();
|
|
|
+ that.createRightClickDescription();
|
|
|
+ },
|
|
|
+ /**
|
|
|
*鼠标左击事件是原来的气泡
|
|
|
*/
|
|
|
createLeftClickDescription() {
|