mars3d 3.3.6 → 3.3.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/mars3d.css +12 -3
- package/dist/mars3d.d.ts +326 -98
- package/dist/mars3d.js +4 -4
- package/package.json +1 -1
package/dist/mars3d.css
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Mars3D三维可视化平台 mars3d
|
|
3
3
|
*
|
|
4
|
-
* 版本信息:v3.3.
|
|
5
|
-
* 编译日期:2022-
|
|
4
|
+
* 版本信息:v3.3.7
|
|
5
|
+
* 编译日期:2022-05-02 10:37:17
|
|
6
6
|
* 版权所有:Copyright by 火星科技 http://mars3d.cn
|
|
7
7
|
* 使用单位:免费公开版 ,2022-02-01
|
|
8
8
|
*/
|
|
@@ -16,9 +16,12 @@
|
|
|
16
16
|
overflow: hidden;
|
|
17
17
|
position: relative;
|
|
18
18
|
}
|
|
19
|
-
.
|
|
19
|
+
.mars3d-container .cesium-widget-credits {
|
|
20
20
|
display: none;
|
|
21
21
|
}
|
|
22
|
+
.mars3d-container .mars3d-vrButton {
|
|
23
|
+
right: auto !important;
|
|
24
|
+
}
|
|
22
25
|
/**右键菜单*/
|
|
23
26
|
.mars3d-contextmenu {
|
|
24
27
|
position: absolute;
|
|
@@ -480,6 +483,12 @@
|
|
|
480
483
|
margin: -2px;
|
|
481
484
|
box-sizing: content-box;
|
|
482
485
|
}
|
|
486
|
+
.mars3d-divBillboardEntity {
|
|
487
|
+
position: absolute;
|
|
488
|
+
top: 0;
|
|
489
|
+
left: 0;
|
|
490
|
+
z-index: -1;
|
|
491
|
+
}
|
|
483
492
|
/**内置的DivGraphic通用样式【动画点】*/
|
|
484
493
|
.mars3d-animation-point,
|
|
485
494
|
.mars3d-animation-point:after,
|
package/dist/mars3d.d.ts
CHANGED
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
/**
|
|
3
3
|
* Mars3D三维可视化平台 mars3d
|
|
4
4
|
*
|
|
5
|
-
* 版本信息:v3.3.
|
|
6
|
-
* 编译日期:2022-
|
|
5
|
+
* 版本信息:v3.3.7
|
|
6
|
+
* 编译日期:2022-05-02 10:37:17
|
|
7
7
|
* 版权所有:Copyright by 火星科技 http://mars3d.cn
|
|
8
8
|
* 使用单位:免费公开版 ,2022-02-01
|
|
9
9
|
*/
|
|
@@ -1217,16 +1217,31 @@ declare namespace Token {
|
|
|
1217
1217
|
* 官网: {@link https://cesium.com/ion/signin/}
|
|
1218
1218
|
*/
|
|
1219
1219
|
const ion: string;
|
|
1220
|
+
/**
|
|
1221
|
+
* 更新Cesium官方的Ion服务key
|
|
1222
|
+
* @param item - token值
|
|
1223
|
+
*/
|
|
1224
|
+
function updateIon(item: string): void;
|
|
1220
1225
|
/**
|
|
1221
1226
|
* mapbox地图key,
|
|
1222
1227
|
* 官网:{@link https://account.mapbox.com}
|
|
1223
1228
|
*/
|
|
1224
1229
|
const mapbox: string;
|
|
1230
|
+
/**
|
|
1231
|
+
* 更新mapbox地图key
|
|
1232
|
+
* @param item - token值
|
|
1233
|
+
*/
|
|
1234
|
+
function updateMapbox(item: string): void;
|
|
1225
1235
|
/**
|
|
1226
1236
|
* 微软Bing地图key,
|
|
1227
1237
|
* 官网: {@link https://www.bingmapsportal.com/Application}
|
|
1228
1238
|
*/
|
|
1229
1239
|
const bing: string;
|
|
1240
|
+
/**
|
|
1241
|
+
* 更新微软Bing地图key
|
|
1242
|
+
* @param item - token值
|
|
1243
|
+
*/
|
|
1244
|
+
function updateBing(item: string): void;
|
|
1230
1245
|
/**
|
|
1231
1246
|
* 天地图key数组,
|
|
1232
1247
|
* 官网: {@link https://console.tianditu.gov.cn/api/key}
|
|
@@ -1236,6 +1251,11 @@ declare namespace Token {
|
|
|
1236
1251
|
* 天地图key,
|
|
1237
1252
|
*/
|
|
1238
1253
|
const tianditu: string;
|
|
1254
|
+
/**
|
|
1255
|
+
* 更新天地图key
|
|
1256
|
+
* @param item - token值
|
|
1257
|
+
*/
|
|
1258
|
+
function updateTianditu(item: string | string[]): void;
|
|
1239
1259
|
/**
|
|
1240
1260
|
* 高德key数组,
|
|
1241
1261
|
* 官网: {@link https://console.amap.com/dev/key/app}
|
|
@@ -1245,6 +1265,11 @@ declare namespace Token {
|
|
|
1245
1265
|
* 高德key,
|
|
1246
1266
|
*/
|
|
1247
1267
|
const gaode: string;
|
|
1268
|
+
/**
|
|
1269
|
+
* 更新高德key
|
|
1270
|
+
* @param item - token值
|
|
1271
|
+
*/
|
|
1272
|
+
function updateGaode(item: string | string[]): void;
|
|
1248
1273
|
/**
|
|
1249
1274
|
* 百度key数组,
|
|
1250
1275
|
* 官网: {@link http://lbsyun.baidu.com/apiconsole/key#/home}
|
|
@@ -1254,6 +1279,29 @@ declare namespace Token {
|
|
|
1254
1279
|
* 百度key,
|
|
1255
1280
|
*/
|
|
1256
1281
|
const baidu: string;
|
|
1282
|
+
/**
|
|
1283
|
+
* 更新百度key
|
|
1284
|
+
* @param item - token值
|
|
1285
|
+
*/
|
|
1286
|
+
function updateBaidu(item: string | string[]): void;
|
|
1287
|
+
/**
|
|
1288
|
+
* 更新所有SDK涉及的第3放Token值(如果具体使用类中传入时,已传入值优先)
|
|
1289
|
+
* @param token - 集合
|
|
1290
|
+
* @param [token.tianditu] - 天地图
|
|
1291
|
+
* @param [token.gaode] - 高德
|
|
1292
|
+
* @param [token.baidu] - 百度
|
|
1293
|
+
* @param [token.ion] - Ion服务
|
|
1294
|
+
* @param [token.mapbox] - mapbox地图
|
|
1295
|
+
* @param [token.bing] - 微软Bing地图
|
|
1296
|
+
*/
|
|
1297
|
+
function updateAll(token: {
|
|
1298
|
+
tianditu?: string | string[];
|
|
1299
|
+
gaode?: string | string[];
|
|
1300
|
+
baidu?: string | string[];
|
|
1301
|
+
ion?: string;
|
|
1302
|
+
mapbox?: string;
|
|
1303
|
+
bing?: string;
|
|
1304
|
+
}): void;
|
|
1257
1305
|
}
|
|
1258
1306
|
|
|
1259
1307
|
/**
|
|
@@ -6586,6 +6634,235 @@ declare class BoxEntity extends BasePointEntity {
|
|
|
6586
6634
|
static fromDraw(layer: GraphicLayer, options: any): BoxEntity;
|
|
6587
6635
|
}
|
|
6588
6636
|
|
|
6637
|
+
declare namespace LabelEntity {
|
|
6638
|
+
/**
|
|
6639
|
+
* Canvas 文本点(label转图片) 支持的样式信息
|
|
6640
|
+
* @property [text = "文字"] - 文本内容,换行可以用换行符'\n'。
|
|
6641
|
+
* @property [scale = 1.0] - 指定缩放比例。
|
|
6642
|
+
* @property [horizontalOrigin] - 横向方向的定位
|
|
6643
|
+
* @property [verticalOrigin] - 垂直方向的定位
|
|
6644
|
+
* @property [font_family = "楷体"] - 字体 ,可选项:微软雅黑,宋体,楷体,隶书,黑体 等
|
|
6645
|
+
* @property [font_size = 30] - 字体大小
|
|
6646
|
+
* @property [font_weight = "normal"] - 是否加粗 ,可选项:bold (解释:是),normal (解释:否),
|
|
6647
|
+
* @property [font_style = "normal"] - 是否斜体 ,可选项:italic (解释:是),normal (解释:否),
|
|
6648
|
+
* @property [font = '30px normal normal 楷体'] - 上叙4个属性的一次性指定CSS字体的属性。
|
|
6649
|
+
* @property [textBaseline = 'bottom'] - 文本的基线。
|
|
6650
|
+
* @property [fill = true] - 是否填充
|
|
6651
|
+
* @property [color = "#ffffff"] - 文本颜色
|
|
6652
|
+
* @property [opacity = 1.0] - 透明度,取值范围:0.0-1.0
|
|
6653
|
+
* @property [stroke = false] - 是否衬色
|
|
6654
|
+
* @property [strokeColor = "#000000"] - 衬色颜色
|
|
6655
|
+
* @property [strokeWidth = 2.0] - 衬色宽度
|
|
6656
|
+
* @property [outlineColor = "#000000"] - 矩形边框的颜色。
|
|
6657
|
+
* @property [outlineWidth = 0.0] - 边框的宽度
|
|
6658
|
+
* @property [background = false] - 是否背景
|
|
6659
|
+
* @property [backgroundColor = "#000000"] - 背景颜色
|
|
6660
|
+
* @property [backgroundPadding = 0] - 背景内边距,指定文字与填充边界内容之间的空间(以像素为单位)。
|
|
6661
|
+
* @property [hasPixelOffset = false] - 是否存在偏移量
|
|
6662
|
+
* @property [pixelOffsetX = 0] - 横向偏移像素
|
|
6663
|
+
* @property [pixelOffsetY = 0] - 纵向偏移像素
|
|
6664
|
+
* @property [pixelOffset = Cartesian2.ZERO] - 指定像素偏移量。
|
|
6665
|
+
* @property [scaleByDistance = false] - 是否按视距缩放 或 设定基于与相机的距离设置比例。
|
|
6666
|
+
* @property [scaleByDistance_far = 1000000] - 上限
|
|
6667
|
+
* @property [scaleByDistance_farValue = 0.1] - 比例值
|
|
6668
|
+
* @property [scaleByDistance_near = 1000] - 下限
|
|
6669
|
+
* @property [scaleByDistance_nearValue = 1] - 比例值
|
|
6670
|
+
* @property [distanceDisplayCondition = false] - 是否按视距显示 或 指定此框将显示在与摄像机的多大距离。
|
|
6671
|
+
* @property [distanceDisplayCondition_far = 100000] - 最大距离
|
|
6672
|
+
* @property [distanceDisplayCondition_near = 0] - 最小距离
|
|
6673
|
+
* @property [clampToGround = false] - 是否贴地
|
|
6674
|
+
* @property [heightReference = Cesium.HeightReference.NONE] - 指定高度相对于什么的属性。
|
|
6675
|
+
* @property [visibleDepth = true] - 是否被遮挡
|
|
6676
|
+
* @property [disableDepthTestDistance] - 指定从相机到禁用深度测试的距离。
|
|
6677
|
+
* @property [translucencyByDistance] - 用于基于与相机的距离设置半透明度。
|
|
6678
|
+
* @property [setHeight] - 指定坐标高度值(常用于图层中配置),也支持字符串模版配置
|
|
6679
|
+
* @property [addHeight] - 在现有坐标基础上增加的高度值(常用于图层中配置),也支持字符串模版配置
|
|
6680
|
+
*/
|
|
6681
|
+
type StyleOptions = {
|
|
6682
|
+
text?: string;
|
|
6683
|
+
scale?: number;
|
|
6684
|
+
horizontalOrigin?: Cesium.HorizontalOrigin;
|
|
6685
|
+
verticalOrigin?: Cesium.VerticalOrigin;
|
|
6686
|
+
font_family?: string;
|
|
6687
|
+
font_size?: number;
|
|
6688
|
+
font_weight?: string;
|
|
6689
|
+
font_style?: string;
|
|
6690
|
+
font?: string;
|
|
6691
|
+
textBaseline?: string;
|
|
6692
|
+
fill?: boolean;
|
|
6693
|
+
color?: string | Cesium.Color;
|
|
6694
|
+
opacity?: number;
|
|
6695
|
+
stroke?: boolean;
|
|
6696
|
+
strokeColor?: string | Cesium.Color;
|
|
6697
|
+
strokeWidth?: number;
|
|
6698
|
+
outlineColor?: string | Cesium.Color;
|
|
6699
|
+
outlineWidth?: number;
|
|
6700
|
+
background?: boolean;
|
|
6701
|
+
backgroundColor?: string | Cesium.Color;
|
|
6702
|
+
backgroundPadding?: number;
|
|
6703
|
+
hasPixelOffset?: boolean;
|
|
6704
|
+
pixelOffsetX?: number;
|
|
6705
|
+
pixelOffsetY?: number;
|
|
6706
|
+
pixelOffset?: Cesium.Cartesian2 | number[];
|
|
6707
|
+
scaleByDistance?: boolean | Cesium.NearFarScalar;
|
|
6708
|
+
scaleByDistance_far?: number;
|
|
6709
|
+
scaleByDistance_farValue?: number;
|
|
6710
|
+
scaleByDistance_near?: number;
|
|
6711
|
+
scaleByDistance_nearValue?: number;
|
|
6712
|
+
distanceDisplayCondition?: boolean | Cesium.DistanceDisplayCondition;
|
|
6713
|
+
distanceDisplayCondition_far?: number;
|
|
6714
|
+
distanceDisplayCondition_near?: number;
|
|
6715
|
+
clampToGround?: boolean;
|
|
6716
|
+
heightReference?: Cesium.HeightReference;
|
|
6717
|
+
visibleDepth?: boolean;
|
|
6718
|
+
disableDepthTestDistance?: number;
|
|
6719
|
+
translucencyByDistance?: Cesium.NearFarScalar;
|
|
6720
|
+
setHeight?: number | string;
|
|
6721
|
+
addHeight?: number | string;
|
|
6722
|
+
};
|
|
6723
|
+
/**
|
|
6724
|
+
* Canvas 文本点(label转图片) 支持的样式信息
|
|
6725
|
+
* @property [text = "文字"] - 文本内容,换行可以用换行符'\n'。
|
|
6726
|
+
* @property [scale = 1.0] - 指定缩放比例。
|
|
6727
|
+
* @property [horizontalOrigin] - 横向方向的定位
|
|
6728
|
+
* @property [verticalOrigin] - 垂直方向的定位
|
|
6729
|
+
* @property [font_family = "楷体"] - 字体 ,可选项:微软雅黑,宋体,楷体,隶书,黑体 等
|
|
6730
|
+
* @property [font_size = 30] - 字体大小
|
|
6731
|
+
* @property [font_weight = "normal"] - 是否加粗 ,可选项:bold (解释:是),normal (解释:否),
|
|
6732
|
+
* @property [font_style = "normal"] - 是否斜体 ,可选项:italic (解释:是),normal (解释:否),
|
|
6733
|
+
* @property [font = '30px normal normal 楷体'] - 上叙4个属性的一次性指定CSS字体的属性。
|
|
6734
|
+
* @property [textBaseline = 'bottom'] - 文本的基线。
|
|
6735
|
+
* @property [fill = true] - 是否填充
|
|
6736
|
+
* @property [color = "#ffffff"] - 文本颜色
|
|
6737
|
+
* @property [opacity = 1.0] - 透明度,取值范围:0.0-1.0
|
|
6738
|
+
* @property [stroke = false] - 是否衬色
|
|
6739
|
+
* @property [strokeColor = "#000000"] - 衬色颜色
|
|
6740
|
+
* @property [strokeWidth = 2.0] - 衬色宽度
|
|
6741
|
+
* @property [outlineColor = "#000000"] - 矩形边框的颜色。
|
|
6742
|
+
* @property [outlineWidth = 0.0] - 边框的宽度
|
|
6743
|
+
* @property [background = false] - 是否背景
|
|
6744
|
+
* @property [backgroundColor = "#000000"] - 背景颜色
|
|
6745
|
+
* @property [backgroundPadding = 0] - 背景内边距,指定文字与填充边界内容之间的空间(以像素为单位)。
|
|
6746
|
+
* @property [hasPixelOffset = false] - 是否存在偏移量
|
|
6747
|
+
* @property [pixelOffsetX = 0] - 横向偏移像素
|
|
6748
|
+
* @property [pixelOffsetY = 0] - 纵向偏移像素
|
|
6749
|
+
* @property [pixelOffset = Cartesian2.ZERO] - 指定像素偏移量。
|
|
6750
|
+
* @property [scaleByDistance = false] - 是否按视距缩放 或 设定基于与相机的距离设置比例。
|
|
6751
|
+
* @property [scaleByDistance_far = 1000000] - 上限
|
|
6752
|
+
* @property [scaleByDistance_farValue = 0.1] - 比例值
|
|
6753
|
+
* @property [scaleByDistance_near = 1000] - 下限
|
|
6754
|
+
* @property [scaleByDistance_nearValue = 1] - 比例值
|
|
6755
|
+
* @property [distanceDisplayCondition = false] - 是否按视距显示 或 指定此框将显示在与摄像机的多大距离。
|
|
6756
|
+
* @property [distanceDisplayCondition_far = 100000] - 最大距离
|
|
6757
|
+
* @property [distanceDisplayCondition_near = 0] - 最小距离
|
|
6758
|
+
* @property [clampToGround = false] - 是否贴地
|
|
6759
|
+
* @property [heightReference = Cesium.HeightReference.NONE] - 指定高度相对于什么的属性。
|
|
6760
|
+
* @property [visibleDepth = true] - 是否被遮挡
|
|
6761
|
+
* @property [disableDepthTestDistance] - 指定从相机到禁用深度测试的距离。
|
|
6762
|
+
* @property [translucencyByDistance] - 用于基于与相机的距离设置半透明度。
|
|
6763
|
+
* @property [setHeight] - 指定坐标高度值(常用于图层中配置),也支持字符串模版配置
|
|
6764
|
+
* @property [addHeight] - 在现有坐标基础上增加的高度值(常用于图层中配置),也支持字符串模版配置
|
|
6765
|
+
*/
|
|
6766
|
+
type StyleOptions = {
|
|
6767
|
+
text?: string;
|
|
6768
|
+
scale?: number;
|
|
6769
|
+
horizontalOrigin?: Cesium.HorizontalOrigin;
|
|
6770
|
+
verticalOrigin?: Cesium.VerticalOrigin;
|
|
6771
|
+
font_family?: string;
|
|
6772
|
+
font_size?: number;
|
|
6773
|
+
font_weight?: string;
|
|
6774
|
+
font_style?: string;
|
|
6775
|
+
font?: string;
|
|
6776
|
+
textBaseline?: string;
|
|
6777
|
+
fill?: boolean;
|
|
6778
|
+
color?: string | Cesium.Color;
|
|
6779
|
+
opacity?: number;
|
|
6780
|
+
stroke?: boolean;
|
|
6781
|
+
strokeColor?: string | Cesium.Color;
|
|
6782
|
+
strokeWidth?: number;
|
|
6783
|
+
outlineColor?: string | Cesium.Color;
|
|
6784
|
+
outlineWidth?: number;
|
|
6785
|
+
background?: boolean;
|
|
6786
|
+
backgroundColor?: string | Cesium.Color;
|
|
6787
|
+
backgroundPadding?: number;
|
|
6788
|
+
hasPixelOffset?: boolean;
|
|
6789
|
+
pixelOffsetX?: number;
|
|
6790
|
+
pixelOffsetY?: number;
|
|
6791
|
+
pixelOffset?: Cesium.Cartesian2 | number[];
|
|
6792
|
+
scaleByDistance?: boolean | Cesium.NearFarScalar;
|
|
6793
|
+
scaleByDistance_far?: number;
|
|
6794
|
+
scaleByDistance_farValue?: number;
|
|
6795
|
+
scaleByDistance_near?: number;
|
|
6796
|
+
scaleByDistance_nearValue?: number;
|
|
6797
|
+
distanceDisplayCondition?: boolean | Cesium.DistanceDisplayCondition;
|
|
6798
|
+
distanceDisplayCondition_far?: number;
|
|
6799
|
+
distanceDisplayCondition_near?: number;
|
|
6800
|
+
clampToGround?: boolean;
|
|
6801
|
+
heightReference?: Cesium.HeightReference;
|
|
6802
|
+
visibleDepth?: boolean;
|
|
6803
|
+
disableDepthTestDistance?: number;
|
|
6804
|
+
translucencyByDistance?: Cesium.NearFarScalar;
|
|
6805
|
+
setHeight?: number | string;
|
|
6806
|
+
addHeight?: number | string;
|
|
6807
|
+
};
|
|
6808
|
+
}
|
|
6809
|
+
|
|
6810
|
+
/**
|
|
6811
|
+
* Canvas 文本点(label转图片)
|
|
6812
|
+
* @param options - 参数对象,包括以下:
|
|
6813
|
+
* @param options.position - 坐标位置
|
|
6814
|
+
* @param options.style - 样式信息
|
|
6815
|
+
* @param [options.attr] - 附件的属性信息,可以任意附加属性,导出geojson或json时会自动处理导出。
|
|
6816
|
+
* @param [options.availability] - 与该对象关联的可用性(如果有的话)。
|
|
6817
|
+
* @param [options.description] - 指定此实体的HTML描述的字符串属性(infoBox中展示)。
|
|
6818
|
+
* @param [options.viewFrom] - 观察这个物体时建议的初始偏移量。
|
|
6819
|
+
* @param [options.parent] - 要与此实体关联的父实体。
|
|
6820
|
+
* @param [options.onBeforeCreate] - 在 new Cesium.Entity(addattr) 前的回调方法,可以对addattr做额外个性化处理。
|
|
6821
|
+
* @param [options.drawShow = true] - 绘制时,是否自动隐藏entity,可避免拾取坐标存在问题。
|
|
6822
|
+
* @param [options.addHeight] - 在绘制时,在绘制点的基础上增加的高度值
|
|
6823
|
+
* @param [options.popup] - 绑定的popup弹窗值,也可以bindPopup方法绑定
|
|
6824
|
+
* @param [options.popupOptions] - popup弹窗时的配置参数,也支持如pointerEvents等{@link Popup}构造参数
|
|
6825
|
+
* @param [options.tooltip] - 绑定的tooltip弹窗值,也可以bindTooltip方法绑
|
|
6826
|
+
* @param [options.tooltipOptions] - tooltip弹窗时的配置参数,也支持如pointerEvents等{@link Tooltip}构造参数
|
|
6827
|
+
* @param [options.contextmenuItems] - 当矢量数据支持右键菜单时,也可以bindContextMenu方法绑定
|
|
6828
|
+
* @param [options.id = uuid()] - 矢量数据id标识
|
|
6829
|
+
* @param [options.name = ''] - 矢量数据名称
|
|
6830
|
+
* @param [options.show = true] - 矢量数据是否显示
|
|
6831
|
+
* @param [options.eventParent] - 指定的事件冒泡对象,默认为所加入的图层对象,false时不冒泡事件
|
|
6832
|
+
* @param [options.allowDrillPick] - 是否允许鼠标穿透拾取
|
|
6833
|
+
*/
|
|
6834
|
+
declare class CanvasLabelEntity extends BasePointEntity {
|
|
6835
|
+
constructor(options: {
|
|
6836
|
+
position: LngLatPoint | Cesium.Cartesian3 | Cesium.PositionProperty | number[] | string;
|
|
6837
|
+
style: LabelEntity.StyleOptions;
|
|
6838
|
+
attr?: any;
|
|
6839
|
+
availability?: Cesium.TimeIntervalCollection;
|
|
6840
|
+
description?: Cesium.Property | string;
|
|
6841
|
+
viewFrom?: Cesium.Property;
|
|
6842
|
+
parent?: Cesium.Entity;
|
|
6843
|
+
onBeforeCreate?: (...params: any[]) => any;
|
|
6844
|
+
drawShow?: boolean;
|
|
6845
|
+
addHeight?: number;
|
|
6846
|
+
popup?: string | any[] | ((...params: any[]) => any);
|
|
6847
|
+
popupOptions?: Popup.StyleOptions;
|
|
6848
|
+
tooltip?: string | any[] | ((...params: any[]) => any);
|
|
6849
|
+
tooltipOptions?: Tooltip.StyleOptions;
|
|
6850
|
+
contextmenuItems?: any;
|
|
6851
|
+
id?: string | number;
|
|
6852
|
+
name?: string;
|
|
6853
|
+
show?: boolean;
|
|
6854
|
+
eventParent?: BaseClass | boolean;
|
|
6855
|
+
allowDrillPick?: boolean | ((...params: any[]) => any);
|
|
6856
|
+
});
|
|
6857
|
+
/**
|
|
6858
|
+
* 通过标绘 来创建矢量对象
|
|
6859
|
+
* @param layer - 图层
|
|
6860
|
+
* @param options - 矢量对象的构造参数
|
|
6861
|
+
* @returns 矢量对象
|
|
6862
|
+
*/
|
|
6863
|
+
static fromDraw(layer: GraphicLayer, options: any): CanvasLabelEntity;
|
|
6864
|
+
}
|
|
6865
|
+
|
|
6589
6866
|
declare namespace CircleEntity {
|
|
6590
6867
|
/**
|
|
6591
6868
|
* 圆、圆柱 支持的样式信息
|
|
@@ -8034,96 +8311,6 @@ declare class FontBillboardEntity extends BasePointEntity {
|
|
|
8034
8311
|
static fromDraw(layer: GraphicLayer, options: any): FontBillboardEntity;
|
|
8035
8312
|
}
|
|
8036
8313
|
|
|
8037
|
-
declare namespace LabelEntity {
|
|
8038
|
-
/**
|
|
8039
|
-
* 文本点 支持的样式信息
|
|
8040
|
-
* @property [text = "文字"] - 文本内容,换行可以用换行符'\n'。
|
|
8041
|
-
* @property [scale = 1.0] - 指定缩放比例。
|
|
8042
|
-
* @property [horizontalOrigin] - 横向方向的定位
|
|
8043
|
-
* @property [verticalOrigin] - 垂直方向的定位
|
|
8044
|
-
* @property [font_family = "楷体"] - 字体 ,可选项:微软雅黑,宋体,楷体,隶书,黑体 等
|
|
8045
|
-
* @property [font_size = 30] - 字体大小
|
|
8046
|
-
* @property [font_weight = "normal"] - 是否加粗 ,可选项:bold (解释:是),normal (解释:否),
|
|
8047
|
-
* @property [font_style = "normal"] - 是否斜体 ,可选项:italic (解释:是),normal (解释:否),
|
|
8048
|
-
* @property [font = '30px normal normal 楷体'] - 上叙4个属性的一次性指定CSS字体的属性。
|
|
8049
|
-
* @property [fill = true] - 是否填充
|
|
8050
|
-
* @property [color = "#ffffff"] - 文本颜色
|
|
8051
|
-
* @property [opacity = 1.0] - 透明度,取值范围:0.0-1.0
|
|
8052
|
-
* @property [outline = false] - 是否衬色
|
|
8053
|
-
* @property [outlineColor = "#000000"] - 衬色颜色
|
|
8054
|
-
* @property [outlineOpacity = 0.6] - 衬色透明度
|
|
8055
|
-
* @property [outlineWidth = 2.0] - 衬色宽度
|
|
8056
|
-
* @property [background = false] - 是否背景
|
|
8057
|
-
* @property [backgroundColor = "#000000"] - 背景颜色
|
|
8058
|
-
* @property [backgroundOpacity = 0.5] - 背景透明度
|
|
8059
|
-
* @property [backgroundPadding = new Cesium.Cartesian2(7, 5)] - 背景内边距,指定文字与填充边界内容之间的空间(以像素为单位)。
|
|
8060
|
-
* @property [hasPixelOffset = false] - 是否存在偏移量
|
|
8061
|
-
* @property [pixelOffsetX = 0] - 横向偏移像素
|
|
8062
|
-
* @property [pixelOffsetY = 0] - 纵向偏移像素
|
|
8063
|
-
* @property [pixelOffset = Cartesian2.ZERO] - A {@link Cartesian2} Property specifying the pixel offset.
|
|
8064
|
-
* @property [pixelOffsetScaleByDistance] - A {@link NearFarScalar} Property used to set pixelOffset based on distance from the camera.
|
|
8065
|
-
* @property [eyeOffset = Cartesian3.ZERO] - A {@link Cartesian3} Property specifying the eye offset.
|
|
8066
|
-
* @property [scaleByDistance = false] - 是否按视距缩放 或 设定基于与相机的距离设置比例。
|
|
8067
|
-
* @property [scaleByDistance_far = 1000000] - 上限
|
|
8068
|
-
* @property [scaleByDistance_farValue = 0.1] - 比例值
|
|
8069
|
-
* @property [scaleByDistance_near = 1000] - 下限
|
|
8070
|
-
* @property [scaleByDistance_nearValue = 1] - 比例值
|
|
8071
|
-
* @property [distanceDisplayCondition = false] - 是否按视距显示 或 指定此框将显示在与摄像机的多大距离。
|
|
8072
|
-
* @property [distanceDisplayCondition_far = 100000] - 最大距离
|
|
8073
|
-
* @property [distanceDisplayCondition_near = 0] - 最小距离
|
|
8074
|
-
* @property [clampToGround = false] - 是否贴地
|
|
8075
|
-
* @property [heightReference = Cesium.HeightReference.NONE] - 指定高度相对于什么的属性。
|
|
8076
|
-
* @property [visibleDepth = true] - 是否被遮挡
|
|
8077
|
-
* @property [disableDepthTestDistance] - 指定从相机到禁用深度测试的距离。
|
|
8078
|
-
* @property [translucencyByDistance] - 用于基于与相机的距离设置半透明度。
|
|
8079
|
-
* @property [setHeight] - 指定坐标高度值(常用于图层中配置),也支持字符串模版配置
|
|
8080
|
-
* @property [addHeight] - 在现有坐标基础上增加的高度值(常用于图层中配置),也支持字符串模版配置
|
|
8081
|
-
*/
|
|
8082
|
-
type StyleOptions = {
|
|
8083
|
-
text?: string;
|
|
8084
|
-
scale?: number;
|
|
8085
|
-
horizontalOrigin?: Cesium.HorizontalOrigin;
|
|
8086
|
-
verticalOrigin?: Cesium.VerticalOrigin;
|
|
8087
|
-
font_family?: string;
|
|
8088
|
-
font_size?: number;
|
|
8089
|
-
font_weight?: string;
|
|
8090
|
-
font_style?: string;
|
|
8091
|
-
font?: string;
|
|
8092
|
-
fill?: boolean;
|
|
8093
|
-
color?: string | Cesium.Color;
|
|
8094
|
-
opacity?: number;
|
|
8095
|
-
outline?: boolean;
|
|
8096
|
-
outlineColor?: string | Cesium.Color;
|
|
8097
|
-
outlineOpacity?: number;
|
|
8098
|
-
outlineWidth?: number;
|
|
8099
|
-
background?: boolean;
|
|
8100
|
-
backgroundColor?: string | Cesium.Color;
|
|
8101
|
-
backgroundOpacity?: number;
|
|
8102
|
-
backgroundPadding?: number | Cesium.Cartesian2;
|
|
8103
|
-
hasPixelOffset?: boolean;
|
|
8104
|
-
pixelOffsetX?: number;
|
|
8105
|
-
pixelOffsetY?: number;
|
|
8106
|
-
pixelOffset?: Cesium.Cartesian2 | number[];
|
|
8107
|
-
pixelOffsetScaleByDistance?: Cesium.NearFarScalar;
|
|
8108
|
-
eyeOffset?: Cesium.Cartesian3;
|
|
8109
|
-
scaleByDistance?: boolean | Cesium.NearFarScalar;
|
|
8110
|
-
scaleByDistance_far?: number;
|
|
8111
|
-
scaleByDistance_farValue?: number;
|
|
8112
|
-
scaleByDistance_near?: number;
|
|
8113
|
-
scaleByDistance_nearValue?: number;
|
|
8114
|
-
distanceDisplayCondition?: boolean | Cesium.DistanceDisplayCondition;
|
|
8115
|
-
distanceDisplayCondition_far?: number;
|
|
8116
|
-
distanceDisplayCondition_near?: number;
|
|
8117
|
-
clampToGround?: boolean;
|
|
8118
|
-
heightReference?: Cesium.HeightReference;
|
|
8119
|
-
visibleDepth?: boolean;
|
|
8120
|
-
disableDepthTestDistance?: number;
|
|
8121
|
-
translucencyByDistance?: Cesium.NearFarScalar;
|
|
8122
|
-
setHeight?: number | string;
|
|
8123
|
-
addHeight?: number | string;
|
|
8124
|
-
};
|
|
8125
|
-
}
|
|
8126
|
-
|
|
8127
8314
|
/**
|
|
8128
8315
|
* 文字 Entity对象
|
|
8129
8316
|
* @param options - 参数对象,包括以下:
|
|
@@ -18665,8 +18852,12 @@ declare namespace TilesetLayer {
|
|
|
18665
18852
|
* 3dtiles 三维模型图层。
|
|
18666
18853
|
* @param options - 参数对象, 构造参数建议从{@link http://mars3d.cn/editor.html?id=layer-tileset/manager/edit|模型编辑页面}设置后保存参数后拷贝json参数即可。参数包括以下:
|
|
18667
18854
|
* @param options.url - tileset的主JSON文件的 url
|
|
18668
|
-
* @param [options.maximumScreenSpaceError = 16] -
|
|
18669
|
-
* @param [options.maximumMemoryUsage = 512] - 数据集可以使用的最大内存量(以MB计)
|
|
18855
|
+
* @param [options.maximumScreenSpaceError = 16] - 用于驱动细化细节级别的最大屏幕空间错误。可以简单理解为:数值加大,能让最终成像变模糊。
|
|
18856
|
+
* @param [options.maximumMemoryUsage = 512] - 数据集可以使用的最大内存量(以MB计),这个参数要根据当前客户端显卡显存来配置,如果我们场景只显示这一个模型数据,这个可以设置到显存的50% 左右,比如我的显存是4G,这个可以设置到2048左右。那么既保证不超过显存限制,又可以最大利用显存缓存。<br />
|
|
18857
|
+
* 解释:
|
|
18858
|
+
* 这个参数默认是512,也即是当几何体和纹理资源大于512MB的时候,cesium就会淘汰掉当前帧中没有visited的所有块,这个值其实很小,也是cesium为了避免资源占用过高的一个保障.<br />
|
|
18859
|
+
* 这个值如果设置的过小,导致cesium几乎每帧都在尝试淘汰数据,增加了遍历的时间,也同时增加了崩溃的风险。<br />
|
|
18860
|
+
* 这个值如果设置的过大,cesium的淘汰机制失效,那么容易导致显存超过显卡内存,也会导致崩溃。 这个值应该处于最差视角下资源占用 和 显存最大量之间。<br />
|
|
18670
18861
|
* @param [options.position] - 自定义新的中心点位置(移动模型)
|
|
18671
18862
|
* @param options.position.lng - 经度值, 180 - 180
|
|
18672
18863
|
* @param options.position.lat - 纬度值, -90 - 90
|
|
@@ -19566,7 +19757,7 @@ declare namespace ArcGisLayer {
|
|
|
19566
19757
|
* @param options.rectangle.ymax - 最大纬度值, -90 至 90
|
|
19567
19758
|
* @param [options.bbox] - bbox规范的瓦片数据的矩形区域范围,与rectangle二选一即可。
|
|
19568
19759
|
* @param [options.zIndex] - 控制图层的叠加层次,默认按加载的顺序进行叠加,但也可以自定义叠加顺序,数字大的在上面(只对同类型图层间有效)。
|
|
19569
|
-
* @param [options.crs = CRS.
|
|
19760
|
+
* @param [options.crs = CRS.EPSG4326] - 瓦片数据的坐标系信息,默认为墨卡托投影
|
|
19570
19761
|
* @param [options.chinaCRS] - 标识瓦片的国内坐标系(用于自动纠偏或加偏),自动将瓦片转为map对应的chinaCRS类型坐标系。
|
|
19571
19762
|
* @param [options.enablePickFeatures = true] - 如果为true,则请求 单击坐标处服务中对应的矢量数据 并尝试解释响应中包含的功能。为false时不去服务请求。
|
|
19572
19763
|
* @param [options.graphicConver] - 单击获取到的数据进行按需筛选解析,大数据解析很卡,可以设定阀值屏蔽大数据,避免卡顿,number类型时代表字符串长度值。
|
|
@@ -19684,6 +19875,10 @@ declare class ArcGisLayer extends BaseTileLayer {
|
|
|
19684
19875
|
};
|
|
19685
19876
|
flyTo?: boolean;
|
|
19686
19877
|
});
|
|
19878
|
+
/**
|
|
19879
|
+
* 坐标系
|
|
19880
|
+
*/
|
|
19881
|
+
readonly crs: CRS | string;
|
|
19687
19882
|
/**
|
|
19688
19883
|
* 是否存在Popup绑定
|
|
19689
19884
|
* @returns 是否存在Popup绑定
|
|
@@ -19718,6 +19913,12 @@ declare class ArcGisLayer extends BaseTileLayer {
|
|
|
19718
19913
|
* @returns 创建完成的 ImageryProvider 对象
|
|
19719
19914
|
*/
|
|
19720
19915
|
_createImageryProvider(options?: any): Cesium.UrlTemplateImageryProvider | any;
|
|
19916
|
+
/**
|
|
19917
|
+
* 对象添加到地图上的创建钩子方法,
|
|
19918
|
+
* 每次add时都会调用
|
|
19919
|
+
* @returns 无
|
|
19920
|
+
*/
|
|
19921
|
+
_addedHook(): void;
|
|
19721
19922
|
}
|
|
19722
19923
|
|
|
19723
19924
|
/**
|
|
@@ -20158,6 +20359,10 @@ declare class BaseTileLayer extends BaseLayer {
|
|
|
20158
20359
|
* 瓦片图层对应的内部ImageryProvider对象
|
|
20159
20360
|
*/
|
|
20160
20361
|
readonly imageryProvider: Cesium.ImageryProvider;
|
|
20362
|
+
/**
|
|
20363
|
+
* 坐标系
|
|
20364
|
+
*/
|
|
20365
|
+
readonly crs: CRS | string;
|
|
20161
20366
|
/**
|
|
20162
20367
|
* 透明度,同opacity。从0.0到1.0。
|
|
20163
20368
|
*/
|
|
@@ -21561,6 +21766,7 @@ declare class OsmLayer extends BaseTileLayer {
|
|
|
21561
21766
|
* <li><code>ter_z</code>: 地形渲染图注记</li>
|
|
21562
21767
|
* </ul>
|
|
21563
21768
|
* @param [options.key = mars3d.Token.tiandituArr] - 天地图服务Token,可以自行注册官网: {@link https://console.tianditu.gov.cn/api/key}
|
|
21769
|
+
* @param [options.url] - 服务URL地址,同xyz服务
|
|
21564
21770
|
* @param [options.minimumLevel = 0] - 瓦片所支持的最低层级,如果数据没有第0层,该参数必须配置,当地图小于该级别时,平台不去请求服务数据。
|
|
21565
21771
|
* @param [options.maximumLevel] - 瓦片所支持的最大层级,大于该层级时会显示上一层拉伸后的瓦片,当地图大于该级别时,平台不去请求服务数据。
|
|
21566
21772
|
* @param [options.minimumTerrainLevel] - 展示影像图层的最小地形细节级别,小于该级别时,平台不显示影像数据。
|
|
@@ -21616,6 +21822,7 @@ declare class TdtLayer extends BaseTileLayer {
|
|
|
21616
21822
|
constructor(options?: {
|
|
21617
21823
|
layer?: string;
|
|
21618
21824
|
key?: string[];
|
|
21825
|
+
url?: string;
|
|
21619
21826
|
minimumLevel?: number;
|
|
21620
21827
|
maximumLevel?: number;
|
|
21621
21828
|
minimumTerrainLevel?: number;
|
|
@@ -22727,7 +22934,7 @@ declare namespace Map {
|
|
|
22727
22934
|
* @property extent.ymin - 最小纬度值, -90 至 90
|
|
22728
22935
|
* @property extent.ymax - 最大纬度值, -90 至 90
|
|
22729
22936
|
* @property [removeDblClick = false] - 是否移除Cesium默认的双击事件
|
|
22730
|
-
* @property [ionToken
|
|
22937
|
+
* @property [ionToken] - Cesium Ion服务的 Token令牌
|
|
22731
22938
|
* @property [resolutionScale = 1.0] - 获取或设置渲染分辨率的缩放比例。小于1.0的值可以改善性能不佳的设备上的性能,而值大于1.0则将以更高的速度呈现分辨率,然后缩小比例,从而提高视觉保真度。例如,如果窗口小部件的尺寸为640x480,则将此值设置为0.5将导致场景以320x240渲染,然后在设置时按比例放大设置为2.0将导致场景以1280x960渲染,然后按比例缩小。
|
|
22732
22939
|
*
|
|
22733
22940
|
* 以下是Cesium.Scene对象相关参数
|
|
@@ -22876,6 +23083,7 @@ declare namespace Map {
|
|
|
22876
23083
|
* @property [infoBox = true] - 是否显示 点击要素之后显示的信息
|
|
22877
23084
|
* @property [selectionIndicator = true] - 选择模型时,是否显示绿色框
|
|
22878
23085
|
* @property [animation = true] - 是否创建 左下角仪表动画面板
|
|
23086
|
+
* @property [animationTicks] - 左下角仪表动画面板 的可选步长
|
|
22879
23087
|
* @property [timeline = true] - 是否创建 下侧时间线控件面板
|
|
22880
23088
|
* @property [baseLayerPicker = true] - 是否显示 basemaps底图切换按钮
|
|
22881
23089
|
* @property [fullscreenButton = true] - 是否显示 全屏按钮
|
|
@@ -22905,6 +23113,7 @@ declare namespace Map {
|
|
|
22905
23113
|
infoBox?: boolean;
|
|
22906
23114
|
selectionIndicator?: boolean;
|
|
22907
23115
|
animation?: boolean;
|
|
23116
|
+
animationTicks?: number[];
|
|
22908
23117
|
timeline?: boolean;
|
|
22909
23118
|
baseLayerPicker?: boolean;
|
|
22910
23119
|
fullscreenButton?: boolean;
|
|
@@ -23015,6 +23224,23 @@ declare namespace Map {
|
|
|
23015
23224
|
tooltipOptions?: Tooltip.StyleOptions;
|
|
23016
23225
|
多个参数?: any;
|
|
23017
23226
|
};
|
|
23227
|
+
/**
|
|
23228
|
+
* 覆盖SDK内的{@link Token}所有第3方Token默认值
|
|
23229
|
+
* @property [tianditu] - 天地图
|
|
23230
|
+
* @property [gaode] - 高德
|
|
23231
|
+
* @property [baidu] - 百度
|
|
23232
|
+
* @property [ion] - Ion服务
|
|
23233
|
+
* @property [mapbox] - mapbox地图
|
|
23234
|
+
* @property [bing] - 微软Bing地图
|
|
23235
|
+
*/
|
|
23236
|
+
type tokenOptions = {
|
|
23237
|
+
tianditu?: string | string[];
|
|
23238
|
+
gaode?: string | string[];
|
|
23239
|
+
baidu?: string | string[];
|
|
23240
|
+
ion?: string;
|
|
23241
|
+
mapbox?: string;
|
|
23242
|
+
bing?: string;
|
|
23243
|
+
};
|
|
23018
23244
|
/**
|
|
23019
23245
|
* Map支持的{@link EventType}事件类型
|
|
23020
23246
|
* @example
|
|
@@ -23135,6 +23361,7 @@ declare namespace Map {
|
|
|
23135
23361
|
* @param [options.chinaCRS = ChinaCRS.WGS84] - 标识当前三维场景的国内坐标系(用于部分图层内对比判断来自动纠偏或加偏)
|
|
23136
23362
|
* @param [options.lang] - 使用的语言(如中文、英文等)。
|
|
23137
23363
|
* @param [options.templateValues] - 图层中统一的url模版,比如可以将服务url前缀统一使用模板,方便修改或动态配置。
|
|
23364
|
+
* @param [options.token] - 覆盖SDK内的{@link Token}所有第3方Token默认值
|
|
23138
23365
|
*/
|
|
23139
23366
|
declare class Map extends BaseClass {
|
|
23140
23367
|
constructor(id: string | Cesium.Viewer, options?: {
|
|
@@ -23148,6 +23375,7 @@ declare class Map extends BaseClass {
|
|
|
23148
23375
|
chinaCRS?: ChinaCRS;
|
|
23149
23376
|
lang?: LangType;
|
|
23150
23377
|
templateValues?: any;
|
|
23378
|
+
token?: Map.tokenOptions;
|
|
23151
23379
|
});
|
|
23152
23380
|
/**
|
|
23153
23381
|
* 当前类的构造参数
|
|
@@ -32396,14 +32624,14 @@ declare namespace Util {
|
|
|
32396
32624
|
*/
|
|
32397
32625
|
function isPCBroswer(): boolean;
|
|
32398
32626
|
/**
|
|
32399
|
-
* 执行alert
|
|
32627
|
+
* 执行alert弹窗(手动单击确定关闭窗口)
|
|
32400
32628
|
* @param msg - 弹窗内的内容
|
|
32401
32629
|
* @param title - 弹窗的标题
|
|
32402
32630
|
* @returns 无
|
|
32403
32631
|
*/
|
|
32404
32632
|
function alert(msg: string, title: string): void;
|
|
32405
32633
|
/**
|
|
32406
|
-
* 执行msg
|
|
32634
|
+
* 执行msg提示窗(自动消失)
|
|
32407
32635
|
* @param msg - 弹窗内的内容
|
|
32408
32636
|
* @returns 无
|
|
32409
32637
|
*/
|