Skip to content

Commit 7629189

Browse files
committed
同步代码
1 parent 1d80867 commit 7629189

File tree

25 files changed

+986
-418
lines changed

25 files changed

+986
-418
lines changed

public/config/example.json

Lines changed: 690 additions & 183 deletions
Large diffs are not rendered by default.

public/lib/mars3d/mars3d.css

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
/**
22
* Mars3D三维可视化平台 mars3d
33
*
4-
* 版本信息:v3.9.3
5-
* 编译日期:2025-03-18 22:06
4+
* 版本信息:v3.9.4
5+
* 编译日期:2025-03-25 12:14
66
* 版权所有:Copyright by 火星科技 http://mars3d.cn
77
* 使用单位:火星科技免费公开版 ,2025-02-01
88
*/

public/lib/mars3d/mars3d.d.ts

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
/**
33
* Mars3D三维可视化平台 mars3d
44
*
5-
* 版本信息:v3.9.3
6-
* 编译日期:2025-03-18 22:06
5+
* 版本信息:v3.9.4
6+
* 编译日期:2025-03-25 12:14
77
* 版权所有:Copyright by 火星科技 http://mars3d.cn
88
* 使用单位:火星科技免费公开版 ,2025-02-01
99
*/
@@ -37885,6 +37885,7 @@ declare class TilesetBoxClip extends BaseThing {
3788537885
* @param [options.precise = true] - true:精确模式, 直接存储范围,但传入的范围顶点数量多时,就会造成一定程度的卡顿; false: 掩膜模式,栅格化范围,效率与范围顶点数量无关,但放大后锯齿化严重(模型面积越大越严重)
3788637886
* @param [options.maxCanvasSize = 4096] - 掩膜模式下最大分辨率半径(单位:像素),值过大时会WebGL报错: INVALID_VALUE: texImage2D: no canvas
3788737887
* @param [options.czm = true] - true:使用cesium原生clippingPolygons接口来操作,false:使用mars3d自定义方式操作
37888+
* @param [options.brightness = 1.0] - 亮度, czm: false时可以同时设置亮度 (因为与多个TilesetColorCorrection的shader有冲突)
3788837889
* @param [options.id = createGuid()] - 对象的id标识
3788937890
* @param [options.enabled = true] - 对象的启用状态
3789037891
* @param [options.eventParent] - 指定的事件冒泡对象,默认为所加入的map对象,false时不冒泡事件
@@ -37897,6 +37898,7 @@ declare class TilesetClip extends TilesetEditBase {
3789737898
precise?: boolean;
3789837899
maxCanvasSize?: number;
3789937900
czm?: boolean;
37901+
brightness?: number;
3790037902
id?: string | number;
3790137903
enabled?: boolean;
3790237904
eventParent?: BaseClass | boolean;
@@ -37905,6 +37907,11 @@ declare class TilesetClip extends TilesetEditBase {
3790537907
* 是否外裁剪
3790637908
*/
3790737909
clipOutSide: boolean;
37910+
/**
37911+
* 亮度,
37912+
* czm: false时可以同时设置亮度 (因为与多个TilesetColorCorrection的shader有冲突)
37913+
*/
37914+
brightness: number;
3790837915
/**
3790937916
* 清除分析
3791037917
* @returns 无
@@ -38134,6 +38141,7 @@ declare namespace TilesetFlood {
3813438141
* @param [options.limitMin = false] - 显示效果中是否不显示最低高度以下的部分颜色
3813538142
* @param [options.precise = true] - true:精确模式, 直接存储范围,但传入的范围顶点数量多时,就会造成一定程度的卡顿; false: 掩膜模式,栅格化范围,效率与范围顶点数量无关,但放大后锯齿化严重(模型面积越大越严重)
3813638143
* @param [options.maxCanvasSize = 4096] - 掩膜模式下最大分辨率半径(单位:像素)
38144+
* @param [options.brightness = 1.0] - 亮度, czm: false时可以同时设置亮度 (因为与多个TilesetColorCorrection的shader有冲突)
3813738145
* @param [options.id = createGuid()] - 对象的id标识
3813838146
* @param [options.enabled = true] - 对象的启用状态
3813938147
* @param [options.eventParent] - 指定的事件冒泡对象,默认为所加入的map对象,false时不冒泡事件
@@ -38150,6 +38158,7 @@ declare class TilesetFlood extends TilesetEditBase {
3815038158
limitMin?: boolean;
3815138159
precise?: boolean;
3815238160
maxCanvasSize?: number;
38161+
brightness?: number;
3815338162
id?: string | number;
3815438163
enabled?: boolean;
3815538164
eventParent?: BaseClass | boolean;
@@ -38170,6 +38179,11 @@ declare class TilesetFlood extends TilesetEditBase {
3817038179
* 淹没颜色
3817138180
*/
3817238181
color: Cesium.Color;
38182+
/**
38183+
* 亮度,
38184+
* czm: false时可以同时设置亮度 (因为与多个TilesetColorCorrection的shader有冲突)
38185+
*/
38186+
brightness: number;
3817338187
/**
3817438188
* 开始播放淹没动画效果
3817538189
* @returns 无

public/lib/mars3d/mars3d.js

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

public/lib/mars3d/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "mars3d",
3-
"version": "3.9.3",
3+
"version": "3.9.4",
44
"description": "Mars3D三维可视化平台",
55
"main": "./mars3d.js",
66
"types": "./mars3d.d.ts",

public/lib/mars3d/plugins/echarts/mars3d-echarts.js

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

public/lib/mars3d/plugins/heatmap/mars3d-heatmap.js

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

public/lib/mars3d/plugins/mapv/mars3d-mapv.js

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

public/lib/mars3d/plugins/space/mars3d-space.js

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

public/lib/mars3d/plugins/wind/mars3d-wind.js

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/example/control/basis/overviewmap/map.js

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -64,10 +64,11 @@ function addGraphicToOverviewMap(overviewMap) {
6464
image: "https://data.mars3d.cn/img/marker/street2.png",
6565
scale: 0.5,
6666
horizontalOrigin: Cesium.HorizontalOrigin.CENTER,
67-
verticalOrigin: Cesium.VerticalOrigin.CENTER,
68-
rotation: new Cesium.CallbackProperty(() => {
69-
return Cesium.Math.toRadians(360 - Cesium.Math.toDegrees(map.camera.heading))
70-
}, false)
67+
verticalOrigin: Cesium.VerticalOrigin.CENTER
68+
// 2D时可以取消下面注释;3D时本身地图有方向,无需rotation
69+
// rotation: new Cesium.CallbackProperty(() => {
70+
// return Cesium.Math.toRadians(360 - Cesium.Math.toDegrees(map.camera.heading))
71+
// }, false)
7172
}
7273
})
7374
mapEx.graphicLayer.addGraphic(graphic)

src/example/graphic/primitive/plane/map.js

Lines changed: 15 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,12 @@ export let map // mars3d.Map三维地图对象
44
export let graphicLayer // 矢量图层对象
55
export const eventTarget = new mars3d.BaseClass()
66

7+
export const mapOptions = {
8+
scene: {
9+
center: { lat: 30.835441, lng: 116.285581, alt: 4536.2, heading: 2.8, pitch: -58.2 }
10+
}
11+
}
12+
713
// 初始化地图业务,生命周期钩子函数(必须),框架在地图初始化完成后自动调用该函数
814
export function onMounted(mapInstance) {
915
map = mapInstance // 记录map
@@ -21,9 +27,6 @@ export function onMounted(mapInstance) {
2127

2228
// 加一些演示数据
2329
addDemoGraphic1(graphicLayer)
24-
addDemoGraphic2(graphicLayer)
25-
addDemoGraphic3(graphicLayer)
26-
addDemoGraphic4(graphicLayer)
2730
}
2831

2932
// 释放当前地图业务的生命周期函数,具体项目中时必须写onMounted的反向操作(如解绑事件、对象销毁、变量置空)
@@ -36,22 +39,20 @@ function addDemoGraphic1(graphicLayer) {
3639
position: [116.282587, 30.859197, 544.31],
3740
style: {
3841
plane_normal: Cesium.Cartesian3.UNIT_Y,
39-
dimensions_x: 2000.0,
40-
dimensions_y: 1000.0,
41-
color: "#00ff00",
42-
opacity: 0.4,
43-
44-
// 高亮时的样式(默认为鼠标移入,也可以指定type:'click'单击高亮),构造后也可以openHighlight、closeHighlight方法来手动调用
45-
highlight: {
46-
opacity: 0.9
47-
}
42+
dimensions: new Cesium.Cartesian2(1000.0, 1000.0),
43+
image: "https://data.mars3d.cn/img/map/gugong.jpg",
44+
heading: 0,
45+
pitch: 0,
46+
roll: 0
4847
},
4948
attr: { remark: "示例1" }
5049
})
5150
graphicLayer.addGraphic(graphic) // 还可以另外一种写法: graphic.addTo(graphicLayer)
5251

53-
// 演示个性化处理graphic
54-
initGraphicManager(graphic)
52+
const pointEdit = new mars3d.thing.MatrixMove({
53+
position: graphic.position
54+
})
55+
map.addThing(pointEdit)
5556
}
5657

5758
// 也可以在单个Graphic上做个性化管理及绑定操作

src/example/layer-tile/online/tdt/map.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -172,6 +172,14 @@ export function addTileLayer() {
172172
key: mars3d.Token.tiandituArr
173173
})
174174
map.addLayer(tileLayer)
175+
176+
177+
// tileLayer = new mars3d.layer.TdtLayer({
178+
// name: "地表覆盖",
179+
// layer: "glc2020",
180+
// key: ["75f0434f240669f4a2df6359275146d2"] //需要有效token才能访问地表覆盖
181+
// })
182+
// map.addLayer(tileLayer)
175183
}
176184

177185
export function removeTileLayer() {

src/example/layer-tile/type/pbf-protomaps/map.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ export const mapOptions = {
1515
layers: [
1616
{
1717
name: "矢量瓦片图层",
18-
icon: "//data.mars3d.cn/img/thumbnail/basemap/osm.png",
18+
icon: "https://data.mars3d.cn/img/thumbnail/basemap/osm.png",
1919
type: "arcgis-pbf", // \lib\mars3d\thirdParty\pbf-protomaps\ArcGISPbfLayer.js 中定义的类型
2020
url: "https://basemaps.arcgis.com/arcgis/rest/services/World_Basemap_v2/VectorTileServer",
2121
styleUrl: "https://jsapi.maps.arcgis.com/sharing/rest/content/items/75f4dfdff19e445395653121a95a85db/resources/styles/root.json",

0 commit comments

Comments
 (0)