调整为2D模式
This commit is contained in:
parent
3aeab25aab
commit
c47b9ffbea
|
|
@ -19,8 +19,8 @@ const mapConfig = {
|
||||||
// heading: 359.2,
|
// heading: 359.2,
|
||||||
// pitch: -39.5,
|
// pitch: -39.5,
|
||||||
alt: 12000, // 高度≈缩放级别
|
alt: 12000, // 高度≈缩放级别
|
||||||
heading: 30, // 旋转30度
|
// heading: 30, // 旋转30度
|
||||||
pitch: -45, // 俯视角45度
|
// pitch: -45, // 俯视角45度
|
||||||
},
|
},
|
||||||
|
|
||||||
highDynamicRange: false, // 关闭HDR(可减少模糊)
|
highDynamicRange: false, // 关闭HDR(可减少模糊)
|
||||||
|
|
@ -28,7 +28,7 @@ const mapConfig = {
|
||||||
scene3DOnly: false,
|
scene3DOnly: false,
|
||||||
shadows: false,
|
shadows: false,
|
||||||
removeDblClick: true,
|
removeDblClick: true,
|
||||||
sceneMode: 3,
|
sceneMode: 1,
|
||||||
showSun: true,
|
showSun: true,
|
||||||
showMoon: true,
|
showMoon: true,
|
||||||
showSkyBox: true,
|
showSkyBox: true,
|
||||||
|
|
@ -85,7 +85,7 @@ const mapConfig = {
|
||||||
},
|
},
|
||||||
terrain: {
|
terrain: {
|
||||||
url: "//data.mars3d.cn/terrain",
|
url: "//data.mars3d.cn/terrain",
|
||||||
show: true,
|
show: false,
|
||||||
},
|
},
|
||||||
basemaps: [
|
basemaps: [
|
||||||
{ id: 10, name: "地图底图", type: "group" },
|
{ id: 10, name: "地图底图", type: "group" },
|
||||||
|
|
@ -456,7 +456,7 @@ function addMarker(lng, lat) {
|
||||||
markerCount++;
|
markerCount++;
|
||||||
|
|
||||||
const billboard = new mars3d.graphic.BillboardEntity({
|
const billboard = new mars3d.graphic.BillboardEntity({
|
||||||
position: [lng, lat, 1000],
|
position: [lng, lat],
|
||||||
style: {
|
style: {
|
||||||
image: "../../../../img/digitalSignage/gl.png",
|
image: "../../../../img/digitalSignage/gl.png",
|
||||||
width: 30,
|
width: 30,
|
||||||
|
|
@ -464,9 +464,12 @@ function addMarker(lng, lat) {
|
||||||
scale: 1,
|
scale: 1,
|
||||||
horizontalOrigin: Cesium.HorizontalOrigin.CENTER,
|
horizontalOrigin: Cesium.HorizontalOrigin.CENTER,
|
||||||
verticalOrigin: Cesium.VerticalOrigin.BOTTOM,
|
verticalOrigin: Cesium.VerticalOrigin.BOTTOM,
|
||||||
clampToGround: true,
|
// clampToGround: true,
|
||||||
heightReference: Cesium.HeightReference.CLAMP_TO_GROUND, // 必须设置
|
// heightReference: Cesium.HeightReference.CLAMP_TO_GROUND, // 必须设置
|
||||||
disableDepthTestDistance: Number.POSITIVE_INFINITY, // 防止被地形遮挡
|
// disableDepthTestDistance: Number.POSITIVE_INFINITY, // 防止被地形遮挡
|
||||||
|
clampToGround: false,
|
||||||
|
heightReference: Cesium.HeightReference.NONE,
|
||||||
|
disableDepthTestDistance: Number.POSITIVE_INFINITY,
|
||||||
},
|
},
|
||||||
// 其他属性
|
// 其他属性
|
||||||
attr: {
|
attr: {
|
||||||
|
|
@ -483,7 +486,9 @@ function addMarker(lng, lat) {
|
||||||
verticalOrigin: Cesium.VerticalOrigin.TOP,
|
verticalOrigin: Cesium.VerticalOrigin.TOP,
|
||||||
scaleByDistance: true,
|
scaleByDistance: true,
|
||||||
offsetY: -60,
|
offsetY: -60,
|
||||||
heightReference: Cesium.HeightReference.CLAMP_TO_GROUND,
|
// heightReference: Cesium.HeightReference.CLAMP_TO_GROUND,
|
||||||
|
// disableDepthTestDistance: Number.POSITIVE_INFINITY,
|
||||||
|
heightReference: Cesium.HeightReference.NONE,
|
||||||
disableDepthTestDistance: Number.POSITIVE_INFINITY,
|
disableDepthTestDistance: Number.POSITIVE_INFINITY,
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
@ -571,7 +576,7 @@ function initTowerLine(points) {
|
||||||
// }, 100);
|
// }, 100);
|
||||||
points.forEach((item, index) => {
|
points.forEach((item, index) => {
|
||||||
const billboard = new mars3d.graphic.BillboardEntity({
|
const billboard = new mars3d.graphic.BillboardEntity({
|
||||||
position: [item.lon, item.lat, 1000],
|
position: [item.lon, item.lat],
|
||||||
style: {
|
style: {
|
||||||
image: "../../../../img/digitalSignage/icon_three_new.png",
|
image: "../../../../img/digitalSignage/icon_three_new.png",
|
||||||
width: 30,
|
width: 30,
|
||||||
|
|
@ -579,9 +584,12 @@ function initTowerLine(points) {
|
||||||
scale: 1,
|
scale: 1,
|
||||||
horizontalOrigin: Cesium.HorizontalOrigin.CENTER,
|
horizontalOrigin: Cesium.HorizontalOrigin.CENTER,
|
||||||
verticalOrigin: Cesium.VerticalOrigin.BOTTOM,
|
verticalOrigin: Cesium.VerticalOrigin.BOTTOM,
|
||||||
clampToGround: true,
|
// clampToGround: true,
|
||||||
heightReference: Cesium.HeightReference.CLAMP_TO_GROUND, // 必须设置
|
// heightReference: Cesium.HeightReference.CLAMP_TO_GROUND, // 必须设置
|
||||||
disableDepthTestDistance: Number.POSITIVE_INFINITY, // 防止被地形遮挡
|
// disableDepthTestDistance: Number.POSITIVE_INFINITY, // 防止被地形遮挡
|
||||||
|
clampToGround: false,
|
||||||
|
heightReference: Cesium.HeightReference.NONE,
|
||||||
|
disableDepthTestDistance: Number.POSITIVE_INFINITY,
|
||||||
},
|
},
|
||||||
// 其他属性
|
// 其他属性
|
||||||
attr: {
|
attr: {
|
||||||
|
|
@ -598,7 +606,9 @@ function initTowerLine(points) {
|
||||||
verticalOrigin: Cesium.VerticalOrigin.TOP,
|
verticalOrigin: Cesium.VerticalOrigin.TOP,
|
||||||
scaleByDistance: true,
|
scaleByDistance: true,
|
||||||
offsetY: -60,
|
offsetY: -60,
|
||||||
heightReference: Cesium.HeightReference.CLAMP_TO_GROUND,
|
// heightReference: Cesium.HeightReference.CLAMP_TO_GROUND,
|
||||||
|
// disableDepthTestDistance: Number.POSITIVE_INFINITY,
|
||||||
|
heightReference: Cesium.HeightReference.NONE,
|
||||||
disableDepthTestDistance: Number.POSITIVE_INFINITY,
|
disableDepthTestDistance: Number.POSITIVE_INFINITY,
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
@ -627,7 +637,10 @@ function initTowerLine(points) {
|
||||||
style: {
|
style: {
|
||||||
width: 2, // 线宽(像素)
|
width: 2, // 线宽(像素)
|
||||||
color: "#FF0305", // 线颜色
|
color: "#FF0305", // 线颜色
|
||||||
clampToGround: true, // 是否贴地(山区建议设为true)
|
// clampToGround: true, // 是否贴地(山区建议设为true)
|
||||||
|
clampToGround: false,
|
||||||
|
heightReference: Cesium.HeightReference.NONE,
|
||||||
|
disableDepthTestDistance: Number.POSITIVE_INFINITY,
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
graphicLayer.addGraphic(polyline);
|
graphicLayer.addGraphic(polyline);
|
||||||
|
|
@ -702,7 +715,10 @@ function viewPointLine() {
|
||||||
style: {
|
style: {
|
||||||
width: 2, // 线宽(像素)
|
width: 2, // 线宽(像素)
|
||||||
color: "#0C14CA", // 线颜色
|
color: "#0C14CA", // 线颜色
|
||||||
clampToGround: true, // 是否贴地(山区建议设为true)
|
// clampToGround: true, // 是否贴地(山区建议设为true)
|
||||||
|
clampToGround: false,
|
||||||
|
heightReference: Cesium.HeightReference.NONE,
|
||||||
|
disableDepthTestDistance: Number.POSITIVE_INFINITY,
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
graphicLayer.addGraphic(polyline);
|
graphicLayer.addGraphic(polyline);
|
||||||
|
|
|
||||||
|
|
@ -21,8 +21,8 @@ const mapConfig = {
|
||||||
// heading: 359.2,
|
// heading: 359.2,
|
||||||
// pitch: -39.5,
|
// pitch: -39.5,
|
||||||
alt: 12000, // 高度≈缩放级别
|
alt: 12000, // 高度≈缩放级别
|
||||||
heading: 30, // 旋转30度
|
// heading: 30, // 旋转30度
|
||||||
pitch: -45, // 俯视角45度
|
// pitch: -45, // 俯视角45度
|
||||||
},
|
},
|
||||||
|
|
||||||
highDynamicRange: false, // 关闭HDR(可减少模糊)
|
highDynamicRange: false, // 关闭HDR(可减少模糊)
|
||||||
|
|
@ -30,17 +30,23 @@ const mapConfig = {
|
||||||
scene3DOnly: false,
|
scene3DOnly: false,
|
||||||
shadows: false,
|
shadows: false,
|
||||||
removeDblClick: true,
|
removeDblClick: true,
|
||||||
sceneMode: 3,
|
sceneMode: 1,
|
||||||
showSun: true,
|
showSun: true,
|
||||||
showMoon: true,
|
showMoon: true,
|
||||||
showSkyBox: true,
|
showSkyBox: true,
|
||||||
showSkyAtmosphere: true,
|
showSkyAtmosphere: true,
|
||||||
|
|
||||||
|
// showSun: false, // 2D模式下可关闭
|
||||||
|
// showMoon: false, // 2D模式下可关闭
|
||||||
|
// showSkyBox: false, // 2D模式下可关闭
|
||||||
|
// fog: false, // 2D模式下可关闭
|
||||||
fog: true,
|
fog: true,
|
||||||
fxaa: false,
|
fxaa: false,
|
||||||
requestRenderMode: false,
|
requestRenderMode: false,
|
||||||
globe: {
|
globe: {
|
||||||
depthTestAgainstTerrain: false,
|
depthTestAgainstTerrain: false,
|
||||||
baseColor: "#546a53",
|
baseColor: "#546a53",
|
||||||
|
// showGroundAtmosphere: true,
|
||||||
showGroundAtmosphere: true,
|
showGroundAtmosphere: true,
|
||||||
enableLighting: false,
|
enableLighting: false,
|
||||||
},
|
},
|
||||||
|
|
@ -87,7 +93,7 @@ const mapConfig = {
|
||||||
},
|
},
|
||||||
terrain: {
|
terrain: {
|
||||||
url: "//data.mars3d.cn/terrain",
|
url: "//data.mars3d.cn/terrain",
|
||||||
show: true,
|
show: false,
|
||||||
},
|
},
|
||||||
basemaps: [
|
basemaps: [
|
||||||
{ id: 10, name: "地图底图", type: "group" },
|
{ id: 10, name: "地图底图", type: "group" },
|
||||||
|
|
@ -385,8 +391,8 @@ function initMap(list) {
|
||||||
map.flyToPoint(centerPoint, {
|
map.flyToPoint(centerPoint, {
|
||||||
radius: 5000, // 可视范围半径(米)
|
radius: 5000, // 可视范围半径(米)
|
||||||
duration: 5, // 飞行时间(秒)
|
duration: 5, // 飞行时间(秒)
|
||||||
heading: 0, // 视角方向(0-360度)
|
// heading: 0, // 视角方向(0-360度)s
|
||||||
pitch: -45, // 俯仰角度(-90俯视,0平视,90仰视)
|
// pitch: -45, // 俯仰角度(-90俯视,0平视,90仰视)ss
|
||||||
});
|
});
|
||||||
|
|
||||||
map.addLayer(graphicLayer);
|
map.addLayer(graphicLayer);
|
||||||
|
|
@ -460,7 +466,7 @@ function addMarker(lng, lat) {
|
||||||
markerCount++;
|
markerCount++;
|
||||||
|
|
||||||
const billboard = new mars3d.graphic.BillboardEntity({
|
const billboard = new mars3d.graphic.BillboardEntity({
|
||||||
position: [lng, lat, 1000],
|
position: [lng, lat],
|
||||||
style: {
|
style: {
|
||||||
image: "../../../../img/digitalSignage/sd.png",
|
image: "../../../../img/digitalSignage/sd.png",
|
||||||
width: 30,
|
width: 30,
|
||||||
|
|
@ -576,7 +582,7 @@ function initTowerLine(points) {
|
||||||
|
|
||||||
points.forEach((item, index) => {
|
points.forEach((item, index) => {
|
||||||
const billboard = new mars3d.graphic.BillboardEntity({
|
const billboard = new mars3d.graphic.BillboardEntity({
|
||||||
position: [item.lon, item.lat, 1000],
|
position: [item.lon, item.lat],
|
||||||
style: {
|
style: {
|
||||||
image: "../../../../img/digitalSignage/icon_three_new.png",
|
image: "../../../../img/digitalSignage/icon_three_new.png",
|
||||||
width: 30,
|
width: 30,
|
||||||
|
|
@ -584,9 +590,13 @@ function initTowerLine(points) {
|
||||||
scale: 1,
|
scale: 1,
|
||||||
horizontalOrigin: Cesium.HorizontalOrigin.CENTER,
|
horizontalOrigin: Cesium.HorizontalOrigin.CENTER,
|
||||||
verticalOrigin: Cesium.VerticalOrigin.BOTTOM,
|
verticalOrigin: Cesium.VerticalOrigin.BOTTOM,
|
||||||
clampToGround: true,
|
// clampToGround: true,
|
||||||
heightReference: Cesium.HeightReference.CLAMP_TO_GROUND, // 必须设置
|
// heightReference: Cesium.HeightReference.CLAMP_TO_GROUND, // 必须设置
|
||||||
disableDepthTestDistance: Number.POSITIVE_INFINITY, // 防止被地形遮挡
|
// disableDepthTestDistance: Number.POSITIVE_INFINITY, // 防止被地形遮挡
|
||||||
|
|
||||||
|
clampToGround: false,
|
||||||
|
heightReference: Cesium.HeightReference.NONE,
|
||||||
|
disableDepthTestDistance: Number.POSITIVE_INFINITY,
|
||||||
},
|
},
|
||||||
// 其他属性
|
// 其他属性
|
||||||
attr: {
|
attr: {
|
||||||
|
|
@ -603,7 +613,9 @@ function initTowerLine(points) {
|
||||||
verticalOrigin: Cesium.VerticalOrigin.TOP,
|
verticalOrigin: Cesium.VerticalOrigin.TOP,
|
||||||
scaleByDistance: true,
|
scaleByDistance: true,
|
||||||
offsetY: -60,
|
offsetY: -60,
|
||||||
heightReference: Cesium.HeightReference.CLAMP_TO_GROUND,
|
// heightReference: Cesium.HeightReference.CLAMP_TO_GROUND,
|
||||||
|
// disableDepthTestDistance: Number.POSITIVE_INFINITY,
|
||||||
|
heightReference: Cesium.HeightReference.NONE,
|
||||||
disableDepthTestDistance: Number.POSITIVE_INFINITY,
|
disableDepthTestDistance: Number.POSITIVE_INFINITY,
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
@ -706,7 +718,10 @@ function viewPointLine() {
|
||||||
style: {
|
style: {
|
||||||
width: 2, // 线宽(像素)
|
width: 2, // 线宽(像素)
|
||||||
color: "#0C14CA", // 线颜色
|
color: "#0C14CA", // 线颜色
|
||||||
clampToGround: true, // 是否贴地(山区建议设为true)
|
// clampToGround: true, // 是否贴地(山区建议设为true)
|
||||||
|
clampToGround: false,
|
||||||
|
// 可选:设置高度模式为2D兼容模式
|
||||||
|
heightReference: Cesium.HeightReference.NONE,
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
graphicLayer.addGraphic(polyline);
|
graphicLayer.addGraphic(polyline);
|
||||||
|
|
|
||||||
|
|
@ -19,8 +19,8 @@ const mapConfig = {
|
||||||
// heading: 359.2,
|
// heading: 359.2,
|
||||||
// pitch: -39.5,
|
// pitch: -39.5,
|
||||||
alt: 12000, // 高度≈缩放级别
|
alt: 12000, // 高度≈缩放级别
|
||||||
heading: 30, // 旋转30度
|
// heading: 30, // 旋转30度
|
||||||
pitch: -45, // 俯视角45度
|
// pitch: -45, // 俯视角45度
|
||||||
},
|
},
|
||||||
|
|
||||||
highDynamicRange: false, // 关闭HDR(可减少模糊)
|
highDynamicRange: false, // 关闭HDR(可减少模糊)
|
||||||
|
|
@ -28,7 +28,7 @@ const mapConfig = {
|
||||||
scene3DOnly: false,
|
scene3DOnly: false,
|
||||||
shadows: false,
|
shadows: false,
|
||||||
removeDblClick: true,
|
removeDblClick: true,
|
||||||
sceneMode: 3,
|
sceneMode: 1,
|
||||||
showSun: true,
|
showSun: true,
|
||||||
showMoon: true,
|
showMoon: true,
|
||||||
showSkyBox: true,
|
showSkyBox: true,
|
||||||
|
|
@ -85,7 +85,7 @@ const mapConfig = {
|
||||||
},
|
},
|
||||||
terrain: {
|
terrain: {
|
||||||
url: "//data.mars3d.cn/terrain",
|
url: "//data.mars3d.cn/terrain",
|
||||||
show: true,
|
show: false,
|
||||||
},
|
},
|
||||||
basemaps: [
|
basemaps: [
|
||||||
{ id: 10, name: "地图底图", type: "group" },
|
{ id: 10, name: "地图底图", type: "group" },
|
||||||
|
|
@ -458,9 +458,12 @@ function addMarker(lng, lat) {
|
||||||
scale: 1,
|
scale: 1,
|
||||||
horizontalOrigin: Cesium.HorizontalOrigin.CENTER,
|
horizontalOrigin: Cesium.HorizontalOrigin.CENTER,
|
||||||
verticalOrigin: Cesium.VerticalOrigin.BOTTOM,
|
verticalOrigin: Cesium.VerticalOrigin.BOTTOM,
|
||||||
clampToGround: true,
|
// clampToGround: true,
|
||||||
heightReference: Cesium.HeightReference.CLAMP_TO_GROUND, // 必须设置
|
// heightReference: Cesium.HeightReference.CLAMP_TO_GROUND, // 必须设置
|
||||||
disableDepthTestDistance: Number.POSITIVE_INFINITY, // 防止被地形遮挡
|
// disableDepthTestDistance: Number.POSITIVE_INFINITY, // 防止被地形遮挡
|
||||||
|
clampToGround: false,
|
||||||
|
heightReference: Cesium.HeightReference.NONE,
|
||||||
|
disableDepthTestDistance: Number.POSITIVE_INFINITY,
|
||||||
},
|
},
|
||||||
// 其他属性
|
// 其他属性
|
||||||
attr: {
|
attr: {
|
||||||
|
|
@ -477,7 +480,8 @@ function addMarker(lng, lat) {
|
||||||
verticalOrigin: Cesium.VerticalOrigin.TOP,
|
verticalOrigin: Cesium.VerticalOrigin.TOP,
|
||||||
scaleByDistance: true,
|
scaleByDistance: true,
|
||||||
offsetY: -60,
|
offsetY: -60,
|
||||||
heightReference: Cesium.HeightReference.CLAMP_TO_GROUND,
|
// heightReference: Cesium.HeightReference.CLAMP_TO_GROUND,
|
||||||
|
heightReference: Cesium.HeightReference.NONE,
|
||||||
disableDepthTestDistance: Number.POSITIVE_INFINITY,
|
disableDepthTestDistance: Number.POSITIVE_INFINITY,
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
@ -566,7 +570,7 @@ function initTowerLine(points) {
|
||||||
|
|
||||||
points.forEach((item, index) => {
|
points.forEach((item, index) => {
|
||||||
const billboard = new mars3d.graphic.BillboardEntity({
|
const billboard = new mars3d.graphic.BillboardEntity({
|
||||||
position: [item.lon, item.lat, 1000],
|
position: [item.lon, item.lat],
|
||||||
style: {
|
style: {
|
||||||
image: "../../../../img/digitalSignage/icon_three_new.png",
|
image: "../../../../img/digitalSignage/icon_three_new.png",
|
||||||
width: 30,
|
width: 30,
|
||||||
|
|
@ -574,9 +578,12 @@ function initTowerLine(points) {
|
||||||
scale: 1,
|
scale: 1,
|
||||||
horizontalOrigin: Cesium.HorizontalOrigin.CENTER,
|
horizontalOrigin: Cesium.HorizontalOrigin.CENTER,
|
||||||
verticalOrigin: Cesium.VerticalOrigin.BOTTOM,
|
verticalOrigin: Cesium.VerticalOrigin.BOTTOM,
|
||||||
clampToGround: true,
|
// clampToGround: true,
|
||||||
heightReference: Cesium.HeightReference.CLAMP_TO_GROUND, // 必须设置
|
// heightReference: Cesium.HeightReference.CLAMP_TO_GROUND, // 必须设置
|
||||||
disableDepthTestDistance: Number.POSITIVE_INFINITY, // 防止被地形遮挡
|
// disableDepthTestDistance: Number.POSITIVE_INFINITY, // 防止被地形遮挡
|
||||||
|
clampToGround: false,
|
||||||
|
heightReference: Cesium.HeightReference.NONE,
|
||||||
|
disableDepthTestDistance: Number.POSITIVE_INFINITY,
|
||||||
},
|
},
|
||||||
// 其他属性
|
// 其他属性
|
||||||
attr: {
|
attr: {
|
||||||
|
|
@ -593,7 +600,8 @@ function initTowerLine(points) {
|
||||||
verticalOrigin: Cesium.VerticalOrigin.TOP,
|
verticalOrigin: Cesium.VerticalOrigin.TOP,
|
||||||
scaleByDistance: true,
|
scaleByDistance: true,
|
||||||
offsetY: -60,
|
offsetY: -60,
|
||||||
heightReference: Cesium.HeightReference.CLAMP_TO_GROUND,
|
// heightReference: Cesium.HeightReference.CLAMP_TO_GROUND,
|
||||||
|
heightReference: Cesium.HeightReference.NONE,
|
||||||
disableDepthTestDistance: Number.POSITIVE_INFINITY,
|
disableDepthTestDistance: Number.POSITIVE_INFINITY,
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
|
||||||
|
|
@ -19,8 +19,8 @@ const mapConfig = {
|
||||||
// heading: 359.2,
|
// heading: 359.2,
|
||||||
// pitch: -39.5,
|
// pitch: -39.5,
|
||||||
alt: 12000, // 高度≈缩放级别
|
alt: 12000, // 高度≈缩放级别
|
||||||
heading: 30, // 旋转30度
|
// heading: 30, // 旋转30度
|
||||||
pitch: -45, // 俯视角45度
|
// pitch: -45, // 俯视角45度
|
||||||
},
|
},
|
||||||
|
|
||||||
highDynamicRange: false, // 关闭HDR(可减少模糊)
|
highDynamicRange: false, // 关闭HDR(可减少模糊)
|
||||||
|
|
@ -28,7 +28,7 @@ const mapConfig = {
|
||||||
scene3DOnly: false,
|
scene3DOnly: false,
|
||||||
shadows: false,
|
shadows: false,
|
||||||
removeDblClick: true,
|
removeDblClick: true,
|
||||||
sceneMode: 3,
|
sceneMode: 1,
|
||||||
showSun: true,
|
showSun: true,
|
||||||
showMoon: true,
|
showMoon: true,
|
||||||
showSkyBox: true,
|
showSkyBox: true,
|
||||||
|
|
@ -85,7 +85,7 @@ const mapConfig = {
|
||||||
},
|
},
|
||||||
terrain: {
|
terrain: {
|
||||||
url: "//data.mars3d.cn/terrain",
|
url: "//data.mars3d.cn/terrain",
|
||||||
show: true,
|
show: false,
|
||||||
},
|
},
|
||||||
basemaps: [
|
basemaps: [
|
||||||
{ id: 10, name: "地图底图", type: "group" },
|
{ id: 10, name: "地图底图", type: "group" },
|
||||||
|
|
@ -470,9 +470,12 @@ function addMarker(lng, lat) {
|
||||||
scale: 1,
|
scale: 1,
|
||||||
horizontalOrigin: Cesium.HorizontalOrigin.CENTER,
|
horizontalOrigin: Cesium.HorizontalOrigin.CENTER,
|
||||||
verticalOrigin: Cesium.VerticalOrigin.BOTTOM,
|
verticalOrigin: Cesium.VerticalOrigin.BOTTOM,
|
||||||
clampToGround: true,
|
// clampToGround: true,
|
||||||
heightReference: Cesium.HeightReference.CLAMP_TO_GROUND, // 必须设置
|
// heightReference: Cesium.HeightReference.CLAMP_TO_GROUND, // 必须设置
|
||||||
disableDepthTestDistance: Number.POSITIVE_INFINITY, // 防止被地形遮挡
|
// disableDepthTestDistance: Number.POSITIVE_INFINITY, // 防止被地形遮挡
|
||||||
|
clampToGround: false,
|
||||||
|
heightReference: Cesium.HeightReference.NONE,
|
||||||
|
disableDepthTestDistance: Number.POSITIVE_INFINITY,
|
||||||
},
|
},
|
||||||
// 其他属性
|
// 其他属性
|
||||||
attr: {
|
attr: {
|
||||||
|
|
@ -489,7 +492,8 @@ function addMarker(lng, lat) {
|
||||||
verticalOrigin: Cesium.VerticalOrigin.TOP,
|
verticalOrigin: Cesium.VerticalOrigin.TOP,
|
||||||
scaleByDistance: true,
|
scaleByDistance: true,
|
||||||
offsetY: -60,
|
offsetY: -60,
|
||||||
heightReference: Cesium.HeightReference.CLAMP_TO_GROUND,
|
// heightReference: Cesium.HeightReference.CLAMP_TO_GROUND,
|
||||||
|
heightReference: Cesium.HeightReference.NONE,
|
||||||
disableDepthTestDistance: Number.POSITIVE_INFINITY,
|
disableDepthTestDistance: Number.POSITIVE_INFINITY,
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
@ -586,9 +590,12 @@ function initTowerLine(points) {
|
||||||
scale: 1,
|
scale: 1,
|
||||||
horizontalOrigin: Cesium.HorizontalOrigin.CENTER,
|
horizontalOrigin: Cesium.HorizontalOrigin.CENTER,
|
||||||
verticalOrigin: Cesium.VerticalOrigin.BOTTOM,
|
verticalOrigin: Cesium.VerticalOrigin.BOTTOM,
|
||||||
clampToGround: true,
|
// clampToGround: true,
|
||||||
heightReference: Cesium.HeightReference.CLAMP_TO_GROUND, // 必须设置
|
// heightReference: Cesium.HeightReference.CLAMP_TO_GROUND, // 必须设置
|
||||||
disableDepthTestDistance: Number.POSITIVE_INFINITY, // 防止被地形遮挡
|
// disableDepthTestDistance: Number.POSITIVE_INFINITY, // 防止被地形遮挡
|
||||||
|
clampToGround: false,
|
||||||
|
heightReference: Cesium.HeightReference.NONE,
|
||||||
|
disableDepthTestDistance: Number.POSITIVE_INFINITY,
|
||||||
},
|
},
|
||||||
// 其他属性
|
// 其他属性
|
||||||
attr: {
|
attr: {
|
||||||
|
|
@ -605,7 +612,8 @@ function initTowerLine(points) {
|
||||||
verticalOrigin: Cesium.VerticalOrigin.TOP,
|
verticalOrigin: Cesium.VerticalOrigin.TOP,
|
||||||
scaleByDistance: true,
|
scaleByDistance: true,
|
||||||
offsetY: -60,
|
offsetY: -60,
|
||||||
heightReference: Cesium.HeightReference.CLAMP_TO_GROUND,
|
// heightReference: Cesium.HeightReference.CLAMP_TO_GROUND,
|
||||||
|
heightReference: Cesium.HeightReference.NONE,
|
||||||
disableDepthTestDistance: Number.POSITIVE_INFINITY,
|
disableDepthTestDistance: Number.POSITIVE_INFINITY,
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
@ -707,7 +715,10 @@ function viewPointLine() {
|
||||||
style: {
|
style: {
|
||||||
width: 2, // 线宽(像素)
|
width: 2, // 线宽(像素)
|
||||||
color: "#0C14CA", // 线颜色
|
color: "#0C14CA", // 线颜色
|
||||||
clampToGround: true, // 是否贴地(山区建议设为true)
|
// clampToGround: true, // 是否贴地(山区建议设为true)
|
||||||
|
clampToGround: false,
|
||||||
|
heightReference: Cesium.HeightReference.NONE,
|
||||||
|
disableDepthTestDistance: Number.POSITIVE_INFINITY,
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
graphicLayer.addGraphic(polyline);
|
graphicLayer.addGraphic(polyline);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue