|
1 | 1 | <!DOCTYPE html> |
2 | 2 | <html xmlns="http://www.w3.org/1999/xhtml"> |
3 | 3 | <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"/> |
5 | 5 | <title>分段专题图</title> |
6 | | - <script src="../../libs/zondyclient/include-leaflet-local.js"></script> |
| 6 | + <script src="../../libs/zondyclient/include-leaflet-local.js"></script> |
7 | 7 | <!--引入当前页面样式表--> |
8 | | - <link href="../../css/leaflet/style.css" rel="stylesheet" type="text/css" /> |
| 8 | + <link href="../../css/leaflet/style.css" rel="stylesheet" type="text/css"/> |
9 | 9 |
|
10 | 10 | <style> |
11 | 11 | body { |
|
24 | 24 | //地图文档guid |
25 | 25 | var guid; |
26 | 26 | /**初始化地图显示 |
27 | | - */ |
| 27 | + */ |
28 | 28 | function init() { |
29 | 29 | //随机生成一个guid |
30 | | - guid = Math.floor(Math.random() * 10000000).toString(); |
| 30 | + guid = Math.floor(Math.random() * 10000000).toString(); |
31 | 31 | //地图容器 |
32 | 32 | map = L.map('leaf_map', { |
33 | 33 | //地图渲染在canvas上 |
|
61 | 61 | } |
62 | 62 |
|
63 | 63 | /**添加专题图 |
64 | | - */ |
| 64 | + */ |
65 | 65 | function addRangeThemesInfo() { |
66 | 66 | //专题图信息数组 |
67 | 67 | themesInfoArr = []; |
|
129 | 129 | ThemeOper.port = "6163"; |
130 | 130 | //添加专题图(不是在原文档上添加,会重新生成一个专题图缓存文档) |
131 | 131 | ThemeOper.addThemesInfo("WorldJWVector", "1", themesInfoArr, onUniqueTheme); |
| 132 | + map.setZoom(map.getZoom() + 1); |
132 | 133 | } |
133 | 134 |
|
134 | 135 | /**更新专题图 |
135 | | - */ |
| 136 | + */ |
136 | 137 | function updateTheme() { |
137 | 138 | //显示进度条 |
138 | 139 | startPressBar(); |
|
198 | 199 | } |
199 | 200 |
|
200 | 201 | /**删除专题图 |
201 | | - */ |
| 202 | + */ |
202 | 203 | function deleteTheme() { |
203 | 204 | if (themesInfoArr) { |
204 | 205 | //显示进度条 |
|
210 | 211 | else { |
211 | 212 | alert("已清除或者没有该专题图信息!"); |
212 | 213 | } |
| 214 | + map.setZoom(map.getZoom() - 1); |
213 | 215 | } |
214 | 216 |
|
215 | 217 | /**调用专题图服务成功回调 |
216 | | - * @param {json对象} flg 获取结果对象 |
217 | | - */ |
| 218 | + * @param {json对象} flg 获取结果对象 |
| 219 | + */ |
218 | 220 | function onUniqueTheme(flg) { |
219 | 221 | //停止进度条 |
220 | 222 | stopPressBar(); |
|
232 | 234 | } |
233 | 235 |
|
234 | 236 | /**开始进度条动画 |
235 | | - */ |
| 237 | + */ |
236 | 238 | function startPressBar() { |
237 | 239 | document.getElementById('preview').style.display = ""; |
238 | 240 | } |
239 | 241 |
|
240 | 242 | /**停止进度条动画 |
241 | | - */ |
| 243 | + */ |
242 | 244 | function stopPressBar() { |
243 | 245 | document.getElementById('preview').style.display = "none"; |
244 | | - } |
| 246 | + } |
245 | 247 | </script> |
246 | 248 | </head> |
247 | 249 | <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> |
260 | 262 | </body> |
261 | 263 | </html> |
0 commit comments