Skip to content

Commit 3e8999c

Browse files
committed
【fix】ol Graphic.js 图层不可见还能被选中的问题。fix 部分classic和ol示例缺陷。review by songym.
1 parent ba9c55a commit 3e8999c

14 files changed

+2928
-2852
lines changed

dist/openlayers/iclient9-openlayers-es6.js

Lines changed: 493 additions & 510 deletions
Large diffs are not rendered by default.

dist/openlayers/iclient9-openlayers-es6.min.js

Lines changed: 423 additions & 422 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/openlayers/iclient9-openlayers.css

Lines changed: 1017 additions & 949 deletions
Large diffs are not rendered by default.

dist/openlayers/iclient9-openlayers.js

Lines changed: 486 additions & 502 deletions
Large diffs are not rendered by default.

dist/openlayers/iclient9-openlayers.min.css

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/openlayers/iclient9-openlayers.min.js

Lines changed: 422 additions & 418 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

examples/classic/map_overlayLayer.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<!--********************************************************************
22
* Copyright© 2000 - 2018 SuperMap Software Co.Ltd. All rights reserved.
33
*********************************************************************-->
4-
<!DOCTYPE>
4+
<!DOCTYPE html>
55
<html>
66
<head>
77
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>

examples/classic/query_editFeature.html

Lines changed: 36 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -37,10 +37,14 @@
3737
<div class='panel-heading'>
3838
<h5 class='panel-title text-center' data-i18n="resources.title_editFeature"></h5></div>
3939
<div class='panel-body content'>
40-
<input type="button" class="btn btn-default" data-i18n="[value]resources.btn_addFeature" onclick="activateAddFeature()"/>
41-
<input type="button" class="btn btn-default" data-i18n="[value]resources.btn_selectFeature" onclick="activateSelectedFeature()"/>
42-
<input type="button" class="btn btn-default" data-i18n="[value]resources.btn_editFeature" onclick="editselectedFeature()"/>
43-
<input type="button" class="btn btn-default" data-i18n="[value]resources.btn_deleteFeature" onclick="deleteSelectedFeature()"/>
40+
<input type="button" class="btn btn-default" data-i18n="[value]resources.btn_addFeature"
41+
onclick="activateAddFeature()"/>
42+
<input type="button" class="btn btn-default" data-i18n="[value]resources.btn_selectFeature"
43+
onclick="activateSelectedFeature()"/>
44+
<input type="button" class="btn btn-default" data-i18n="[value]resources.btn_editFeature"
45+
onclick="editselectedFeature()"/>
46+
<input type="button" class="btn btn-default" data-i18n="[value]resources.btn_deleteFeature"
47+
onclick="deleteSelectedFeature()"/>
4448
</div>
4549
</div>
4650
<div id="map"></div>
@@ -96,13 +100,34 @@ <h5 class='panel-title text-center' data-i18n="resources.title_editFeature"></h5
96100
function addLayer() {
97101
map.addLayers([layer, vectorLayer]);
98102
map.setCenter(new SuperMap.LonLat(117, 40), 0);
103+
readDataToVectorLayer();
104+
}
105+
106+
//每次操作后,更新VectorLayer上的要素
107+
function readDataToVectorLayer() {
108+
var GetFeaturesByBoundsParameters, getFeaturesByGeometryService;
109+
GetFeaturesByBoundsParameters = new SuperMap.REST.GetFeaturesByBoundsParameters({
110+
datasetNames: ["Jingjin:BaseMap_R"],
111+
spatialQueryMode: SuperMap.REST.SpatialQueryMode.INTERSECT,
112+
bounds: map.getExtent()
113+
});
114+
getFeaturesByGeometryService = new SuperMap.REST.GetFeaturesByBoundsService(url3, {
115+
eventListeners: {
116+
"processCompleted": function (e) {
117+
console.log(e);
118+
vectorLayer.addFeatures(e.result.features);
119+
},
120+
"processFailed": null
121+
}
122+
});
123+
getFeaturesByGeometryService.processAsync(GetFeaturesByBoundsParameters);
99124
}
100125

101126
//激活添加地物
102127
function activateAddFeature() {
103128
widgets.alert.clearAlert();
104129
//先清除上次的显示结果
105-
vectorLayer.removeAllFeatures();
130+
// vectorLayer.removeAllFeatures();
106131
clearAllDeactivate();
107132
drawPolygon.activate();
108133
}
@@ -147,11 +172,13 @@ <h5 class='panel-title text-center' data-i18n="resources.title_editFeature"></h5
147172
if ((addResultIds && addResultIds.length > 0) || (resourceInfo && resourceInfo.succeed)) {
148173
widgets.alert.showAlert(resources.msg_addFeatureSuccess, true, 240);
149174
vectorLayer.removeAllFeatures();
175+
readDataToVectorLayer();
150176
//重新加载图层
151177
layer.redraw();
152178
} else {
153179
widgets.alert.showAlert(resources.msg_addFeatureFailed, false, 240);
154180
}
181+
155182
}
156183

157184
function processFailed(e) {
@@ -161,7 +188,6 @@ <h5 class='panel-title text-center' data-i18n="resources.title_editFeature"></h5
161188
//激活选择地物
162189
function activateSelectedFeature() {
163190
widgets.alert.clearAlert();
164-
vectorLayer.removeAllFeatures();
165191
clearAllDeactivate();
166192
drawPoint.activate();
167193
}
@@ -194,6 +220,7 @@ <h5 class='panel-title text-center' data-i18n="resources.title_editFeature"></h5
194220
originFeatures = getFeaturesEventArgs.originResult.features,
195221
result = getFeaturesEventArgs.result;
196222
vectorLayer.removeAllFeatures();
223+
197224
if (originFeatures === null || originFeatures.length === 0) {
198225
widgets.alert.showAlert(resources.msg_queryFeatureEmpty, false, 240);
199226
return;
@@ -211,6 +238,7 @@ <h5 class='panel-title text-center' data-i18n="resources.title_editFeature"></h5
211238
vectorLayer.addFeatures(feature);
212239
}
213240
}
241+
readDataToVectorLayer();
214242
}
215243

216244
//激活编辑地物
@@ -274,6 +302,7 @@ <h5 class='panel-title text-center' data-i18n="resources.title_editFeature"></h5
274302
else {
275303
widgets.alert.showAlert(resources.msg_updateFeatureFailed, false, 240);
276304
}
305+
readDataToVectorLayer();
277306
}
278307

279308
//删除选中地物
@@ -307,6 +336,7 @@ <h5 class='panel-title text-center' data-i18n="resources.title_editFeature"></h5
307336
widgets.alert.showAlert(resources.msg_deleteFeatureSuccess, true, 240);
308337
//重新加载图层
309338
vectorLayer.removeAllFeatures();
339+
readDataToVectorLayer();
310340
layer.redraw();
311341
}
312342
else {

examples/locales/en-US/resources.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -437,10 +437,10 @@ window.examplesResources = {
437437
"title_tiandituLayer_ll": "Tianditu - Latitude and Longitude",
438438
"title_tiandituLayer_mecartor": "Tianditu - Mercator",
439439
"title_vectorTiledLayer": "Vector Tile Layer",
440-
"title_turfClassificationAnalysis": "Turf Classification Analysis",
441-
"title_turfGridAnalysis": "Turf Grid Analysis",
442-
"title_turfInterpolationAnalysis": "Turf Interpolation Analysis",
443-
"title_turfMeasurement": "Turf Measurement Analysis",
440+
"title_turfClassificationAnalysis": "Classification Analysis",
441+
"title_turfGridAnalysis": "Grid Analysis",
442+
"title_turfInterpolationAnalysis": "Interpolation Analysis",
443+
"title_turfMeasurement": "Measurement",
444444
"title_WMSLayer": "WMS Layer",
445445
"title_WMTSLayer": "WMTS Layer",
446446
"title_cloudLayer": "SuperMap Cloud",
@@ -470,7 +470,7 @@ window.examplesResources = {
470470
"title_l_echartsEarthquake": "Earthquake heat map (2000-2015)",
471471
"title_lianjia": "Beijing house prices of Lianjia(2018.2)",
472472
"title_l_echartsEarthquake1": "2008 to 2017 years of earthquake statistics",
473-
"title_echartsLinesMillions_bjRoads": "Use lines to draw 2 millions Beijing's roads",
473+
"title_echartsLinesMillions_bjRoads": "Use lines to draw 1.3 millions Beijing's roads",
474474
"title_echartsLinesMillions_railways": "Use lines to draw 4 millions Chinese railways",
475475
"title_echartsLinesMillions_waterSystem": "Use lines to draw 14 millions Chinese water system",
476476
"title_echartsLinesMillions_roads": "Use lines to draw 25 millions Chinese roads",
@@ -1118,7 +1118,7 @@ window.examplesResources = {
11181118
"text_l_echartsEarthquake": "The heatmap of earthquake data from 2008 to 2017",
11191119
"text_l_echartsEarthquake_x_coordinate": "month",
11201120
"text_echartsLinesMillions_bjRoads": "Beijing Road Network",
1121-
"text_echartsLinesMillions_bjRoads_subtext": "drawn by 2 million points",
1121+
"text_echartsLinesMillions_bjRoads_subtext": "drawn by 1.3 million points",
11221122
"text_echartsLinesMillions_railways": "National Railway Network",
11231123
"text_echartsLinesMillions_railways_subtext": "drawn by 4 million points",
11241124
"text_echartsLinesMillions_waterSystem": "National Water System",

examples/locales/zh-CN/resources.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -381,10 +381,10 @@ window.examplesResources = {
381381
"title_tiandituLayer_ll": "天地图-经纬度",
382382
"title_tiandituLayer_mecartor": "天地图-墨卡托",
383383
"title_vectorTiledLayer": "矢量瓦片",
384-
"title_turfClassificationAnalysis": "Turf 分类分析",
385-
"title_turfGridAnalysis": "Turf 格网分析",
386-
"title_turfInterpolationAnalysis": "Turf 插值分析",
387-
"title_turfMeasurement": "turf.js客户端测量分析",
384+
"title_turfClassificationAnalysis": "分类分析",
385+
"title_turfGridAnalysis": "格网分析",
386+
"title_turfInterpolationAnalysis": "插值分析",
387+
"title_turfMeasurement": "测量计算",
388388
"title_WMSLayer": "WMS 图层",
389389
"title_WMTSLayer": "WMTS 图层",
390390
"title_cloudLayer": "超图云",
@@ -415,7 +415,7 @@ window.examplesResources = {
415415
"title_lianjia": "2018年2月北京房价信息",
416416
"title_mapvLianjia_Beijing_price": "2018年2月北京房价",
417417
"title_l_echartsEarthquake1": "2008到2017年地震情况统计",
418-
"title_echartsLinesMillions_bjRoads": "北京道路网络图(200万点数据绘制)",
418+
"title_echartsLinesMillions_bjRoads": "北京道路网络图(130万点数据绘制)",
419419
"title_echartsLinesMillions_railways": "全国铁路网络图(400万点数据绘制)",
420420
"title_echartsLinesMillions_waterSystem": "全国水系图(1400万点数据绘制)",
421421
"title_echartsLinesMillions_roads": "全国道路网络图(2500万点数据绘制)",
@@ -1062,7 +1062,7 @@ window.examplesResources = {
10621062
"text_l_echartsEarthquake": "2008年到2017年地震数据热力图",
10631063
"text_l_echartsEarthquake_x_coordinate": "月份",
10641064
"text_echartsLinesMillions_bjRoads": "北京道路网络图",
1065-
"text_echartsLinesMillions_bjRoads_subtext": "200万点数据绘制",
1065+
"text_echartsLinesMillions_bjRoads_subtext": "130万点数据绘制",
10661066
"text_echartsLinesMillions_railways": "全国铁路网络图",
10671067
"text_echartsLinesMillions_railways_subtext": "400万点数据绘制",
10681068
"text_echartsLinesMillions_waterSystem": "全国水系图",

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy