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

Skip to content

Commit 2690985

Browse files
committed
Leaflet示例IGServer/空间分析检查与纠正
1 parent c506b49 commit 2690985

File tree

9 files changed

+218
-218
lines changed

9 files changed

+218
-218
lines changed

demo/leaflet/example/igserver/analysisservice/circleclip.htm

Lines changed: 25 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
<!DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
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>
66
<!--当前页面的样式-->
7-
<link href="../../css/leaflet/style.css" rel="stylesheet" type="text/css" />
7+
<link href="../../css/leaflet/style.css" rel="stylesheet" type="text/css"/>
88
<script include="json" src="../../libs/zondyclient/include-leaflet-local.js"></script>
99

1010
<script type="text/javascript">
@@ -17,7 +17,7 @@
1717
var resultBaseUrl = "gdbp://MapGisLocal/OpenLayerVecterMap/sfcls/";
1818

1919
/** 地图初始化函数
20-
*/
20+
*/
2121
function init() {
2222
//地图容器
2323
map = L.map('leaf_map', {
@@ -50,7 +50,7 @@
5050
}
5151

5252
/** 执行圆裁剪分析
53-
*/
53+
*/
5454
function clipByCircleAnalysis() {
5555
clearA();
5656
//显示进度条
@@ -76,24 +76,24 @@
7676
}
7777

7878
/** 分析失败回调
79-
*/
79+
*/
8080
function AnalysisError(e) {
8181
//停止进度条
8282
stopPressBar();
8383
}
8484

8585
/** 分析成功后的回调
86-
*/
86+
*/
8787
function AnalysisSuccess(data) {
8888
//停止进度条
8989
stopPressBar();
90-
if (!data.result.succeed || data.result.results == null) {
90+
if (!data.succeed || data.results === null) {
9191
alert("圆裁剪分析失败,请检查参数!");
9292
}
9393
else {
94-
if (data.result.results.length != 0) {
94+
if (data.results.length !== 0) {
9595
//结果图层的地址
96-
var resultLayerUrl = data.result.results[0].Value;
96+
var resultLayerUrl = data.results[0].Value;
9797
//将结果图层添加到地图视图中显示
9898
resultLayer = new Zondy.Map.MapVectorLayer(encodeURIComponent(resultBaseUrl + resultLayerUrl), {
9999
//IGServer所在ip地址
@@ -112,18 +112,18 @@
112112
}
113113

114114
/** 清除客户端分析结果信息
115-
*/
115+
*/
116116
function clearA() {
117117
//停止进度条
118118
stopPressBar();
119119
//清除缓冲区的图层
120-
if (resultLayer != undefined) {
120+
if (resultLayer !== undefined) {
121121
resultLayer.remove();
122122
}
123123
}
124124

125125
/** 当前日期加时间(如:2009-06-12-120000)
126-
*/
126+
*/
127127
function getCurentTime() {
128128
var now = new Date();
129129
//获取当前年份
@@ -157,29 +157,29 @@
157157
}
158158

159159
/** 停止进度条
160-
*/
160+
*/
161161
function stopPressBar() {
162162
document.getElementById('preview').style.display = "none";
163163
}
164164

165165
/** 开始进度条动画
166-
*/
166+
*/
167167
function startPressBar() {
168168
document.getElementById('preview').style.display = "";
169169
}
170170
</script>
171171
</head>
172172
<body onload="init()">
173-
<div id="preview" style="display: none; text-align: center; padding-top: 250px; font-weight: bold">
174-
<img src="../../img/common/39-1.gif" alt='' /><br />
175-
<br />
176-
<span>正在缓冲区分析,请稍候</span>
177-
</div>
178-
<div class="ToolLib">
179-
<input type="button" class="ButtonLib" value="圆裁剪分析" onclick="clipByCircleAnalysis()" />
180-
<input type="button" class="ButtonLib" value="清除结果" onclick="clearA()" />
181-
</div>
182-
<div id="leaf_map" style="width: 100%; height: 700px;">
183-
</div>
173+
<div id="preview" style="display: none; text-align: center; padding-top: 250px; font-weight: bold">
174+
<img src="../../img/common/39-1.gif" alt=''/><br/>
175+
<br/>
176+
<span>正在缓冲区分析,请稍候</span>
177+
</div>
178+
<div class="ToolLib">
179+
<input type="button" class="ButtonLib" value="圆裁剪分析" onclick="clipByCircleAnalysis()"/>
180+
<input type="button" class="ButtonLib" value="清除结果" onclick="clearA()"/>
181+
</div>
182+
<div id="leaf_map" style="width: 100%; height: 700px;">
183+
</div>
184184
</body>
185185
</html>

demo/leaflet/example/igserver/analysisservice/layerclip.htm

Lines changed: 25 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
<!DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
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>
66
<!--当前页面的样式-->
7-
<link href="../../css/leaflet/style.css" rel="stylesheet" type="text/css" />
7+
<link href="../../css/leaflet/style.css" rel="stylesheet" type="text/css"/>
88
<script src="../../libs/zondyclient/include-leaflet-local.js"></script>
99
<script type="text/javascript">
1010
//整个js文件都是严格模式下执行的
@@ -16,7 +16,7 @@
1616
var resultBaseUrl = "gdbp://MapGisLocal/OpenLayerVecterMap/sfcls/";
1717

1818
/** 地图初始化函数
19-
*/
19+
*/
2020
function init() {
2121
//地图容器
2222
map = L.map('leaf_map', {
@@ -49,7 +49,7 @@
4949
}
5050

5151
/** 执行图层裁剪分析
52-
*/
52+
*/
5353
function clipByLayerAnalysis() {
5454
//清除之前的分析结果
5555
clearA();
@@ -75,24 +75,24 @@
7575
}
7676

7777
/** 分析失败回调
78-
*/
78+
*/
7979
function AnalysisError(e) {
8080
//停止进度条
8181
stopPressBar();
8282
}
8383

8484
/** 分析成功后的回调
85-
*/
85+
*/
8686
function AnalysisSuccess(data) {
8787
//停止进度条
8888
stopPressBar();
89-
if (!data.result.succeed || data.result.results == null) {
89+
if (!data.succeed || data.results === null) {
9090
alert("图层裁剪分析,请检查参数!");
9191
}
9292
else {
93-
if (data.result.results.length != 0) {
93+
if (data.results.length !== 0) {
9494
//结果图层的基地址
95-
var resultLayerUrl = data.result.results[0].Value;
95+
var resultLayerUrl = data.results[0].Value;
9696
//将结果图层添加到地图视图中显示
9797
resultLayer = new Zondy.Map.MapVectorLayer(encodeURIComponent(resultBaseUrl + resultLayerUrl), {
9898
//IGServer所在ip地址
@@ -111,18 +111,18 @@
111111
}
112112

113113
/** 清除客户端分析结果信息
114-
*/
114+
*/
115115
function clearA() {
116116
//停止进度条
117117
stopPressBar();
118118
//清除缓冲区的图层
119-
if (resultLayer != undefined) {
119+
if (resultLayer !== undefined) {
120120
resultLayer.remove();
121121
}
122122
}
123123

124124
/** 当前日期加时间(如:2009-06-12-120000)
125-
*/
125+
*/
126126
function getCurentTime() {
127127
var now = new Date();
128128
//获取当前年份
@@ -156,29 +156,29 @@
156156
}
157157

158158
/** 停止进度条
159-
*/
159+
*/
160160
function stopPressBar() {
161161
document.getElementById('preview').style.display = "none";
162162
}
163163

164164
/** 开始进度条动画
165-
*/
165+
*/
166166
function startPressBar() {
167167
document.getElementById('preview').style.display = "";
168168
}
169169
</script>
170170
</head>
171171
<body onload="init()">
172-
<div id="preview" style="display: none; text-align: center; padding-top: 250px; font-weight: bold">
173-
<img src="../../img/common/39-1.gif" alt='' /><br />
174-
<br />
175-
<span>正在执行叠加分析,请稍候</span>
176-
</div>
177-
<div class="ToolLib">
178-
<input type="button" class="ButtonLib" value="图层裁剪分析" onclick="clipByLayerAnalysis()" />
179-
<input type="button" class="ButtonLib" value="清除结果" onclick="clearA()" />
180-
</div>
181-
<div id="leaf_map" style="width: 100%; height: 90%; position: absolute">
182-
</div>
172+
<div id="preview" style="display: none; text-align: center; padding-top: 250px; font-weight: bold">
173+
<img src="../../img/common/39-1.gif" alt=''/><br/>
174+
<br/>
175+
<span>正在执行叠加分析,请稍候</span>
176+
</div>
177+
<div class="ToolLib">
178+
<input type="button" class="ButtonLib" value="图层裁剪分析" onclick="clipByLayerAnalysis()"/>
179+
<input type="button" class="ButtonLib" value="清除结果" onclick="clearA()"/>
180+
</div>
181+
<div id="leaf_map" style="width: 100%; height: 90%; position: absolute">
182+
</div>
183183
</body>
184184
</html>

demo/leaflet/example/igserver/analysisservice/layeroverlayer.htm

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@
22
<html xmlns="http://www.w3.org/1999/xhtml">
33

44
<head>
5-
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
5+
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
66
<title>图层叠加分析</title>
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
<script src="../../libs/zondyclient/include-leaflet-local.js"></script>
1010
<script type="text/javascript">
1111
//整个js文件都是严格模式下执行的
@@ -92,11 +92,11 @@
9292
function AnalysisSuccess(data) {
9393
//停止进度条
9494
stopPressBar();
95-
if (!data.result.succeed) {
95+
if (!data.succeed) {
9696
alert("图层叠加分析,请检查参数!");
9797
} else {
98-
if (data.result.results.length != 0) {
99-
var resultLayerUrl = data.result.results[0].Value;
98+
if (data.results.length !== 0) {
99+
var resultLayerUrl = data.results[0].Value;
100100
//将结果图层添加到地图视图中显示
101101
resultLayer = new Zondy.Map.MapVectorLayer(encodeURIComponent(resultBaseUrl + resultLayerUrl), {
102102
//IGServer所在ip地址
@@ -120,7 +120,7 @@
120120
//停止进度条
121121
stopPressBar();
122122
//清除缓冲区的图层
123-
if (resultLayer != undefined) {
123+
if (resultLayer !== undefined) {
124124
resultLayer.remove();
125125
}
126126
}
@@ -174,18 +174,18 @@
174174
</head>
175175

176176
<body onload="init()">
177-
<div id="preview" style="display: none; text-align: center; padding-top: 250px; font-weight: bold">
178-
<img src="../../img/common/39-1.gif" alt='' />
179-
<br />
180-
<br />
181-
<span>正在执行叠加分析,请稍候</span>
182-
</div>
183-
<div class="ToolLib">
184-
<input type="button" class="ButtonLib" value="图层叠加分析" onclick="OverlayByLayerAnalysis()" />
185-
<input type="button" class="ButtonLib" value="清除结果" onclick="clearA()" />
186-
</div>
187-
<div id="leaf_map" style="width: 100%; height: 90%; position: absolute">
188-
</div>
177+
<div id="preview" style="display: none; text-align: center; padding-top: 250px; font-weight: bold">
178+
<img src="../../img/common/39-1.gif" alt=''/>
179+
<br/>
180+
<br/>
181+
<span>正在执行叠加分析,请稍候</span>
182+
</div>
183+
<div class="ToolLib">
184+
<input type="button" class="ButtonLib" value="图层叠加分析" onclick="OverlayByLayerAnalysis()"/>
185+
<input type="button" class="ButtonLib" value="清除结果" onclick="clearA()"/>
186+
</div>
187+
<div id="leaf_map" style="width: 100%; height: 90%; position: absolute">
188+
</div>
189189
</body>
190190

191191
</html>

0 commit comments

Comments
 (0)