Commit 7e6a9bb
7758+ this.attribution = "© 2018 百度 <a href='http://mapv.baidu.com' target='_blank'>MapV</a> with <span>© <a target='_blank' href='http://iclient.supermap.io' " +77557759 "style='color: #08c;text-decoration: none;'>SuperMap iClient</a></span>";77567760
77577761 this.CLASS_NAME = "SuperMap.Layer.MapVLayer";@@ -8951,7 +8955,7 @@ SuperMap_SuperMap.REST.AddressMatchService = services_AddressMatchService_Addres89518955 * @param {number} options.length - 服务访问地址数组长度。89528956 * @param {SuperMap.ServerType} [options.serverType=SuperMap.ServerType.ISERVER] - 服务器类型,iServer|iPortal|Online。89538957 * @param {Object} [options.eventListeners] - 事件监听器对象。有 processCompleted 属性可传入处理完成后的回调函数。processFailed 属性传入处理失败后的回调函数。8954-*/8958+ */89558959class ProcessingServiceBase_ProcessingServiceBase extends CommonServiceBase_CommonServiceBase {89568960
89578961 constructor(url, options) {@@ -8985,12 +8989,18 @@ class ProcessingServiceBase_ProcessingServiceBase extends CommonServiceBase_Comm89858989 */89868990 getJobs(url) {89878991 var me = this;8988- FetchRequest.get(me._processUrl(url), null, {proxy: me.proxy}).then(function (response) {8992+ FetchRequest.get(me._processUrl(url), null, {8993+ proxy: me.proxy8994+ }).then(function (response) {89898995 return response.json();89908996 }).then(function (result) {8991- me.events.triggerEvent("processCompleted", {result: result});8997+ me.events.triggerEvent("processCompleted", {8998+ result: result8999+ });89929000 }).catch(function (e) {8993- me.eventListeners.processFailed({error: e});9001+ me.eventListeners.processFailed({9002+ error: e9003+ });89949004 });89959005 }89969006
@@ -9003,14 +9013,19 @@ class ProcessingServiceBase_ProcessingServiceBase extends CommonServiceBase_Comm90039013 * @param {number} seconds - 开始创建后,获取创建成功结果的时间间隔。90049014 */90059015 addJob(url, params, paramType, seconds) {9006- var me = this, parameterObject = null;9016+ var me = this,9017+ parameterObject = null;90079018 if (params && params instanceof paramType) {90089019 parameterObject = new Object();90099020 paramType.toObject(params, parameterObject);90109021 }90119022 var options = {90129023 proxy: me.proxy,9013- headers: {'Content-Type': 'application/x-www-form-urlencoded'}9024+ headers: {9025+ 'Content-Type': 'application/x-www-form-urlencoded'9026+ },9027+ withCredentials: me.withCredentials,9028+ isInTheSameDomain: me.isInTheSameDomain90149029 };90159030 FetchRequest.post(me._processUrl(url), JSON.stringify(parameterObject), options).then(function (response) {90169031 return response.json();@@ -9021,7 +9036,9 @@ class ProcessingServiceBase_ProcessingServiceBase extends CommonServiceBase_Comm90219036 me.serviceProcessFailed(result);90229037 }90239038 }).catch(function (e) {9024- me.serviceProcessFailed({error: e});9039+ me.serviceProcessFailed({9040+ error: e9041+ });90259042 });90269043 }90279044
@@ -9031,23 +9048,35 @@ class ProcessingServiceBase_ProcessingServiceBase extends CommonServiceBase_Comm90319048 var me = this;90329049 if (result) {90339050 var id = setInterval(function () {9034- FetchRequest.get(me._processUrl(result.newResourceLocation), {_t: new Date().getTime()})9051+ FetchRequest.get(me._processUrl(result.newResourceLocation), {9052+ _t: new Date().getTime()9053+ })90359054 .then(function (response) {90369055 return response.json();90379056 }).then(function (job) {9038- me.events.triggerEvent("processRunning", {id: job.id, state: job.state});9039- if (job.state.runState === 'LOST' || job.state.runState === 'KILLED' || job.state.runState === 'FAILED') {9040- clearInterval(id);9041- me.events.triggerEvent("processFailed", {error: job.state.errorMsg, state: job.state.runState});9042- }9043- if (job.state.runState === 'FINISHED' && job.setting.serviceInfo) {9057+ me.events.triggerEvent("processRunning", {9058+ id: job.id,9059+ state: job.state9060+ });9061+ if (job.state.runState === 'LOST' || job.state.runState === 'KILLED' || job.state.runState === 'FAILED') {9062+ clearInterval(id);9063+ me.events.triggerEvent("processFailed", {9064+ error: job.state.errorMsg,9065+ state: job.state.runState9066+ });9067+ }9068+ if (job.state.runState === 'FINISHED' && job.setting.serviceInfo) {9069+ clearInterval(id);9070+ me.events.triggerEvent("processCompleted", {9071+ result: job9072+ });9073+ }9074+ }).catch(function (e) {90449075 clearInterval(id);9045- me.events.triggerEvent("processCompleted", {result: job});9046- }9047- }).catch(function (e) {9048- clearInterval(id);9049- me.events.triggerEvent("processFailed", {error: e});9050- });9076+ me.events.triggerEvent("processFailed", {9077+ error: e9078+ });9079+ });90519080 }, seconds);90529081 }90539082 }@@ -9070,7 +9099,6 @@ class ProcessingServiceBase_ProcessingServiceBase extends CommonServiceBase_Comm90709099}90719100
90729101SuperMap.ProcessingServiceBase = ProcessingServiceBase_ProcessingServiceBase;9073-90749102// CONCATENATED MODULE: ./src/common/iServer/KernelDensityJobsService.js90759103/* Copyright© 2000 - 2018 SuperMap Software Co.Ltd. All rights reserved.90769104 * This program are made available under the terms of the Apache License, Version 2.0
0 commit comments