Skip to content

Commit 908be9e

Browse files
author
hezhentao
committed
【产品介绍、开发指南】【新增】【OpenLayers、Leaflet、mapboxgl、Cesium、组件】
1 parent 2932b23 commit 908be9e

File tree

247 files changed

+9558
-463
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

247 files changed

+9558
-463
lines changed

website/public/static/demo/cesium/example/m3d/m3d-underpipe.htm

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -54,15 +54,8 @@
5454
var thirdPartyLayer = new CesiumZondy.Layer.ThirdPartyLayer({
5555
viewer: webGlobe.viewer
5656
});
57-
//加载天地图
58-
var tdtLayer = thirdPartyLayer.appendTDTuMap({
59-
//天地图经纬度数据
60-
url: 'http://t0.tianditu.com/DataServer?T=vec_c&X={x}&Y={y}&L={l}',
61-
//开发token (请到天地图官网申请自己的开发token,自带token仅做功能验证随时可能失效)
62-
token: "9c157e9585486c02edf817d2ecbc7752",
63-
//地图类型 'vec'矢量 'img'影像 'ter'地形
64-
ptype: "img"
65-
});
57+
//加载OSM地图
58+
var osm = thirdPartyLayer.appendOsmMap();
6659

6760
//视点跳转(经度,纬度,视角高度,方位角,俯仰角,翻滚角)
6861
sceneManager.flyToEx(108.95818720644677, 34.21849146233197, {

website/public/static/demo/cesium/example/mapgis/mapgis-2d-doc.htm

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -69,14 +69,9 @@
6969
vecDoc = layer.append2DDocTile(
7070
`${protocol}://${ip}:${port}/igs/rest/mrms/docs/北京市`, {
7171
guid: "__readonly_user__",
72-
layers: "exclude:1"
72+
//layers: "exclude:1"
7373
}
7474
);
75-
// vecDoc = layer.append2DDocTile(
76-
// `${protocol}://${ip}:${port}/igs/rest/mrms/layers`, {
77-
// gdbps: ["GDBP://MapGISLocalPlus/北京市/ds/行政区/sfcls/北京市", "GDBP://MapGISLocalPlus/北京市/ds/行政区/sfcls/首都点"],
78-
// }
79-
// );
8075
}
8176
});
8277
}
Lines changed: 89 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,89 @@
1+
<!DOCTYPE html>
2+
<html xmlns="http://www.w3.org/1999/xhtml">
3+
4+
<head>
5+
<meta charset='utf-8' />
6+
<title>加载IGServer二维矢量图层服务</title>
7+
<!--引用第三方的jQuery脚本库-->
8+
<script include="jquery" src="./static/libs/include-lib-local.js"></script>
9+
<!--引用Cesium脚本库文件-->
10+
<script src="./static/libs/include-cesium-local.js"></script>
11+
<!--引用示例页面样式表-->
12+
<link rel="stylesheet" href="./static/demo/cesium/style.css" />
13+
<script>
14+
//在JS脚本开发中使用严格代码规范模式,及时捕获一些不规范的行为,从而避免编程错误
15+
'use strict';
16+
17+
//定义三维场景控件对象
18+
var webGlobe;
19+
//定义矢量类
20+
var vecDoc;
21+
22+
//加载三维场景
23+
function init() {
24+
//构造三维视图对象(视图容器div的id,三维视图设置参数)
25+
webGlobe = new Cesium.WebSceneControl('GlobeView', {});
26+
27+
//构造视图功能管理对象(视图)
28+
var sceneManager = new CesiumZondy.Manager.SceneManager({
29+
viewer: webGlobe.viewer
30+
});
31+
//设置鼠标位置信息展示控件:经纬度、高程、视角高度(容器div的id)
32+
sceneManager.showPosition('coordinate_location');
33+
34+
//构造第三方图层对象
35+
var thirdPartyLayer = new CesiumZondy.Layer.ThirdPartyLayer({
36+
viewer: webGlobe.viewer
37+
});
38+
//加载天地图
39+
thirdPartyLayer.appendTDTuMap({
40+
//天地图经纬度数据
41+
url: 'http://t0.tianditu.com/DataServer?T=vec_c&X={x}&Y={y}&L={l}',
42+
//开发token (请到天地图官网申请自己的开发token,自带token仅做功能验证随时可能失效)
43+
token: "9c157e9585486c02edf817d2ecbc7752",
44+
//地图类型 'vec'矢量 'img'影像 'ter'地形
45+
ptype: "img"
46+
});
47+
48+
//视点跳转
49+
webGlobe.viewer.camera.flyTo({
50+
//定位到范围中心点
51+
destination: Cesium.Cartesian3.fromDegrees(116.3909, 39.9148, 240000),
52+
orientation: {
53+
heading: Cesium.Math.toRadians(-1),
54+
pitch: Cesium.Math.toRadians(-90),
55+
roll: 0
56+
},
57+
//跳转完成回调
58+
complete: function() {
59+
//构造瓦片图层管理对象(视图)
60+
var layer = new CesiumZondy.Layer.TilesLayer({
61+
viewer: webGlobe.viewer
62+
});
63+
//添加MapGIS IGServer发布的二维地图文档服务
64+
var {
65+
protocol,
66+
ip,
67+
port
68+
} = window.webclient;
69+
vecDoc = layer.append2DDocTile(
70+
`${protocol}://${ip}:${port}/igs/rest/mrms/layers`, {
71+
gdbps: ["GDBP://MapGISLocalPlus/北京市/ds/行政区/sfcls/北京市"],
72+
}
73+
);
74+
}
75+
});
76+
}
77+
</script>
78+
</head>
79+
80+
<body onload="init()">
81+
<!--三维场景容器-->
82+
<div id='GlobeView'></div>
83+
<!--位置信息容器-->
84+
<div id="coordinateDiv" class="coordinateClass">
85+
<label id="coordinate_location"></label>
86+
</div>
87+
</body>
88+
89+
</html>

website/public/static/demo/cesium/example/scene/scene-rotationView.htm

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@
6767
}
6868

6969
function startRotationView() {
70+
stopRotationView();
7071
//创建绕点旋转对象
7172
update = commfun.rotationView('rotationAroundPos', opt);
7273
//设置开始绕点旋转
@@ -75,30 +76,26 @@
7576

7677
function pauseRotationView() {
7778
//设置暂停绕点旋转
78-
update = commfun.rotationView('rotationAroundPos', opt);
7979
commfun.pauseRotationView(update);
8080

8181
}
8282

8383
function stopRotationView() {
8484
//设置移除绕点旋转
85-
update = commfun.rotationView('rotationAroundPos', opt);
8685
commfun.removeRotationView(update);
8786
}
8887

8988
function gohome() {
9089
var sceneManager = new CesiumZondy.Manager.SceneManager({
9190
viewer: webGlobe.viewer
9291
});
93-
// m3dLayer.zoomToM3dLayer(obliqueLayerp[0]);
9492
//视点跳转(经度,纬度,视角高度,方位角,俯仰角,翻滚角)
9593
sceneManager.flyToEx(108.96044700955785, 34.21796237686321, {
9694
height: 60.99772929683282,
9795
heading: -38.4940479913348135,
9896
pitch: -15,
9997
roll: 0
10098
});
101-
//sceneManager.goHome(); //复位
10299
}
103100
</script>
104101
</head>
Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
<!DOCTYPE html>
2+
<html xmlns="http://www.w3.org/1999/xhtml">
3+
4+
<head>
5+
<meta charset='utf-8' />
6+
<title>osm显示</title>
7+
<!--引用第三方的jQuery脚本库-->
8+
<script include="jquery" src="./static/libs/include-lib-local.js"></script>
9+
<!--引用Cesium脚本库文件-->
10+
<script src="./static/libs/include-cesium-local.js"></script>
11+
<!--引用示例页面样式表-->
12+
<link rel="stylesheet" href="./static/demo/cesium/style.css" />
13+
<script>
14+
//在JS脚本开发中使用严格代码规范模式,及时捕获一些不规范的行为,从而避免编程错误
15+
'use strict';
16+
17+
//定义三维场景控件对象
18+
var webGlobe;
19+
//定义第三方图层对象
20+
var thirdPartyLayer;
21+
//定义天地图图层对象
22+
var tdtLayer;
23+
24+
//地图初始化函数
25+
function init() {
26+
//构造三维视图对象(视图容器div的id,三维视图设置参数)
27+
webGlobe = new Cesium.WebSceneControl('GlobeView', {});
28+
29+
//构造视图功能管理对象(视图)
30+
var sceneManager = new CesiumZondy.Manager.SceneManager({
31+
viewer: webGlobe.viewer
32+
});
33+
//设置鼠标位置信息展示控件:经纬度、高程、视角高度(容器div的id)
34+
sceneManager.showPosition('coordinate_location');
35+
36+
//构造第三方图层对象
37+
thirdPartyLayer = new CesiumZondy.Layer.ThirdPartyLayer({
38+
viewer: webGlobe.viewer
39+
});
40+
//加载OSM地图
41+
var osm = thirdPartyLayer.appendOsmMap();
42+
}
43+
</script>
44+
</head>
45+
46+
<body onload="init()">
47+
<!--三维场景容器-->
48+
<div id='GlobeView'>
49+
50+
</div>
51+
<!--位置信息容器-->
52+
<div id="coordinateDiv" class="coordinateClass">
53+
<label id="coordinate_location"></label>
54+
</div>
55+
</body>
56+
57+
</html>
120 KB
Loading
91.8 KB
Loading

0 commit comments

Comments
 (0)