Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 130945a

Browse files
committed
Leaflet示例IGServer/专题图检查与纠正
1 parent 2690985 commit 130945a

File tree

4 files changed

+94
-87
lines changed

4 files changed

+94
-87
lines changed

demo/leaflet/example/igserver/themeservice/multifield.htm

Lines changed: 27 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
<!DOCTYPE html>
22
<html xmlns="http://www.w3.org/1999/xhtml">
33
<head>
4-
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
4+
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
55
<title>多字段分段专题图</title>
6-
<script src="../../libs/zondyclient/include-leaflet-local.js"></script>
6+
<script src="../../libs/zondyclient/include-leaflet-local.js"></script>
77
<!--引入当前页面样式表-->
8-
<link href="../../css/leaflet/style.css" rel="stylesheet" type="text/css" />
8+
<link href="../../css/leaflet/style.css" rel="stylesheet" type="text/css"/>
99

1010
<style>
1111
body {
@@ -24,10 +24,10 @@
2424
//地图文档guid
2525
var guid;
2626
/**初始化地图显示
27-
*/
27+
*/
2828
function init() {
2929
//随机生成一个guid
30-
guid = Math.floor(Math.random() * 10000000).toString();
30+
guid = Math.floor(Math.random() * 10000000).toString();
3131
//地图容器
3232
map = L.map('leaf_map', {
3333
//地图渲染在canvas上
@@ -61,7 +61,7 @@
6161
}
6262

6363
/**添加专题图
64-
*/
64+
*/
6565
function addMulClassThemes() {
6666
//专题图信息数组
6767
themesInfoArr = [];
@@ -158,10 +158,11 @@
158158
ThemeOper.port = "6163";
159159
//添加专题图(不是在原文档上添加,会重新生成一个专题图缓存文档)
160160
ThemeOper.addThemesInfo("WorldJWVector", "1", themesInfoArr, onUniqueTheme);
161+
map.setZoom(map.getZoom() + 1);
161162
}
162163

163164
/**更新专题图
164-
*/
165+
*/
165166
function updateTheme() {
166167
//显示进度条
167168
startPressBar();
@@ -256,7 +257,7 @@
256257
}
257258

258259
/**删除专题图
259-
*/
260+
*/
260261
function deleteTheme() {
261262
if (themesInfoArr) {
262263
//显示进度条
@@ -268,11 +269,12 @@
268269
else {
269270
alert("已清除或者没有该专题图信息!");
270271
}
272+
map.setZoom(map.getZoom() - 1);
271273
}
272274

273275
/**调用专题图服务成功回调
274-
* @param {json对象} flg 获取结果对象
275-
*/
276+
* @param {json对象} flg 获取结果对象
277+
*/
276278
function onUniqueTheme(flg) {
277279
//停止进度条
278280
stopPressBar();
@@ -290,30 +292,30 @@
290292
}
291293

292294
/**开始进度条动画
293-
*/
295+
*/
294296
function startPressBar() {
295297
document.getElementById('preview').style.display = "";
296298
}
297299

298300
/**停止进度条动画
299-
*/
301+
*/
300302
function stopPressBar() {
301303
document.getElementById('preview').style.display = "none";
302-
}
304+
}
303305
</script>
304306
</head>
305307
<body onload="init();">
306-
<div id="preview" style="display: none; text-align: center; padding-top: 250px; font-weight: bold">
307-
<img src="../../img/common/39-1.gif" alt='' /><br />
308-
<br />
309-
<span>正在操作,请稍候</span>
310-
</div>
311-
<div class="ToolLib">
312-
<input type="button" class="ButtonLib" id="createThemeBtn" value="添加专题图" onclick="addMulClassThemes()" />
313-
<input type="button" class="ButtonLib" id="updateThemeBtn" value="更新专题图" onclick="updateTheme()" />
314-
<input type="button" class="ButtonLib" id="deleteThemeBtn" value="删除专题图" onclick="deleteTheme()" />
315-
</div>
316-
<div id="leaf_map" style="width: 100%; height:95%;">
317-
</div>
308+
<div id="preview" style="display: none; text-align: center; padding-top: 250px; font-weight: bold">
309+
<img src="../../img/common/39-1.gif" alt=''/><br/>
310+
<br/>
311+
<span>正在操作,请稍候</span>
312+
</div>
313+
<div class="ToolLib">
314+
<input type="button" class="ButtonLib" id="createThemeBtn" value="添加专题图" onclick="addMulClassThemes()"/>
315+
<input type="button" class="ButtonLib" id="updateThemeBtn" value="更新专题图" onclick="updateTheme()"/>
316+
<input type="button" class="ButtonLib" id="deleteThemeBtn" value="删除专题图" onclick="deleteTheme()"/>
317+
</div>
318+
<div id="leaf_map" style="width: 100%; height:95%;">
319+
</div>
318320
</body>
319321
</html>

demo/leaflet/example/igserver/themeservice/random.htm

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
<!DOCTYPE html>
22
<html xmlns="http://www.w3.org/1999/xhtml">
33
<head>
4-
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
4+
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
55
<title>添加随机专题图</title>
6-
<script src="../../libs/zondyclient/include-leaflet-local.js"></script>
6+
<script src="../../libs/zondyclient/include-leaflet-local.js"></script>
77
<!--引入当前页面样式表-->
8-
<link href="../../css/leaflet/style.css" rel="stylesheet" type="text/css" />
8+
<link href="../../css/leaflet/style.css" rel="stylesheet" type="text/css"/>
99

1010
<style>
1111
body {
@@ -24,7 +24,7 @@
2424
//地图文档guid
2525
var guid;
2626
/**初始化地图显示
27-
*/
27+
*/
2828
function init() {
2929
//随机生成一个guid
3030
guid = Math.floor(Math.random() * 10000000).toString();
@@ -61,7 +61,7 @@
6161
}
6262

6363
/**添加专题图
64-
*/
64+
*/
6565
function addCRandomThemesInfo() {
6666
//专题图信息数组
6767
themesInfoArr = [];
@@ -96,6 +96,7 @@
9696
ThemeOper.port = "6163";
9797
//添加专题图(不是在原文档上添加,会重新生成一个专题图缓存文档)
9898
ThemeOper.addThemesInfo("WorldJWVector", "1", themesInfoArr, onUniqueThemeSuccess);
99+
map.setZoom(map.getZoom() + 1);
99100
}
100101

101102
//调用专题图成服务功后的回调
@@ -114,10 +115,10 @@
114115
</script>
115116
</head>
116117
<body onload="init();">
117-
<div class="ToolLib">
118-
<input type="button" class="ButtonLib" id="createThemeBtn" value="添加随机专题图" onclick="addCRandomThemesInfo()" />
119-
</div>
120-
<div id="leaf_map" style="width: 100%; height:95%;position: absolute;">
121-
</div>
118+
<div class="ToolLib">
119+
<input type="button" class="ButtonLib" id="createThemeBtn" value="添加随机专题图" onclick="addCRandomThemesInfo()"/>
120+
</div>
121+
<div id="leaf_map" style="width: 100%; height:95%;position: absolute;">
122+
</div>
122123
</body>
123124
</html>

demo/leaflet/example/igserver/themeservice/singlefield.htm

Lines changed: 27 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
<!DOCTYPE html>
22
<html xmlns="http://www.w3.org/1999/xhtml">
33
<head>
4-
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
4+
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
55
<title>分段专题图</title>
6-
<script src="../../libs/zondyclient/include-leaflet-local.js"></script>
6+
<script src="../../libs/zondyclient/include-leaflet-local.js"></script>
77
<!--引入当前页面样式表-->
8-
<link href="../../css/leaflet/style.css" rel="stylesheet" type="text/css" />
8+
<link href="../../css/leaflet/style.css" rel="stylesheet" type="text/css"/>
99

1010
<style>
1111
body {
@@ -24,10 +24,10 @@
2424
//地图文档guid
2525
var guid;
2626
/**初始化地图显示
27-
*/
27+
*/
2828
function init() {
2929
//随机生成一个guid
30-
guid = Math.floor(Math.random() * 10000000).toString();
30+
guid = Math.floor(Math.random() * 10000000).toString();
3131
//地图容器
3232
map = L.map('leaf_map', {
3333
//地图渲染在canvas上
@@ -61,7 +61,7 @@
6161
}
6262

6363
/**添加专题图
64-
*/
64+
*/
6565
function addRangeThemesInfo() {
6666
//专题图信息数组
6767
themesInfoArr = [];
@@ -129,10 +129,11 @@
129129
ThemeOper.port = "6163";
130130
//添加专题图(不是在原文档上添加,会重新生成一个专题图缓存文档)
131131
ThemeOper.addThemesInfo("WorldJWVector", "1", themesInfoArr, onUniqueTheme);
132+
map.setZoom(map.getZoom() + 1);
132133
}
133134

134135
/**更新专题图
135-
*/
136+
*/
136137
function updateTheme() {
137138
//显示进度条
138139
startPressBar();
@@ -198,7 +199,7 @@
198199
}
199200

200201
/**删除专题图
201-
*/
202+
*/
202203
function deleteTheme() {
203204
if (themesInfoArr) {
204205
//显示进度条
@@ -210,11 +211,12 @@
210211
else {
211212
alert("已清除或者没有该专题图信息!");
212213
}
214+
map.setZoom(map.getZoom() - 1);
213215
}
214216

215217
/**调用专题图服务成功回调
216-
* @param {json对象} flg 获取结果对象
217-
*/
218+
* @param {json对象} flg 获取结果对象
219+
*/
218220
function onUniqueTheme(flg) {
219221
//停止进度条
220222
stopPressBar();
@@ -232,30 +234,30 @@
232234
}
233235

234236
/**开始进度条动画
235-
*/
237+
*/
236238
function startPressBar() {
237239
document.getElementById('preview').style.display = "";
238240
}
239241

240242
/**停止进度条动画
241-
*/
243+
*/
242244
function stopPressBar() {
243245
document.getElementById('preview').style.display = "none";
244-
}
246+
}
245247
</script>
246248
</head>
247249
<body onload="init();">
248-
<div id="preview" style="display: none; text-align: center; padding-top: 250px; font-weight: bold">
249-
<img src="../../img/common/39-1.gif" alt='' /><br />
250-
<br />
251-
<span>正在操作,请稍候</span>
252-
</div>
253-
<div class="ToolLib">
254-
<input type="button" class="ButtonLib" id="createThemeBtn" value="添加专题图" onclick="addRangeThemesInfo()" />
255-
<input type="button" class="ButtonLib" id="updateThemeBtn" value="更新专题图" onclick="updateTheme()" />
256-
<input type="button" class="ButtonLib" id="deleteThemeBtn" value="删除专题图" onclick="deleteTheme()" />
257-
</div>
258-
<div id="leaf_map" style="width: 100%; height:95%;">
259-
</div>
250+
<div id="preview" style="display: none; text-align: center; padding-top: 250px; font-weight: bold">
251+
<img src="../../img/common/39-1.gif" alt=''/><br/>
252+
<br/>
253+
<span>正在操作,请稍候</span>
254+
</div>
255+
<div class="ToolLib">
256+
<input type="button" class="ButtonLib" id="createThemeBtn" value="添加专题图" onclick="addRangeThemesInfo()"/>
257+
<input type="button" class="ButtonLib" id="updateThemeBtn" value="更新专题图" onclick="updateTheme()"/>
258+
<input type="button" class="ButtonLib" id="deleteThemeBtn" value="删除专题图" onclick="deleteTheme()"/>
259+
</div>
260+
<div id="leaf_map" style="width: 100%; height:95%;">
261+
</div>
260262
</body>
261263
</html>

0 commit comments

Comments
 (0)