Skip to content

Commit 6299972

Browse files
committed
fix 临时图层信息设置服务接口错误问题
1 parent 6c2eeaf commit 6299972

File tree

13 files changed

+72
-164
lines changed

13 files changed

+72
-164
lines changed

dist/iclient9-leaflet.js

Lines changed: 14 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -33002,23 +33002,21 @@ var LayerInfoService = exports.LayerInfoService = _ServiceBase.ServiceBase.exten
3300233002
return;
3300333003
}
3300433004
var me = this,
33005-
tempLayerID = params.tempLayerID,
33006-
layerPath = params.layerPath,
3300733005
resourceID = params.resourceID,
33006+
tempLayerName = params.tempLayerName,
3300833007
layerInfoParams = params.layerInfo;
33009-
if (!tempLayerID || !layerPath || !resourceID) {
33008+
if (!resourceID || !tempLayerName) {
3301033009
return;
3301133010
}
3301233011
var url = me.url.concat();
33013-
url += "/tempLayersSet/" + tempLayerID + "/" + layerPath;
33012+
url += "/tempLayersSet/" + resourceID + "/" + tempLayerName;
3301433013

3301533014
var setLayerInfoService = new _SetLayerInfoService2["default"](url, {
3301633015
serverType: me.options.serverType,
3301733016
eventListeners: {
3301833017
processCompleted: callback,
3301933018
processFailed: callback
33020-
},
33021-
resourceID: resourceID
33019+
}
3302233020
});
3302333021

3302433022
setLayerInfoService.processAsync(layerInfoParams);
@@ -54251,29 +54249,21 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
5425154249
* @class SuperMap.SetLayerInfoParameters
5425254250
* @classdesc 设置图层信息参数类.
5425354251
* @param options -{Object} 可选参数。如:<br>
54254-
* tempLayerID -{string} 临时图层的资源ID。<br>
54255-
* layerName -{string} 图层资源名。<br>
54256-
* resourceID -{string} 资源ID。<br>
54252+
* resourceID -{string} 临时图层的资源ID。<br>
54253+
* tempLayerName -{string} 临时图层下的子图层名。<br>
5425754254
* layerInfo -{string} 要更新的图层信息。
5425854255
*/
5425954256
var SetLayerInfoParameters = function () {
5426054257

5426154258
/**
54262-
* @member SuperMap.SetLayerInfoParameters.prototype.resourceID -{string}
54263-
* @description 资源ID,
54264-
*/
54265-
54266-
54267-
/**
54268-
* @member SuperMap.SetLayerInfoParameters.prototype.tempLayerID -{string}
54269-
* @description 临时图层的资源ID
54259+
* @member SuperMap.SetLayerInfoParameters.prototype.tempLayerName -{string}
54260+
* @description 临时图层下子图层(或者其子图层)名,如:Countries@World.3@@World
5427054261
*/
5427154262
function SetLayerInfoParameters(options) {
5427254263
_classCallCheck(this, SetLayerInfoParameters);
5427354264

54274-
this.tempLayerID = null;
54275-
this.layerName = null;
5427654265
this.resourceID = null;
54266+
this.tempLayerName = null;
5427754267
this.layerInfo = null;
5427854268
this.CLASS_NAME = "SuperMap.SetLayerInfoParameters";
5427954269

@@ -54294,18 +54284,17 @@ var SetLayerInfoParameters = function () {
5429454284

5429554285

5429654286
/**
54297-
* @member SuperMap.SetLayerInfoParameters.prototype.layerName -{string}
54298-
* @description 图层资源名
54287+
* @member SuperMap.SetLayerInfoParameters.prototype.resourceID -{string}
54288+
* @description 临时图层的资源ID
5429954289
*/
5430054290

5430154291

5430254292
_createClass(SetLayerInfoParameters, [{
5430354293
key: "destroy",
5430454294
value: function destroy() {
5430554295
var me = this;
54306-
me.tempLayerID = null;
54307-
me.layerName = null;
5430854296
me.resourceID = null;
54297+
me.tempLayerName = null;
5430954298
me.layerInfo = null;
5431054299
}
5431154300
}]);
@@ -54373,13 +54362,11 @@ var SetLayerInfoService = function (_CommonServiceBase) {
5437354362

5437454363
var _this = _possibleConstructorReturn(this, (SetLayerInfoService.__proto__ || Object.getPrototypeOf(SetLayerInfoService)).call(this, url, options));
5437554364

54376-
_this.resourceID = null;
5437754365
_this.CLASS_NAME = "SuperMap.SetLayerInfoService";
5437854366

5437954367
if (options) {
5438054368
_SuperMap2["default"].Util.extend(_this, options);
5438154369
}
54382-
_this.resourceID = options.resourceID;
5438354370
return _this;
5438454371
}
5438554372

@@ -54388,12 +54375,6 @@ var SetLayerInfoService = function (_CommonServiceBase) {
5438854375
*/
5438954376

5439054377

54391-
/**
54392-
* @member SuperMap.SetLayerInfoService.prototype.resourceID - {string}
54393-
* @description 图层资源ID,临时图层的资源ID标记。
54394-
*/
54395-
54396-
5439754378
_createClass(SetLayerInfoService, [{
5439854379
key: 'destroy',
5439954380
value: function destroy() {
@@ -54779,13 +54760,13 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
5477954760
* @classdesc 设置图层信息参数类
5478054761
* @param options -{Object} 可选参数。如:<br>
5478154762
* isTempLayers -{boolean} 是否是临时图层。<br>
54782-
* resourceID -{string} 资源ID。<br>
54763+
* resourceID -{string} 临时图层资源ID。<br>
5478354764
* layerInfo -{string} 要更新的图层信息。
5478454765
*/
5478554766
var SetLayersInfoParameters = function () {
5478654767
/**
5478754768
* @member SuperMap.SetLayersInfoParameters.prototype.resourceID -{string}
54788-
* @description 资源ID
54769+
* @description 临时图层资源ID
5478954770
*/
5479054771
function SetLayersInfoParameters(options) {
5479154772
_classCallCheck(this, SetLayersInfoParameters);

dist/iclient9-leaflet.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/iclient9-mapboxgl.js

Lines changed: 17 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -26291,22 +26291,20 @@ var LayerInfoService = function (_ServiceBase) {
2629126291
return;
2629226292
}
2629326293
var me = this,
26294-
tempLayerID = params.tempLayerID,
26295-
layerPath = params.layerPath,
2629626294
resourceID = params.resourceID,
26295+
tempLayerName = params.tempLayerName,
2629726296
layerInfoParams = params.layerInfo;
26298-
if (!tempLayerID || !layerPath || !resourceID) {
26297+
if (!resourceID || !tempLayerName) {
2629926298
return;
2630026299
}
2630126300
var url = me.url.concat();
26302-
url += "/tempLayersSet/" + tempLayerID + "/" + layerPath;
26301+
url += "/tempLayersSet/" + resourceID + "/" + tempLayerName;
2630326302
var setLayerInfoService = new _SetLayerInfoService2.default(url, {
2630426303
serverType: me.options.serverType,
2630526304
eventListeners: {
2630626305
processCompleted: callback,
2630726306
processFailed: callback
26308-
},
26309-
resourceID: resourceID
26307+
}
2631026308
});
2631126309
setLayerInfoService.processAsync(layerInfoParams);
2631226310
}
@@ -47599,29 +47597,21 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
4759947597
* @class SuperMap.SetLayerInfoParameters
4760047598
* @classdesc 设置图层信息参数类.
4760147599
* @param options -{Object} 可选参数。如:<br>
47602-
* tempLayerID -{string} 临时图层的资源ID。<br>
47603-
* layerName -{string} 图层资源名。<br>
47604-
* resourceID -{string} 资源ID。<br>
47600+
* resourceID -{string} 临时图层的资源ID。<br>
47601+
* tempLayerName -{string} 临时图层下的子图层名。<br>
4760547602
* layerInfo -{string} 要更新的图层信息。
4760647603
*/
4760747604
var SetLayerInfoParameters = function () {
4760847605

4760947606
/**
47610-
* @member SuperMap.SetLayerInfoParameters.prototype.resourceID -{string}
47611-
* @description 资源ID,
47612-
*/
47613-
47614-
47615-
/**
47616-
* @member SuperMap.SetLayerInfoParameters.prototype.tempLayerID -{string}
47617-
* @description 临时图层的资源ID
47607+
* @member SuperMap.SetLayerInfoParameters.prototype.tempLayerName -{string}
47608+
* @description 临时图层下子图层(或者其子图层)名,如:Countries@World.3@@World
4761847609
*/
4761947610
function SetLayerInfoParameters(options) {
4762047611
_classCallCheck(this, SetLayerInfoParameters);
4762147612

47622-
this.tempLayerID = null;
47623-
this.layerName = null;
4762447613
this.resourceID = null;
47614+
this.tempLayerName = null;
4762547615
this.layerInfo = null;
4762647616
this.CLASS_NAME = "SuperMap.SetLayerInfoParameters";
4762747617

@@ -47642,18 +47632,17 @@ var SetLayerInfoParameters = function () {
4764247632

4764347633

4764447634
/**
47645-
* @member SuperMap.SetLayerInfoParameters.prototype.layerName -{string}
47646-
* @description 图层资源名
47635+
* @member SuperMap.SetLayerInfoParameters.prototype.resourceID -{string}
47636+
* @description 临时图层的资源ID
4764747637
*/
4764847638

4764947639

4765047640
_createClass(SetLayerInfoParameters, [{
4765147641
key: "destroy",
4765247642
value: function destroy() {
4765347643
var me = this;
47654-
me.tempLayerID = null;
47655-
me.layerName = null;
4765647644
me.resourceID = null;
47645+
me.tempLayerName = null;
4765747646
me.layerInfo = null;
4765847647
}
4765947648
}]);
@@ -47721,13 +47710,11 @@ var SetLayerInfoService = function (_CommonServiceBase) {
4772147710

4772247711
var _this = _possibleConstructorReturn(this, (SetLayerInfoService.__proto__ || Object.getPrototypeOf(SetLayerInfoService)).call(this, url, options));
4772347712

47724-
_this.resourceID = null;
4772547713
_this.CLASS_NAME = "SuperMap.SetLayerInfoService";
4772647714

4772747715
if (options) {
4772847716
_SuperMap2.default.Util.extend(_this, options);
4772947717
}
47730-
_this.resourceID = options.resourceID;
4773147718
return _this;
4773247719
}
4773347720

@@ -47736,12 +47723,6 @@ var SetLayerInfoService = function (_CommonServiceBase) {
4773647723
*/
4773747724

4773847725

47739-
/**
47740-
* @member SuperMap.SetLayerInfoService.prototype.resourceID - {string}
47741-
* @description 图层资源ID,临时图层的资源ID标记。
47742-
*/
47743-
47744-
4774547726
_createClass(SetLayerInfoService, [{
4774647727
key: 'destroy',
4774747728
value: function destroy() {
@@ -48127,13 +48108,13 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
4812748108
* @classdesc 设置图层信息参数类
4812848109
* @param options -{Object} 可选参数。如:<br>
4812948110
* isTempLayers -{boolean} 是否是临时图层。<br>
48130-
* resourceID -{string} 资源ID。<br>
48111+
* resourceID -{string} 临时图层资源ID。<br>
4813148112
* layerInfo -{string} 要更新的图层信息。
4813248113
*/
4813348114
var SetLayersInfoParameters = function () {
4813448115
/**
4813548116
* @member SuperMap.SetLayersInfoParameters.prototype.resourceID -{string}
48136-
* @description 资源ID
48117+
* @description 临时图层资源ID
4813748118
*/
4813848119
function SetLayersInfoParameters(options) {
4813948120
_classCallCheck(this, SetLayersInfoParameters);
@@ -72261,6 +72242,8 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_
7226172242
return 'jsonp_' + Date.now() + '_' + Math.ceil(Math.random() * 100000);
7226272243
}
7226372244

72245+
// Known issue: Will throw 'Uncaught ReferenceError: callback_*** is not defined'
72246+
// error if request timeout
7226472247
function clearFunction(functionName) {
7226572248
// IE8 throws an exception when you try to delete a property on window
7226672249
// http://stackoverflow.com/a/1824228/751089
@@ -72273,9 +72256,7 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_
7227372256

7227472257
function removeScript(scriptId) {
7227572258
var script = document.getElementById(scriptId);
72276-
if (script) {
72277-
document.getElementsByTagName('head')[0].removeChild(script);
72278-
}
72259+
document.getElementsByTagName('head')[0].removeChild(script);
7227972260
}
7228072261

7228172262
function fetchJsonp(_url) {
@@ -72313,9 +72294,6 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_
7231372294

7231472295
var jsonpScript = document.createElement('script');
7231572296
jsonpScript.setAttribute('src', '' + url + jsonpCallback + '=' + callbackFunction);
72316-
if (options.charset) {
72317-
jsonpScript.setAttribute('charset', options.charset);
72318-
}
7231972297
jsonpScript.id = scriptId;
7232072298
document.getElementsByTagName('head')[0].appendChild(jsonpScript);
7232172299

@@ -72324,19 +72302,7 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_
7232472302

7232572303
clearFunction(callbackFunction);
7232672304
removeScript(scriptId);
72327-
window[callbackFunction] = function () {
72328-
clearFunction(callbackFunction);
72329-
};
7233072305
}, timeout);
72331-
72332-
// Caught if got 404/500
72333-
jsonpScript.onerror = function () {
72334-
reject(new Error('JSONP request to ' + _url + ' failed'));
72335-
72336-
clearFunction(callbackFunction);
72337-
removeScript(scriptId);
72338-
if (timeoutId) clearTimeout(timeoutId);
72339-
};
7234072306
});
7234172307
}
7234272308

dist/iclient9-mapboxgl.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.

0 commit comments

Comments
 (0)