Skip to content

Commit 8c12251

Browse files
committed
openlayers对接webmap fix 数据查询只会返回20个点的问题和不同坐标系转换问题
1 parent 8b19a70 commit 8c12251

File tree

8 files changed

+5285
-4864
lines changed

8 files changed

+5285
-4864
lines changed

dist/leaflet/include-leaflet.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,9 +78,9 @@
7878
}
7979
if (!inArray(excludes, 'iclient9-leaflet')) {
8080
if (supportES6()) {
81-
inputScript("../../dist/leaflet/iclient9-leaflet-es6.min.js");
81+
inputScript("../../dist/leaflet/iclient9-leaflet-es6.js");
8282
} else {
83-
inputScript("../../dist/leaflet/iclient9-leaflet.min.js");
83+
inputScript("../../dist/leaflet/iclient9-leaflet.js");
8484
}
8585
}
8686
if (inArray(includes, 'iclient9-leaflet-css')) {

dist/openlayers/iclient9-openlayers-es6.js

Lines changed: 2556 additions & 2404 deletions
Large diffs are not rendered by default.

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

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/openlayers/iclient9-openlayers.js

Lines changed: 2506 additions & 2373 deletions
Large diffs are not rendered by default.

dist/openlayers/iclient9-openlayers.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/leaflet/mapping/WebMap.js

Lines changed: 22 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -800,8 +800,7 @@ export var WebMap = L.LayerGroup.extend({
800800
} else {
801801
addFeatures(sFeaturesArr);
802802
}
803-
}, function () {
804-
});
803+
}, function () {});
805804
} else {
806805
var newFeautures = [],
807806
features = layerInfo.features;
@@ -1106,41 +1105,31 @@ export var WebMap = L.LayerGroup.extend({
11061105
"convertType": convertType,
11071106
"points": epsgArray
11081107
};
1109-
var url = this.url + "coordconvert.json";
1108+
var url = this.server + "/apps/viewer/coordconvert.json";
11101109
postData = JSON.stringify(postData);
1111-
var options = {
1112-
url: url,
1113-
isInTheSameDomain: true,
1114-
data: postData,
1115-
method: "POST",
1116-
success: function (success) {
1117-
return function (res) {
1118-
if (success) {
1119-
var newCoors = JSON.parse(res.responseText);
1120-
if (!point && point.length !== undefined) {
1121-
newCoors = newCoors[0];
1122-
}
1123-
me.fire('coordconvertsuccess', {
1124-
newCoors: newCoors
1125-
});
1126-
success.call(me, newCoors);
1127-
}
1128-
}
1129-
}(success),
1130-
failure: function (err) {
1131-
if (!me.actived) {
1132-
return;
1133-
}
1134-
me.fire('coordconvertfailed', {
1135-
err: err
1136-
});
1137-
},
1138-
scope: this
1139-
};
1110+
var options = {};
11401111
if (!Util.isInTheSameDomain(url) && this.proxy) {
11411112
options.proxy = this.proxy;
11421113
}
1143-
Util.committer(options);
1114+
Request.post(url, postData, options).then((response) => {
1115+
return response.json()
1116+
}).then((jsonObj) => {
1117+
var newCoors = jsonObj;
1118+
if (!point && point.length !== undefined) {
1119+
newCoors = newCoors[0];
1120+
}
1121+
this.fire('coordconvertsuccess', {
1122+
newCoors: newCoors
1123+
});
1124+
success.call(this, newCoors);
1125+
}).catch((err) => {
1126+
if (!this.actived) {
1127+
return;
1128+
}
1129+
this.fire('coordconvertfailed', {
1130+
err: err
1131+
});
1132+
})
11441133
},
11451134
getSQLFromFilter: function (filter) {
11461135

src/openlayers/mapping/ImageSuperMapRest.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ export class ImageSuperMapRest extends ol.source.TileImage {
8888
layerUrl += "&transparent=" + transparent;
8989

9090
//是否使用缓存吗,默认为true
91-
var cacheEnabled = options.cacheEnabled !== undefined ? options.cacheEnabled : true;;
91+
var cacheEnabled = options.cacheEnabled !== undefined ? options.cacheEnabled : true;
9292
layerUrl += "&cacheEnabled=" + cacheEnabled;
9393

9494
//如果有layersID,则是在使用专题图

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