Skip to content

Commit 2cb5ff1

Browse files
committed
1.增加iClient3D示例,
2.fix站点首页和头部显示不正常问题 review by songyumeng
1 parent a6beea4 commit 2cb5ff1

326 files changed

Lines changed: 5499 additions & 91 deletions

File tree

Some content is hidden

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

examples/css/common.css

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ div {
1515
}
1616

1717
.header {
18-
height: 60px;
18+
height: 52px;
1919
width: 100%;
2020
position: fixed;
2121
top: 0;
@@ -25,7 +25,7 @@ div {
2525

2626
.content {
2727
position: absolute;
28-
top: 60px;
28+
top: 52px;
2929
bottom: 0;
3030
width: 100%;
3131
z-index: 99;

examples/iclient3d/01_3DMap.html

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
<head>
4+
<meta charset="utf-8">
5+
<meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1">
6+
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, minimum-scale=1, user-scalable=no">
7+
<title>三维场景</title>
8+
<link href="http://support.supermap.com.cn:8090/iserver/iClient/for3D/webgl/examples/css/widgets.css" rel="stylesheet">
9+
10+
<script type="text/javascript" src="http://cdn.bootcss.com/require.js/2.3.3/require.js"
11+
data-main="../../web/libs/Cesium/main.js"></script>
12+
<style>
13+
html, body, #cesiumContainer {
14+
width: 100%;
15+
height: 100%;
16+
margin: 0;
17+
padding: 0;
18+
overflow: hidden;
19+
}
20+
</style>
21+
</head>
22+
<body>
23+
<div id="cesiumContainer"></div>
24+
<script>
25+
function onload(Cesium) {
26+
var viewer = new Cesium.Viewer('cesiumContainer');
27+
}
28+
</script>
29+
</body>
30+
31+
</html>

examples/iclient3d/config.js

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
/**
2+
* iClient3D 示例配置文件:包含示例的分类、名称、缩略图、文件路径
3+
*/
4+
var exampleConfig = {
5+
"iClient3D": {
6+
name: "iClient3D",
7+
content: {
8+
"3D": {
9+
name: "3D",
10+
content: [
11+
{
12+
name: "三维场景",
13+
thumbnail: "3D_Map.png",
14+
fileName: "01_3DMap"
15+
}
16+
]
17+
}
18+
19+
}
20+
}
21+
};

examples/iclient3d/editor.html

Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
<!DOCTYPE html>
2+
<html>
3+
<meta charset="UTF-8">
4+
<head>
5+
<title>SuperMap iClient3D示例代码</title>
6+
<link href="http://cdn.bootcss.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet">
7+
<link rel="stylesheet" href="../css/common.css">
8+
<link rel="stylesheet" href="../css/sideBar.css">
9+
<link rel="stylesheet" href="../css/editor.css">
10+
<link rel="stylesheet" href="../../web/css/header.css">
11+
<script type="text/javascript" src="http://cdn.bootcss.com/jquery/3.1.1/jquery.min.js"></script>
12+
<script type="text/javascript" src="http://cdn.bootcss.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
13+
<script type="text/javascript" src="http://cdn.bootcss.com/ace/1.2.6/ace.js"></script>
14+
<script type="text/javascript" src="./config.js"></script>
15+
<style>
16+
.container {
17+
width: 100%;
18+
}
19+
20+
.navbar #headerMenu > li > a {
21+
22+
font-weight: inherit;
23+
}
24+
</style>
25+
</head>
26+
<body>
27+
<nav class="navbar navbar-fixed-top navbar-default">
28+
</nav>
29+
<script>
30+
$('.navbar-fixed-top').load('../../web/header.html');
31+
</script>
32+
<div class="main">
33+
<div class="content">
34+
<div id="sidebar">
35+
<ul class="menu"></ul>
36+
</div>
37+
38+
<div id="codePane" unselectable="on">
39+
<div class="contentTool">
40+
<span style="padding-left: 20px;">源代码编辑器</span>
41+
<div class="editorBtn" id="runBtn" onclick="run()"><span class="glyphicon glyphicon-play-circle" aria-hidden="true"></span>&nbsp;运行</div>
42+
<div class="editorBtn" id="resetBtn" onclick="refresh()"><span class="glyphicon glyphicon-refresh" aria-hidden="true"></span>&nbsp;重置</div>
43+
</div>
44+
45+
<div id="editor">
46+
47+
</div>
48+
</div>
49+
<div id="preview">
50+
<iframe id='innerPage' name='innerPage'></iframe>
51+
</div>
52+
</div>
53+
</div>
54+
<script type="text/javascript" src="../js/sidebar.js"></script>
55+
<script type="text/javascript" src="../js/editor.js"></script>
56+
<script>
57+
58+
$(document).ready(function () {
59+
initPage();
60+
bindEvents();
61+
});
62+
function bindEvents() {
63+
$("#sidebar ul.thirdMenu a").click(function (evt) {
64+
window.location.hash = "#" + evt.target.id;
65+
initEditor();
66+
});
67+
window.addEventListener("hashchange", function () {
68+
var hash = window.location.hash;
69+
if (hash.indexOf("#") !== -1) {
70+
var id = hash.split("#")[1];
71+
selectMenu(id);
72+
}
73+
});
74+
}
75+
76+
</script>
77+
</body>
78+
</html>

examples/iclient3d/examples.html

Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
<!DOCTYPE html>
2+
<html>
3+
<head>
4+
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
5+
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0"/>
6+
<meta name="apple-mobile-web-app-capable" content="yes"/>
7+
<title>SuperMap iClient3D示范程序</title>
8+
<link href="http://cdn.bootcss.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet">
9+
<link rel="stylesheet" href="../css/common.css">
10+
<link rel="stylesheet" href="../css/sideBar.css">
11+
<link rel="stylesheet" href="../css/examples.css">
12+
<link rel="stylesheet" href="../../web/css/header.css">
13+
<script type="text/javascript" src="http://cdn.bootcss.com/jquery/3.1.1/jquery.min.js"></script>
14+
<script type="text/javascript" src="../js/scrollTo.min.js"></script>
15+
<script type="text/javascript" src="http://cdn.bootcss.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
16+
<script type="text/javascript" src="./config.js"></script>
17+
<style>
18+
.container {
19+
width: 100%;
20+
}
21+
22+
.navbar #headerMenu > li > a {
23+
24+
font-weight: inherit;
25+
}
26+
</style>
27+
</head>
28+
29+
<body>
30+
<nav class="navbar navbar-fixed-top navbar-default">
31+
</nav>
32+
<script>
33+
$('.navbar-fixed-top').load('../../web/header.html');
34+
</script>
35+
<div class="main">
36+
37+
<div class="content" data-spy="scroll" data-target="#sidebar .menu">
38+
<div id="sidebar">
39+
<ul class="menu"></ul>
40+
</div>
41+
<div id="examples-container">
42+
<ul id="charts-list">
43+
44+
</ul>
45+
</div>
46+
</div>
47+
</div>
48+
<script type="text/javascript" src="../js/sidebar.js"></script>
49+
<script type="text/javascript" src="../js/example.js"></script>
50+
<script>
51+
52+
$(document).ready(function () {
53+
initPage();
54+
bindEvents()
55+
});
56+
function bindEvents() {
57+
$("#sidebar ul.menu>li").on('click', function (evt) {
58+
window.location.hash = "#" + evt.target.id;
59+
});
60+
$("#sidebar ul.secondMenu>li").on('click', function (evt) {
61+
var id = $(evt.target).parent().parent().parent().find("a.menuTitle").attr('id');
62+
id = id + "-" + evt.target.id;
63+
window.location.hash = "#" + id;
64+
evt.stopPropagation();
65+
});
66+
window.addEventListener("hashchange", function () {
67+
this.scroll();
68+
});
69+
$('.dropdown-menu li a').on('click', function () {
70+
var host = window.location.protocol + "//" + window.location.host;
71+
window.location.href = host + "/examples/" + this.text + "/examples.html";
72+
})
73+
74+
}
75+
</script>
76+
77+
</body>
78+
</html>

examples/iclient3d/img/3D_Map.png

181 KB
Loading

examples/leaflet/editor.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,10 @@
2323
</style>
2424
</head>
2525
<body>
26-
<header class="navbar iC-header iC-theme">
27-
</header>
26+
<nav class="navbar navbar-fixed-top navbar-default">
27+
</nav>
2828
<script>
29-
$('.iC-header').load('../../web/header.html');
29+
$('.navbar-fixed-top').load('../../web/header.html');
3030
</script>
3131
<div class="main">
3232
<div class="content">

examples/leaflet/examples.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,10 @@
2727
</head>
2828

2929
<body>
30-
<header class="navbar iC-header iC-theme">
31-
</header>
30+
<nav class="navbar navbar-fixed-top navbar-default">
31+
</nav>
3232
<script>
33-
$('.iC-header').load('../../web/header.html');
33+
$('.navbar-fixed-top').load('../../web/header.html');
3434
</script>
3535
<div class="main">
3636

examples/mapboxgl/editor.html

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
<link rel="stylesheet" href="../../web/css/header.css">
1111
<script type="text/javascript" src="http://cdn.bootcss.com/jquery/3.1.1/jquery.min.js"></script>
1212
<script type="text/javascript" src="http://cdn.bootcss.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
13-
<script type="text/javascript" src="../js/ace.js"></script>
13+
<script type="text/javascript" src="http://cdn.bootcss.com/ace/1.2.6/ace.js"></script>
1414
<script type="text/javascript" src="./config.js"></script>
1515
<style>
1616
.container {
@@ -23,10 +23,10 @@
2323
</style>
2424
</head>
2525
<body>
26-
<header class="navbar iC-header iC-theme">
27-
</header>
26+
<nav class="navbar navbar-fixed-top navbar-default">
27+
</nav>
2828
<script>
29-
$('.iC-header').load('../../web/header.html');
29+
$('.navbar-fixed-top').load('../../web/header.html');
3030
</script>
3131
<div class="main">
3232
<div class="content">

examples/mapboxgl/examples.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,10 @@
2727
</head>
2828

2929
<body>
30-
<header class="navbar iC-header iC-theme">
31-
</header>
30+
<nav class="navbar navbar-fixed-top navbar-default">
31+
</nav>
3232
<script>
33-
$('.iC-header').load('../../web/header.html');
33+
$('.navbar-fixed-top').load('../../web/header.html');
3434
</script>
3535
<div class="main">
3636

0 commit comments

Comments
 (0)