Dataset Viewer
Auto-converted to Parquet
code
stringlengths
10
343k
docstring
stringlengths
36
21.9k
func_name
stringlengths
1
3.35k
language
stringclasses
1 value
repo
stringlengths
7
58
path
stringlengths
4
131
url
stringlengths
44
195
license
stringclasses
5 values
getSummaryMeshJobs(callback) { return super.getJobs(this.url, callback); }
@function SummaryMeshJobsService.prototype.getSummaryMeshJobs @description 获取点聚合分析任务。 @param {RequestCallback} [callback] - 回调函数,该参数未传时可通过返回的 promise 获取结果。 @returns {Promise} Promise 对象。
getSummaryMeshJobs ( callback )
javascript
SuperMap/iClient-JavaScript
src/common/iServer/SummaryMeshJobsService.js
https://github.com/SuperMap/iClient-JavaScript/blob/master/src/common/iServer/SummaryMeshJobsService.js
Apache-2.0
getSummaryMeshJob(id, callback) { return super.getJobs(Util.urlPathAppend(this.url, id), callback); }
@function SummaryMeshJobsService.prototype.getSummaryMeshJob @description 获取指定 IP 的点聚合分析任务。 @param {string} id - 指定要获取数据的 ID。 @param {RequestCallback} [callback] - 回调函数,该参数未传时可通过返回的 promise 获取结果。 @returns {Promise} Promise 对象。
getSummaryMeshJob ( id , callback )
javascript
SuperMap/iClient-JavaScript
src/common/iServer/SummaryMeshJobsService.js
https://github.com/SuperMap/iClient-JavaScript/blob/master/src/common/iServer/SummaryMeshJobsService.js
Apache-2.0
addSummaryMeshJob(params, seconds, callback, processRunningCallback) { return super.addJob(this.url, params, SummaryMeshJobParameter, seconds, callback, processRunningCallback); }
@function SummaryMeshJobsService.prototype.addSummaryMeshJob @description 新建点聚合分析服务。 @param {SummaryMeshJobParameter} params - 创建一个空间分析的请求参数。 @param {number} seconds - 开始创建后,获取创建成功结果的时间间隔。 @param {RequestCallback} [callback] - 回调函数,该参数未传时可通过返回的 promise 获取结果。 @returns {Promise} Promise 对象。
addSummaryMeshJob ( params , seconds , callback , processRunningCallback )
javascript
SuperMap/iClient-JavaScript
src/common/iServer/SummaryMeshJobsService.js
https://github.com/SuperMap/iClient-JavaScript/blob/master/src/common/iServer/SummaryMeshJobsService.js
Apache-2.0
destroy() { var me = this; me.caption = null; me.unique = null; if (me.style) { me.style.destroy(); me.style = null; } me.visible = null; }
@function ThemeUniqueItem.prototype.destroy @description 释放资源,将引用资源的属性置空。
destroy ( )
javascript
SuperMap/iClient-JavaScript
src/common/iServer/ThemeUniqueItem.js
https://github.com/SuperMap/iClient-JavaScript/blob/master/src/common/iServer/ThemeUniqueItem.js
Apache-2.0
toServerJSONObject() { var obj = {}; obj = Util.copyAttributes(obj, this); if (obj.style) { if (obj.style.toServerJSONObject) { obj.style = obj.style.toServerJSONObject(); } } return obj; }
@function ThemeUniqueItem.prototype.toServerJSONObject @description 转换成对应的 JSON 格式对象。 @returns {Object} 对应的 JSON 格式对象。
toServerJSONObject ( )
javascript
SuperMap/iClient-JavaScript
src/common/iServer/ThemeUniqueItem.js
https://github.com/SuperMap/iClient-JavaScript/blob/master/src/common/iServer/ThemeUniqueItem.js
Apache-2.0
static fromObj(obj) { var res = new ThemeUniqueItem(); Util.copy(res, obj); res.style = ServerStyle.fromJson(obj.style); return res; }
@function ThemeUniqueItem.fromObj @description 从传入对象获取单值专题图子项类。 @param {Object} obj - 传入对象。 @returns {ThemeUniqueItem} ThemeUniqueItem 对象。
fromObj ( obj )
javascript
SuperMap/iClient-JavaScript
src/common/iServer/ThemeUniqueItem.js
https://github.com/SuperMap/iClient-JavaScript/blob/master/src/common/iServer/ThemeUniqueItem.js
Apache-2.0
destroy() { var me = this; me.bounds = null; me.boundsType = null; me.cellSize = null; me.cellSizeType = null; }
@function terrainAnalystSetting.prototype.destroy @description 释放资源,将引用资源的属性置空。
destroy ( )
javascript
SuperMap/iClient-JavaScript
src/common/iServer/terrainAnalystSetting.js
https://github.com/SuperMap/iClient-JavaScript/blob/master/src/common/iServer/terrainAnalystSetting.js
Apache-2.0
destroy() { super.destroy(); }
@function ProcessingServiceBase.prototype.destroy @override
destroy ( )
javascript
SuperMap/iClient-JavaScript
src/common/iServer/ProcessingServiceBase.js
https://github.com/SuperMap/iClient-JavaScript/blob/master/src/common/iServer/ProcessingServiceBase.js
Apache-2.0
getJobs(url, callback) { var me = this; return FetchRequest.get(SecurityManager.appendCredential(url), null, { proxy: me.proxy }).then(function (response) { return response.json(); }).then(function (result) { const res = { result, object: me, type: 'processCompleted' }; callback(res); return res; }).catch(function (e) { const res = { error: e, object: me, type: 'processFailed' }; callback(res); return res; }); }
@function ProcessingServiceBase.prototype.getJobs @description 获取分布式分析任务。 @param {string} url - 资源地址。 @param {RequestCallback} [callback] - 回调函数,该参数未传时可通过返回的 promise 获取结果。 @returns {Promise} Promise 对象。
getJobs ( url , callback )
javascript
SuperMap/iClient-JavaScript
src/common/iServer/ProcessingServiceBase.js
https://github.com/SuperMap/iClient-JavaScript/blob/master/src/common/iServer/ProcessingServiceBase.js
Apache-2.0
addJob(url, params, paramType, seconds, callback, processRunningCallback) { var me = this, parameterObject = null; if (params && params instanceof paramType) { parameterObject = new Object(); paramType.toObject(params, parameterObject); } let headers = Object.assign({ 'Content-Type': 'application/x-www-form-urlencoded' }, me.headers || {}) var options = { proxy: me.proxy, headers, withCredentials: me.withCredentials, crossOrigin: me.crossOrigin, isInTheSameDomain: me.isInTheSameDomain }; return FetchRequest.post(SecurityManager.appendCredential(url), JSON.stringify(parameterObject), options).then(function (response) { return response.json(); }).then(function (result) { if (result.succeed) { return me.transformResult(result, seconds, callback, processRunningCallback); } else { result = me.transformErrorResult(result); result.options = me; result.type = 'processFailed'; callback(result); return result; } }).catch(function (e) { e = me.transformErrorResult({ error: e }); e.options = me; e.type = 'processFailed'; callback(e); return e; }); }
@function ProcessingServiceBase.prototype.addJob @description 添加分布式分析任务。 @param {string} url - 资源根地址。 @param {Object} params - 创建一个空间分析的请求参数。 @param {string} paramType - 请求参数类型。 @param {number} seconds - 开始创建后,获取创建成功结果的时间间隔。 @param {RequestCallback} [callback] - 回调函数,该参数未传时可通过返回的 promise 获取结果。 @param {RequestCallback} [processRunningCallback] - 回调函数。 @returns {Promise} Promise 对象。
addJob ( url , params , paramType , seconds , callback , processRunningCallback )
javascript
SuperMap/iClient-JavaScript
src/common/iServer/ProcessingServiceBase.js
https://github.com/SuperMap/iClient-JavaScript/blob/master/src/common/iServer/ProcessingServiceBase.js
Apache-2.0
getCentersJson(params) { var json = "[", len = params ? params.length : 0; for (var i = 0; i < len; i++) { if (i > 0) { json += ","; } json += Util.toJSON(params[i]); } json += "]"; return json; }
@function FindLocationService.prototype.getCentersJson @description 将数组对象转化为JSON字符串。 @param {Array} params - 需要转换的参数 @returns {string} 转化后的JSON字符串。
getCentersJson ( params )
javascript
SuperMap/iClient-JavaScript
src/common/iServer/FindLocationService.js
https://github.com/SuperMap/iClient-JavaScript/blob/master/src/common/iServer/FindLocationService.js
Apache-2.0
toGeoJSONResult(result) { if (!result) { return null; } var geoJSONFormat = new GeoJSON(); if (result.demandResults) { result.demandResults = geoJSONFormat.toGeoJSON(result.demandResults); } if (result.supplyResults) { result.supplyResults = geoJSONFormat.toGeoJSON(result.supplyResults); } return result; }
@function FindLocationService.prototype.toGeoJSONResult @description 将含有 geometry 的数据转换为 GeoJSON 格式。 @param {Object} result - 服务器返回的结果对象。
toGeoJSONResult ( result )
javascript
SuperMap/iClient-JavaScript
src/common/iServer/FindLocationService.js
https://github.com/SuperMap/iClient-JavaScript/blob/master/src/common/iServer/FindLocationService.js
Apache-2.0
processAsync(params, callback) { if (!(params instanceof FacilityAnalystUpstream3DParameters)) { return; } var me = this, jsonObject; me.url = Util.urlPathAppend(me.url, 'upstreamcirticalfaclilities'); jsonObject = { sourceNodeIDs: params.sourceNodeIDs, edgeID: params.edgeID, nodeID: params.nodeID, isUncertainDirectionValid: params.isUncertainDirectionValid }; return me.request({ method: "GET", params: jsonObject, scope: me, success: callback, failure: callback }); }
@function FacilityAnalystUpstream3DService.prototype.processAsync @description 负责将客户端的查询参数传递到服务端。 @param {FacilityAnalystUpstream3DParameters} params - 上游关键设施查找资源参数类 @param {RequestCallback} [callback] - 回调函数,该参数未传时可通过返回的 promise 获取结果。 @returns {Promise} Promise 对象。
processAsync ( params , callback )
javascript
SuperMap/iClient-JavaScript
src/common/iServer/FacilityAnalystUpstream3DService.js
https://github.com/SuperMap/iClient-JavaScript/blob/master/src/common/iServer/FacilityAnalystUpstream3DService.js
Apache-2.0
getFields(params, callback) { var me = this; var getFieldsService = new GetFieldsService(me.url, { proxy: me.options.proxy, withCredentials: me.options.withCredentials, crossOrigin: me.options.crossOrigin, headers: me.options.headers, datasource: params.datasource, dataset: params.dataset }); return getFieldsService.processAsync(callback); }
@function FieldService.prototype.getFields @description 字段查询服务。 @param {FieldParameters} params - 字段信息查询参数类。 @param {RequestCallback} [callback] - 回调函数,该参数未传时可通过返回的 promise 获取结果。 @returns {Promise} Promise 对象。
getFields ( params , callback )
javascript
SuperMap/iClient-JavaScript
src/common/iServer/FieldService.js
https://github.com/SuperMap/iClient-JavaScript/blob/master/src/common/iServer/FieldService.js
Apache-2.0
getFieldStatisticsInfo(params, callback) { if (!(params instanceof FieldStatisticsParameters)) { return; } var me = this, fieldName = params.fieldName, modes = params.statisticMode; if (modes && !Array.isArray(modes)) { modes = [modes]; } me.currentStatisticResult = {fieldName: fieldName}; me._statisticsCallback = callback; //针对每种统计方式分别进行请求 modes.forEach(mode => { me.currentStatisticResult[mode] = null; me._fieldStatisticRequest(params.datasource, params.dataset, fieldName, mode); }) }
@function FieldService.prototype.getFieldStatisticsInfo @description 字段统计服务。 @param {FieldStatisticsParameters} params - 字段统计信息查询参数类。 @param {RequestCallback} [callback] - 回调函数,该参数未传时可通过返回的 promise 获取结果。
getFieldStatisticsInfo ( params , callback )
javascript
SuperMap/iClient-JavaScript
src/common/iServer/FieldService.js
https://github.com/SuperMap/iClient-JavaScript/blob/master/src/common/iServer/FieldService.js
Apache-2.0
destroy() { var me = this; me.isTempLayers = null; me.resourceID = null; me.layersInfo = null; }
@function SetLayersInfoParameters.prototype.destroy @description 释放资源,将引用资源的属性置空。
destroy ( )
javascript
SuperMap/iClient-JavaScript
src/common/iServer/SetLayersInfoParameters.js
https://github.com/SuperMap/iClient-JavaScript/blob/master/src/common/iServer/SetLayersInfoParameters.js
Apache-2.0
destroy() { this.datasetName = null; this.datasetVectorClip = null; this.geometryClip = null; this.mode = null; if (this.output instanceof OutputSetting) { this.output.destroy(); this.output = null; } if (this.mappingParameters instanceof MappingParameters) { this.mappingParameters.destroy(); this.mappingParameters = null; } }
@function VectorClipJobsParameter.prototype.destroy @description 释放资源,将引用资源的属性置空。
destroy ( )
javascript
SuperMap/iClient-JavaScript
src/common/iServer/VectorClipJobsParameter.js
https://github.com/SuperMap/iClient-JavaScript/blob/master/src/common/iServer/VectorClipJobsParameter.js
Apache-2.0
static toObject(vectorClipJobsParameter, tempObj) { for (var name in vectorClipJobsParameter) { if (name === "datasetName") { tempObj['input'] = tempObj['input'] || {}; tempObj['input'][name] = vectorClipJobsParameter[name]; continue; } if (name === "output"){ tempObj['output'] = tempObj['output'] || {}; tempObj['output'] = vectorClipJobsParameter[name]; continue; } tempObj['analyst'] = tempObj['analyst'] || {}; tempObj['analyst'][name] = vectorClipJobsParameter[name]; if(name === 'mappingParameters'){ tempObj['analyst'][name] = tempObj['analyst'][name] || {}; tempObj['analyst']['mappingParameters'] = vectorClipJobsParameter[name]; } } }
@function VectorClipJobsParameter.toObject @param {Object} vectorClipJobsParameter - 矢量裁剪分析服务参数。 @param {Object} tempObj - 目标对象。 @description 矢量裁剪分析任务对象。
toObject ( vectorClipJobsParameter , tempObj )
javascript
SuperMap/iClient-JavaScript
src/common/iServer/VectorClipJobsParameter.js
https://github.com/SuperMap/iClient-JavaScript/blob/master/src/common/iServer/VectorClipJobsParameter.js
Apache-2.0
destroy() { var me = this; me.displayMode = undefined; me.displayBands = undefined; me.stretchOption = undefined; me.interpolationMode = undefined; me.colorScheme = undefined; me.colorTable = undefined; me.brightness = undefined; me.contrast = undefined; me.noData = undefined; me.noDataColor = undefined; me.noDataTransparent = undefined; me.backgroundValue = undefined; me.backgroundColor = undefined; me.backgroundTransparent = undefined; me.gridFuncOptions = undefined; me.gamma = undefined; }
@function ImageRenderingRule.prototype.destroy @description 释放资源,将引用资源的属性置空。
destroy ( )
javascript
SuperMap/iClient-JavaScript
src/common/iServer/ImageRenderingRule.js
https://github.com/SuperMap/iClient-JavaScript/blob/master/src/common/iServer/ImageRenderingRule.js
Apache-2.0
static constructFromObject(data, obj) { if (data) { obj = obj || new ImageRenderingRule(); if (data.hasOwnProperty('displayMode')) { obj.displayMode = data.displayMode; } if (data.hasOwnProperty('displayBands')) { obj.displayBands = data.displayBands; } if (data.hasOwnProperty('stretchOption')) { obj.stretchOption = (ImageStretchOption.constructFromObject && ImageStretchOption.constructFromObject(data.stretchOption, {})) || data.stretchOption; } if (data.hasOwnProperty('interpolationMode')) { obj.interpolationMode = data.interpolationMode; } if (data.hasOwnProperty('colorScheme')) { obj.colorScheme = data.colorScheme; } if (data.hasOwnProperty('colorTable')) { obj.colorTable = data.colorTable; } if (data.hasOwnProperty('brightness')) { obj.brightness = data.brightness; } if (data.hasOwnProperty('gamma')) { obj.gamma = data.gamma; } if (data.hasOwnProperty('contrast')) { obj.contrast = data.contrast; } if (data.hasOwnProperty('noData')) { obj.noData = data.noData; } if (data.hasOwnProperty('noDataColor')) { obj.noDataColor = data.noDataColor; } if (data.hasOwnProperty('backgroundValue')) { obj.backgroundValue = data.backgroundValue; } if (data.hasOwnProperty('noDataTransparent')) { obj.noDataTransparent = data.noDataTransparent; } if (data.hasOwnProperty('backgroundColor')) { obj.backgroundColor = data.backgroundColor; } if (data.hasOwnProperty('backgroundTransparent')) { obj.backgroundTransparent = data.backgroundTransparent; } if (data.hasOwnProperty('gridFunctions')) { obj.gridFunctions = data.gridFunctions; } } return obj; }
@function ImageRenderingRule.prototype.constructFromObject @description 目标对象新增该类的可选参数。 @param {Object} data 要转换的数据。 @param {ImageRenderingRule} obj 返回的模型。 @return {ImageRenderingRule} 返回结果。
constructFromObject ( data , obj )
javascript
SuperMap/iClient-JavaScript
src/common/iServer/ImageRenderingRule.js
https://github.com/SuperMap/iClient-JavaScript/blob/master/src/common/iServer/ImageRenderingRule.js
Apache-2.0
destroy() { var me = this; me.dotExpression = null; me.value = null; if (me.style) { me.style.destroy(); me.style = null; } }
@function ThemeDotDensity.prototype.destroy @description 释放资源,将引用资源的属性置空。
destroy ( )
javascript
SuperMap/iClient-JavaScript
src/common/iServer/ThemeDotDensity.js
https://github.com/SuperMap/iClient-JavaScript/blob/master/src/common/iServer/ThemeDotDensity.js
Apache-2.0
static fromObj(obj) { if (!obj) { return; } var res = new ThemeDotDensity(); Util.copy(res, obj); res.style = ServerStyle.fromJson(obj.style); return res; }
@function ThemeDotDensity.fromObj @description 从传入对象获取点密度专题图中点的风格。 @param {Object} obj - 传入对象。 @returns {ThemeDotDensity} ThemeDotDensity 对象。
fromObj ( obj )
javascript
SuperMap/iClient-JavaScript
src/common/iServer/ThemeDotDensity.js
https://github.com/SuperMap/iClient-JavaScript/blob/master/src/common/iServer/ThemeDotDensity.js
Apache-2.0
destroy() { var me = this; me.cutFillType = null; me.afterCutFillDataset = null; me.resultDataset = null; me.buildPyramid = null; me.deleteExistResultDataset = null; me.bufferRadius = null; me.isRoundHead = null; me.line3D = null; me.region = null; me.region3D = null; }
@function TerrainCutFillCalculationParameters.prototype.destroy @description 释放资源,将引用资源的属性置空。
destroy ( )
javascript
SuperMap/iClient-JavaScript
src/common/iServer/TerrainCutFillCalculationParameters.js
https://github.com/SuperMap/iClient-JavaScript/blob/master/src/common/iServer/TerrainCutFillCalculationParameters.js
Apache-2.0
static toObject(terrainCutFillCalculationParameters, tempObj) { for (var name in terrainCutFillCalculationParameters) { if (name !== "dataset") { tempObj[name] = terrainCutFillCalculationParameters[name]; } } }
@function TerrainCutFillCalculationParameters.toObject @param {Object} terrainCutFillCalculationParameters - 填挖方计算参数。 @param {Object} tempObj - 目标对象。 @description 填挖方计算对象。
toObject ( terrainCutFillCalculationParameters , tempObj )
javascript
SuperMap/iClient-JavaScript
src/common/iServer/TerrainCutFillCalculationParameters.js
https://github.com/SuperMap/iClient-JavaScript/blob/master/src/common/iServer/TerrainCutFillCalculationParameters.js
Apache-2.0
getJson(isAnalyzeById, params) { var jsonString = "[", len = params ? params.length : 0; if (isAnalyzeById === false) { for (let i = 0; i < len; i++) { if (i > 0) { jsonString += ","; } jsonString += '{"x":' + params[i].x + ',"y":' + params[i].y + '}'; } } else if (isAnalyzeById === true) { for (let i = 0; i < len; i++) { if (i > 0) { jsonString += ","; } jsonString += params[i]; } } jsonString += ']'; return jsonString; }
@function ComputeWeightMatrixService.prototype.getJson @description 将对象转化为 JSON 字符串。 @param {boolean} isAnalyzeById - 是否通过 ID 分析。 @param {Array.<ComputeWeightMatrixParameters>} params - 分析参数数组。 @returns {string} 转化后的 JSON 字符串。
getJson ( isAnalyzeById , params )
javascript
SuperMap/iClient-JavaScript
src/common/iServer/ComputeWeightMatrixService.js
https://github.com/SuperMap/iClient-JavaScript/blob/master/src/common/iServer/ComputeWeightMatrixService.js
Apache-2.0
processAsync(parameter, callback) { var parameterObject = {}; var me = this; if (parameter instanceof DatasetThiessenAnalystParameters) { me.mode = "datasets"; me.url = Util.urlPathAppend(me.url, 'datasets/' + parameter.dataset + '/thiessenpolygon'); DatasetThiessenAnalystParameters.toObject(parameter, parameterObject); } else if (parameter instanceof GeometryThiessenAnalystParameters) { me.mode = "geometry"; me.url = Util.urlPathAppend(me.url, 'geometry/thiessenpolygon'); GeometryThiessenAnalystParameters.toObject(parameter, parameterObject); } var jsonParameters = Util.toJSON(parameterObject); this.returnContent = true; return me.request({ method: "POST", data: jsonParameters, scope: me, success: callback, failure: callback }); }
@function ThiessenAnalystService.prototype.processAsync @description 负责将客户端的查询参数传递到服务端。 @param {DatasetThiessenAnalystParameters|GeometryThiessenAnalystParameters} parameter - 泰森多边形分析参数基类。 @param {RequestCallback} [callback] - 回调函数,该参数未传时可通过返回的 promise 获取结果。 @returns {Promise} Promise 对象。
processAsync ( parameter , callback )
javascript
SuperMap/iClient-JavaScript
src/common/iServer/ThiessenAnalystService.js
https://github.com/SuperMap/iClient-JavaScript/blob/master/src/common/iServer/ThiessenAnalystService.js
Apache-2.0
getLegend(queryParams, callback) { var me = this; var pathParams = { collectionId: me.options.collectionId }; if (typeof queryParams === 'function') { callback = queryParams; queryParams = null; } var path = Util.convertPath('/collections/{collectionId}/legend', pathParams); var url = Util.urlPathAppend(me.url, path); return this._processAsync({ url, method: 'GET', params: queryParams, callback }); }
@function ImageCollectionService.prototype.getLegend @description 返回当前影像集合的图例信息。默认为服务发布所配置的风格,支持根据风格参数生成新的图例。 @param {Object} queryParams query 参数。 @param {ImageRenderingRule} [queryParams.renderingRule] renderingRule 对象,用来指定影像的渲染风格,从而确定图例内容。影像的渲染风格包含拉伸显示方式、颜色表、波段组合以及应用栅格函数进行快速处理等。该参数未设置时,将使用发布服务时所配置的风格。 @param {RequestCallback} [callback] - 回调函数,该参数未传时可通过返回的 promise 获取结果。 @returns {Promise} Promise 对象。
getLegend ( queryParams , callback )
javascript
SuperMap/iClient-JavaScript
src/common/iServer/ImageCollectionService.js
https://github.com/SuperMap/iClient-JavaScript/blob/master/src/common/iServer/ImageCollectionService.js
Apache-2.0
getStatistics(callback) { var me = this; var pathParams = { collectionId: me.options.collectionId }; var path = Util.convertPath('/collections/{collectionId}/statistics', pathParams); var url = Util.urlPathAppend(me.url, path); return this._processAsync({ url, method: 'GET', callback }); }
@function ImageCollectionService.prototype.getStatistics @description 返回当前影像集合的统计信息。包括文件数量,文件大小等信息。 @param {RequestCallback} [callback] - 回调函数,该参数未传时可通过返回的 promise 获取结果。 @returns {Promise} Promise 对象。
getStatistics ( callback )
javascript
SuperMap/iClient-JavaScript
src/common/iServer/ImageCollectionService.js
https://github.com/SuperMap/iClient-JavaScript/blob/master/src/common/iServer/ImageCollectionService.js
Apache-2.0
getTileInfo(callback) { var me = this; var pathParams = { collectionId: me.options.collectionId }; var path = Util.convertPath('/collections/{collectionId}/tileInfo', pathParams); var url = Util.urlPathAppend(me.url, path); return this._processAsync({ url, method: 'GET', callback }); }
@function ImageCollectionService.prototype.getTileInfo @description 返回影像集合所提供的服务瓦片的信息,包括:每层瓦片的分辨率,比例尺等信息,方便前端进行图层叠加。 @param {RequestCallback} [callback] - 回调函数,该参数未传时可通过返回的 promise 获取结果。 @returns {Promise} Promise 对象。
getTileInfo ( callback )
javascript
SuperMap/iClient-JavaScript
src/common/iServer/ImageCollectionService.js
https://github.com/SuperMap/iClient-JavaScript/blob/master/src/common/iServer/ImageCollectionService.js
Apache-2.0
deleteItemByID(featureId, callback) { var me = this; var pathParams = { collectionId: me.options.collectionId, featureId: featureId }; var path = Util.convertPath('/collections/{collectionId}/items/{featureId}', pathParams); var url = Util.urlPathAppend(me.url, path); return this._processAsync({ url, method: 'DELETE', callback }); }
@function ImageCollectionService.prototype.deleteItemByID @description 删除影像集合中指定 ID 的 Item,即从影像集合中删除指定的影像。 @param {string} featureId Feature 的本地标识符。 @param {RequestCallback} [callback] - 回调函数,该参数未传时可通过返回的 promise 获取结果。 @returns {Promise} Promise 对象。
deleteItemByID ( featureId , callback )
javascript
SuperMap/iClient-JavaScript
src/common/iServer/ImageCollectionService.js
https://github.com/SuperMap/iClient-JavaScript/blob/master/src/common/iServer/ImageCollectionService.js
Apache-2.0
getItemByID(featureId, callback) { var me = this; var pathParams = { collectionId: me.options.collectionId, featureId: featureId }; var path = Util.convertPath('/collections/{collectionId}/items/{featureId}', pathParams); var url = Util.urlPathAppend(me.url, path); return this._processAsync({ url, method: 'GET', callback }); }
@function ImageCollectionService.prototype.getItemByID @description 返回指定 ID(`collectionId`)的影像集合中的指定 ID(`featureId`)的 Item 对象,即返回影像集合中指定的影像。 @param {string} featureId Feature 的本地标识符。 @param {RequestCallback} [callback] - 回调函数,该参数未传时可通过返回的 promise 获取结果。 @returns {Promise} Promise 对象。
getItemByID ( featureId , callback )
javascript
SuperMap/iClient-JavaScript
src/common/iServer/ImageCollectionService.js
https://github.com/SuperMap/iClient-JavaScript/blob/master/src/common/iServer/ImageCollectionService.js
Apache-2.0
destroy() { super.destroy(); var me = this; if (me.points) { for (var i = 0, points = me.points, len = points.length; i < len; i++) { points[i].destroy(); } me.points = null; } me.zValues = null; }
@function GeometrySurfaceAnalystParameters.prototype.destroy @override
destroy ( )
javascript
SuperMap/iClient-JavaScript
src/common/iServer/GeometrySurfaceAnalystParameters.js
https://github.com/SuperMap/iClient-JavaScript/blob/master/src/common/iServer/GeometrySurfaceAnalystParameters.js
Apache-2.0
processAsync(parameters, callback) { var me = this; me.url = Util.urlPathAppend(me.url, 'geometry/batchanalyst'); me.url = Util.urlAppend(me.url, 'returnContent=true&ignoreAnalystParam=true'); var parameterObjects = me._processParams(parameters); var jsonParameters = Util.toJSON(parameterObjects); return me.request({ method: "POST", data: jsonParameters, scope: me, success: callback, failure: callback }); }
@function GeometryBatchAnalystService.prototype.processAsync @description 负责将客户端的查询参数传递到服务端。 @param {GeometryOverlayAnalystParameter} parameter - 批量几何对象叠加分析参数类 @param {RequestCallback} [callback] - 回调函数,该参数未传时可通过返回的 promise 获取结果。 @returns {Promise} Promise 对象。
processAsync ( parameters , callback )
javascript
SuperMap/iClient-JavaScript
src/common/iServer/GeometryBatchAnalystService.js
https://github.com/SuperMap/iClient-JavaScript/blob/master/src/common/iServer/GeometryBatchAnalystService.js
Apache-2.0
destroy() { var me = this; me.isAnalyzeById = null; me.hasLeastEdgeCount = null; me.nodes = null; if (me.parameter) { me.parameter.destroy(); me.parameter = null; } }
@function FindPathParameters.prototype.destroy @description 释放资源,将引用资源的属性置空。
destroy ( )
javascript
SuperMap/iClient-JavaScript
src/common/iServer/FindPathParameters.js
https://github.com/SuperMap/iClient-JavaScript/blob/master/src/common/iServer/FindPathParameters.js
Apache-2.0
destroy() { super.destroy(); this.mode = null; this.CLASS_NAME = "SuperMap.InterpolationAnalystService"; }
@function InterpolationAnalystService.prototype.destroy @description 释放资源,将引用资源的属性置空。
destroy ( )
javascript
SuperMap/iClient-JavaScript
src/common/iServer/InterpolationAnalystService.js
https://github.com/SuperMap/iClient-JavaScript/blob/master/src/common/iServer/InterpolationAnalystService.js
Apache-2.0
processAsync(parameter, callback) { var parameterObject = {}; var me = this; if (parameter instanceof InterpolationDensityAnalystParameters) { me.mode = 'Density'; if (parameter.InterpolationAnalystType === 'geometry') { me.url = Util.urlPathAppend(me.url, 'geometry/interpolation/density'); } else { me.url = Util.urlPathAppend(me.url, 'datasets/' + parameter.dataset + '/interpolation/density'); } } else if (parameter instanceof InterpolationIDWAnalystParameters) { me.mode = 'IDW'; if (parameter.InterpolationAnalystType === 'geometry') { me.url = Util.urlPathAppend(me.url, 'geometry/interpolation/idw'); } else { me.url = Util.urlPathAppend(me.url, 'datasets/' + parameter.dataset + '/interpolation/idw'); } } else if (parameter instanceof InterpolationRBFAnalystParameters) { me.mode = 'RBF'; if (parameter.InterpolationAnalystType === 'geometry') { me.url = Util.urlPathAppend(me.url, 'geometry/interpolation/rbf'); } else { me.url = Util.urlPathAppend(me.url, 'datasets/' + parameter.dataset + '/interpolation/rbf'); } } else if (parameter instanceof InterpolationKrigingAnalystParameters) { me.mode = 'Kriging'; if (parameter.InterpolationAnalystType === 'geometry') { me.url = Util.urlPathAppend(me.url, 'geometry/interpolation/kriging'); } else { me.url = Util.urlPathAppend(me.url, 'datasets/' + parameter.dataset + '/interpolation/kriging'); } } InterpolationAnalystParameters.toObject(parameter, parameterObject); var jsonParameters = Util.toJSON(parameterObject); me.url = Util.urlAppend(me.url, 'returnContent=true'); return me.request({ method: "POST", data: jsonParameters, scope: me, success: callback, failure: callback }); }
@function InterpolationAnalystService.prototype.processAsync @description 负责将客户端的查询参数传递到服务端。 @param {InterpolationDensityAnalystParameters|InterpolationIDWAnalystParameters|InterpolationRBFAnalystParameters|InterpolationKrigingAnalystParameters} parameter - 插值分析参数类。 @param {RequestCallback} [callback] - 回调函数,该参数未传时可通过返回的 promise 获取结果。 @returns {Promise} Promise 对象。
processAsync ( parameter , callback )
javascript
SuperMap/iClient-JavaScript
src/common/iServer/InterpolationAnalystService.js
https://github.com/SuperMap/iClient-JavaScript/blob/master/src/common/iServer/InterpolationAnalystService.js
Apache-2.0
destroy() { var me = this; me.resolution = null; if (me.extractParameter) { me.extractParameter.destroy(); me.extractParameter = null; } if (me.resultSetting) { me.resultSetting.destroy(); me.resultSetting = null; } me.surfaceAnalystMethod = null; }
@function SurfaceAnalystParameters.prototype.destroy @description 释放资源,将引用资源的属性置空。
destroy ( )
javascript
SuperMap/iClient-JavaScript
src/common/iServer/SurfaceAnalystParameters.js
https://github.com/SuperMap/iClient-JavaScript/blob/master/src/common/iServer/SurfaceAnalystParameters.js
Apache-2.0
destroy() { super.destroy(); var me = this; me.smooth = null; me.tension = null; me.searchMode = null; me.expectedCount = null; me.maxPointCountForInterpolation = null; me.maxPointCountInNode = null; }
@function InterpolationRBFAnalystParameters.prototype.destroy @description 释放资源,将引用资源的属性置空。
destroy ( )
javascript
SuperMap/iClient-JavaScript
src/common/iServer/InterpolationRBFAnalystParameters.js
https://github.com/SuperMap/iClient-JavaScript/blob/master/src/common/iServer/InterpolationRBFAnalystParameters.js
Apache-2.0
static toObject(datasetInterpolationRBFAnalystParameters, tempObj) { for (var name in datasetInterpolationRBFAnalystParameters) { tempObj[name] = datasetInterpolationRBFAnalystParameters[name]; } }
@function InterpolationRBFAnalystParameters.toObject @param {InterpolationRBFAnalystParameters} datasetInterpolationRBFAnalystParameters - 样条插值(径向基函数插值法)分析参数类。 @param {InterpolationRBFAnalystParameters} tempObj - 样条插值(径向基函数插值法)分析参数对象。 @description 将样条插值(径向基函数插值法)分析参数对象转换为 JSON 对象。 @returns JSON 对象。
toObject ( datasetInterpolationRBFAnalystParameters , tempObj )
javascript
SuperMap/iClient-JavaScript
src/common/iServer/InterpolationRBFAnalystParameters.js
https://github.com/SuperMap/iClient-JavaScript/blob/master/src/common/iServer/InterpolationRBFAnalystParameters.js
Apache-2.0
destroy() { super.destroy(); Util.reset(this); }
@function Grid.prototype.destroy @description 释放资源,将引用资源的属性置空。
destroy ( )
javascript
SuperMap/iClient-JavaScript
src/common/iServer/Grid.js
https://github.com/SuperMap/iClient-JavaScript/blob/master/src/common/iServer/Grid.js
Apache-2.0
fromJson(jsonObject) { super.fromJson(jsonObject); if (this.specialColor) { this.specialColor = new ServerColor(this.specialColor.red, this.specialColor.green, this.specialColor.blue); } if (this.colors) { var colors = [], color; for (var i in this.colors) { color = this.colors[i]; colors.push(new ServerColor(color.red, color.green, color.blue)); } this.colors = colors; } if (this.dashStyle) { this.dashStyle = new ServerStyle(this.dashStyle); } if (this.solidStyle) { this.solidStyle = new ServerStyle(this.solidStyle); } if (this.colorDictionary) { var colorDics = [], colorDic; for (var key in this.colorDictionary) { colorDic = this.colorDictionary[key]; colorDics.push(new ColorDictionary({elevation: key, color: colorDic})); } this.colorDictionarys = colorDics; } delete this.colorDictionary; }
@function Grid.prototype.fromJson @description 将服务端 JSON 对象转换成当前客户端对象。 @param {Object} jsonObject - 要转换的 JSON 对象。
fromJson ( jsonObject )
javascript
SuperMap/iClient-JavaScript
src/common/iServer/Grid.js
https://github.com/SuperMap/iClient-JavaScript/blob/master/src/common/iServer/Grid.js
Apache-2.0
toServerJSONObject() { var jsonObject = super.toServerJSONObject(); if (jsonObject.dashStyle) { if (jsonObject.dashStyle.toServerJSONObject) { jsonObject.dashStyle = jsonObject.dashStyle.toServerJSONObject(); } } if (jsonObject.solidStyle) { if (jsonObject.solidStyle.toServerJSONObject) { jsonObject.solidStyle = jsonObject.solidStyle.toServerJSONObject(); } } return jsonObject; }
@function Grid.prototype.toServerJSONObject @description 转换成对应的 JSON 对象。 @returns JSON 对象。
toServerJSONObject ( )
javascript
SuperMap/iClient-JavaScript
src/common/iServer/Grid.js
https://github.com/SuperMap/iClient-JavaScript/blob/master/src/common/iServer/Grid.js
Apache-2.0
processAsync(params, callback) { if (!(params instanceof FacilityAnalystStreamParameters)) { return; } var me = this, jsonObject; //URL 通过参数类型来判断是 上游 还是下游 查询 if (params.queryType === 0) { me.url = Util.urlPathAppend(me.url, 'upstreamcirticalfaclilities'); } else if (params.queryType === 1) { me.url = Util.urlPathAppend(me.url, 'downstreamcirticalfaclilities'); } else { return; } jsonObject = { sourceNodeIDs: params.sourceNodeIDs, isUncertainDirectionValid: params.isUncertainDirectionValid, returnFeatures: params.returnFeatures }; if (params.edgeID !== null && params.nodeID !== null) { return; } if (params.edgeID === null && params.nodeID === null) { return; } if (params.edgeID !== null) { jsonObject.edgeID = params.edgeID; } else { jsonObject.nodeID = params.nodeID; } return me.request({ method: "GET", params: jsonObject, scope: me, success: callback, failure: callback }); }
@function FacilityAnalystStreamService.prototype.processAsync @description 负责将客户端的查询参数传递到服务端。 @param {FacilityAnalystStreamParameters} params - 上游/下游关键设施查找资源参数类。 @param {RequestCallback} [callback] - 回调函数,该参数未传时可通过返回的 promise 获取结果。 @returns {Promise} Promise 对象。
processAsync ( params , callback )
javascript
SuperMap/iClient-JavaScript
src/common/iServer/FacilityAnalystStreamService.js
https://github.com/SuperMap/iClient-JavaScript/blob/master/src/common/iServer/FacilityAnalystStreamService.js
Apache-2.0
toGeoJSONResult(result) { if (!result) { return null; } var geoJSONFormat = new GeoJSON(); if (result.edgesFeatures) { result.edgesFeatures = geoJSONFormat.toGeoJSON(result.edgesFeatures); } if (result.nodesFeatures) { result.nodesFeatures = geoJSONFormat.toGeoJSON(result.nodesFeatures); } return result; }
@function FacilityAnalystStreamService.prototype.toGeoJSONResult @description 将含有 geometry 的数据转换为 GeoJSON 格式。 @param {Object} result - 服务器返回的结果对象。
toGeoJSONResult ( result )
javascript
SuperMap/iClient-JavaScript
src/common/iServer/FacilityAnalystStreamService.js
https://github.com/SuperMap/iClient-JavaScript/blob/master/src/common/iServer/FacilityAnalystStreamService.js
Apache-2.0
destroy() { var me = this; me.layerName = null; me.isVisible = null; me.displayFilter = null; }
@function LayerStatus.prototype.destroy @description 释放资源,将引用资源的属性置空。
destroy ( )
javascript
SuperMap/iClient-JavaScript
src/common/iServer/LayerStatus.js
https://github.com/SuperMap/iClient-JavaScript/blob/master/src/common/iServer/LayerStatus.js
Apache-2.0
toJSON() { var json = '{'; json += '"type":"UGC",'; var v = []; if (this.layerName) { v.push('"name":"' + this.layerName + '"'); v.push('"visible":' + this.isVisible); } if (this.displayFilter) { v.push('"displayFilter":"' + this.displayFilter + '"'); } if (this.minScale || this.minScale == 0) { v.push('"minScale":' + this.minScale); } if (this.maxScale || this.maxScale == 0) { v.push('"maxScale":' + this.maxScale); } if (this.fieldValuesDisplayFilter) { v.push('"fieldValuesDisplayFilter":' + Util.toJSON(this.fieldValuesDisplayFilter)); } json += v; json += '}'; return json; }
@function LayerStatus.prototype.toJSON @description 生成对应的 JSON。 @returns {Object} 对应的 JSON。
toJSON ( )
javascript
SuperMap/iClient-JavaScript
src/common/iServer/LayerStatus.js
https://github.com/SuperMap/iClient-JavaScript/blob/master/src/common/iServer/LayerStatus.js
Apache-2.0
destroy() { var me = this; me.dataset = null; me.bounds = null; me.expression = null; me.isZip = true; me.ignoreNoValue = true; me.targetDatasource = null; me.resultGridName = null; me.deleteExistResultDataset = null; }
@function MathExpressionAnalysisParameters.prototype.destroy @description 释放资源,将引用资源的属性置空。
destroy ( )
javascript
SuperMap/iClient-JavaScript
src/common/iServer/MathExpressionAnalysisParameters.js
https://github.com/SuperMap/iClient-JavaScript/blob/master/src/common/iServer/MathExpressionAnalysisParameters.js
Apache-2.0
static toObject(mathExpressionAnalysisParameters, tempObj) { for (var name in mathExpressionAnalysisParameters) { if (name !== "dataset") { tempObj[name] = mathExpressionAnalysisParameters[name]; } if (name === "extractRegion") { if (mathExpressionAnalysisParameters[name]) { var bs = mathExpressionAnalysisParameters[name].components[0].components; var region = {}, points = [], type = "REGION"; var len = bs.length; for (var i = 0; i < len - 1; i++) { var poi = {}; poi["x"] = bs[i].x; poi["y"] = bs[i].y; points.push(poi); } region["points"] = points; region["type"] = type; tempObj[name] = region; } } } }
@function MathExpressionAnalysisParameters.toObject @param {Object} mathExpressionAnalysisParameters - 栅格代数运算参数。 @param {Object} tempObj - 目标对象。 @description 生成栅格代数运算对象。
toObject ( mathExpressionAnalysisParameters , tempObj )
javascript
SuperMap/iClient-JavaScript
src/common/iServer/MathExpressionAnalysisParameters.js
https://github.com/SuperMap/iClient-JavaScript/blob/master/src/common/iServer/MathExpressionAnalysisParameters.js
Apache-2.0
destroy() { super.destroy(); var me = this; me.datasource = null; me.dataset = null; }
@function GetFieldsService.prototype.destroy @override
destroy ( )
javascript
SuperMap/iClient-JavaScript
src/common/iServer/GetFieldsService.js
https://github.com/SuperMap/iClient-JavaScript/blob/master/src/common/iServer/GetFieldsService.js
Apache-2.0
processAsync(callback) { var me = this; me.url = Util.urlPathAppend(me.url,`datasources/${me.datasource}/datasets/${me.dataset}/fields`); return me.request({ method: "GET", data: null, scope: me, success: callback, failure: callback }); }
@function GetFieldsService.prototype.processAsync @description 执行服务,查询指定数据集的字段信息。 @returns {Promise} Promise 对象。
processAsync ( callback )
javascript
SuperMap/iClient-JavaScript
src/common/iServer/GetFieldsService.js
https://github.com/SuperMap/iClient-JavaScript/blob/master/src/common/iServer/GetFieldsService.js
Apache-2.0
processAsync(parameter, callback) { var parameterObject = {}; var me = this; if (parameter instanceof DatasetOverlayAnalystParameters) { me.mode = "datasets"; me.url = Util.urlPathAppend(me.url, 'datasets/' + parameter.sourceDataset + '/overlay'); DatasetOverlayAnalystParameters.toObject(parameter, parameterObject); } else if (parameter instanceof GeometryOverlayAnalystParameters) { me.mode = "geometry"; //支持传入多个几何要素进行叠加分析 if(parameter.operateGeometries && parameter.sourceGeometries){ me.url = Util.urlPathAppend(me.url, 'geometry/overlay/batch'); me.url = Util.urlAppend(me.url, 'ignoreAnalystParam=true'); }else { me.url = Util.urlPathAppend(me.url, 'geometry/overlay'); } GeometryOverlayAnalystParameters.toObject(parameter, parameterObject); } this.returnContent = true; var jsonParameters = Util.toJSON(parameterObject); return me.request({ method: "POST", data: jsonParameters, scope: me, success: callback, failure: callback }); }
@function OverlayAnalystService.prototype.processAsync @description 负责将客户端的查询参数传递到服务端。 @param {OverlayAnalystParameters} parameter - 叠加分析参数类。 @param {RequestCallback} [callback] - 回调函数,该参数未传时可通过返回的 promise 获取结果。 @returns {Promise} Promise 对象。
processAsync ( parameter , callback )
javascript
SuperMap/iClient-JavaScript
src/common/iServer/OverlayAnalystService.js
https://github.com/SuperMap/iClient-JavaScript/blob/master/src/common/iServer/OverlayAnalystService.js
Apache-2.0
destroy() { super.destroy(); var me = this; me.expression = null; me.graduatedMode = GraduatedMode.CONSTANT; if (me.offset) { me.offset.destroy(); me.offset = null; } if (me.style) { me.style.destroy(); me.style = null; } }
@function ThemeGraduatedSymbol.prototype.destroy @description 释放资源,将引用资源的属性置空。
destroy ( )
javascript
SuperMap/iClient-JavaScript
src/common/iServer/ThemeGraduatedSymbol.js
https://github.com/SuperMap/iClient-JavaScript/blob/master/src/common/iServer/ThemeGraduatedSymbol.js
Apache-2.0
toJSON() { return Util.toJSON(this.toServerJSONObject()); }
@function ThemeGraduatedSymbol.prototype.toJSON @description 将 themeLabel 对象转化为 JSON 字符串。 @returns {string} 返回转换后的 JSON 字符串。
toJSON ( )
javascript
SuperMap/iClient-JavaScript
src/common/iServer/ThemeGraduatedSymbol.js
https://github.com/SuperMap/iClient-JavaScript/blob/master/src/common/iServer/ThemeGraduatedSymbol.js
Apache-2.0
toServerJSONObject() { var obj = {}; obj.type = this.type; obj.memoryData = this.memoryData; obj.baseValue = this.baseValue; obj.expression = this.expression; obj.graduatedMode = this.graduatedMode; if (this.offset) { obj.offsetFixed = this.offset.offsetFixed; obj.offsetX = this.offset.offsetX; obj.offsetY = this.offset.offsetY; } if (this.style) { obj.negativeStyle = this.style.negativeStyle; obj.negativeDisplayed = this.style.negativeDisplayed; obj.positiveStyle = this.style.positiveStyle; obj.zeroDisplayed = this.style.zeroDisplayed; obj.zeroStyle = this.style.zeroStyle; } return obj; }
@function ThemeGraduatedSymbol.prototype.toServerJSONObject @description 转换成对应的 JSON 格式对象。 @returns {Object} 对应的 JSON 格式对象。
toServerJSONObject ( )
javascript
SuperMap/iClient-JavaScript
src/common/iServer/ThemeGraduatedSymbol.js
https://github.com/SuperMap/iClient-JavaScript/blob/master/src/common/iServer/ThemeGraduatedSymbol.js
Apache-2.0
static fromObj(obj) { if (!obj) { return; } var res = new ThemeGraduatedSymbol(); Util.copy(res, obj); res.offset = ThemeOffset.fromObj(obj); res.style = ThemeGraduatedSymbolStyle.fromObj(obj); return res; }
@function ThemeGraduatedSymbol.fromObj @description 从传入对象获取等级符号专题图。 @param {Object} obj - 传入对象。 @returns {ThemeGraduatedSymbol} 等级符号专题图对象。
fromObj ( obj )
javascript
SuperMap/iClient-JavaScript
src/common/iServer/ThemeGraduatedSymbol.js
https://github.com/SuperMap/iClient-JavaScript/blob/master/src/common/iServer/ThemeGraduatedSymbol.js
Apache-2.0
destroy() { var me = this; me.queryMode = null; me.bounds = null; me.chartLayerNames = null; me.chartQueryFilterParameters = null; me.returnContent = true; me.startRecord = 0; me.expectCount = null; }
@function ChartQueryParameters.prototype.destroy @description 释放资源,将引用资源的属性置空。
destroy ( )
javascript
SuperMap/iClient-JavaScript
src/common/iServer/ChartQueryParameters.js
https://github.com/SuperMap/iClient-JavaScript/blob/master/src/common/iServer/ChartQueryParameters.js
Apache-2.0
getVariablesJson() { var json = ""; json += "\"queryMode\":\"" + this.queryMode + "\","; if (this.chartLayerNames && this.chartLayerNames.length) { var chartLayersArray = []; var layerLength = this.chartLayerNames.length; for (var i = 0; i < layerLength; i++) { chartLayersArray.push("\"" + this.chartLayerNames[i] + "\""); } var layerNames = "[" + chartLayersArray.join(",") + "]"; json += "\"chartLayerNames\":" + layerNames + ","; } if ((this.queryMode === "ChartBoundsQuery" || this.queryMode === "ChartFeatureBoundsQuery") && this.bounds) { json += "\"bounds\":" + "{" + "\"leftBottom\":" + "{" + "\"x\":" + this.bounds.left + "," + "\"y\":" + this.bounds.bottom + "}" + "," + "\"rightTop\":" + "{" + "\"x\":" + this.bounds.right + "," + "\"y\":" + this.bounds.top + "}" + "},"; } if (this.chartQueryFilterParameters && this.chartQueryFilterParameters.length) { var chartParamArray = []; var chartLength = this.chartQueryFilterParameters.length; for (var j = 0; j < chartLength; j++) { var chartQueryFilterParameter = this.chartQueryFilterParameters[j]; if (!(chartQueryFilterParameter instanceof ChartQueryFilterParameter)) { continue; } chartParamArray.push(chartQueryFilterParameter.toJson()); } var chartParamsJson = "[" + chartParamArray.join(",") + "]"; chartParamsJson = "\"chartQueryParams\":" + chartParamsJson + ","; chartParamsJson += "\"startRecord\":" + this.startRecord + ","; chartParamsJson += "\"expectCount\":" + this.expectCount; chartParamsJson = "{" + chartParamsJson + "}"; json += "\"chartQueryParameters\":" + chartParamsJson; } json = "{" + json + "}"; return json; }
@function ChartQueryParameters.prototype.getVariablesJson @description 将属性信息转换成能够被服务识别的 JSON 格式字符串。 @returns {string} JSON 字符串。
getVariablesJson ( )
javascript
SuperMap/iClient-JavaScript
src/common/iServer/ChartQueryParameters.js
https://github.com/SuperMap/iClient-JavaScript/blob/master/src/common/iServer/ChartQueryParameters.js
Apache-2.0
getTools(callback) { return this._processAsync({ url: `${this.url}/list`, callback }); }
@function GeoprocessingService.prototype.getTools @description 获取处理自动化工具列表。 @param {RequestCallback} [callback] - 回调函数,该参数未传时可通过返回的 promise 获取结果。 @returns {Promise} Promise 对象。
getTools ( callback )
javascript
SuperMap/iClient-JavaScript
src/common/iServer/GeoprocessingService.js
https://github.com/SuperMap/iClient-JavaScript/blob/master/src/common/iServer/GeoprocessingService.js
Apache-2.0
getTool(identifier, callback) { return this._processAsync({ url: `${this.url}/${identifier}`, callback }); }
@function GeoprocessingService.prototype.getTool @description 获取处理自动化工具的 ID、名称、描述、输入参数、环境参数和输出结果等相关参数。 @param {string} identifier - 处理自动化工具 ID。 @param {RequestCallback} [callback] - 回调函数,该参数未传时可通过返回的 promise 获取结果。 @returns {Promise} Promise 对象。
getTool ( identifier , callback )
javascript
SuperMap/iClient-JavaScript
src/common/iServer/GeoprocessingService.js
https://github.com/SuperMap/iClient-JavaScript/blob/master/src/common/iServer/GeoprocessingService.js
Apache-2.0
execute(identifier, parameter, environment, callback) { parameter = parameter ? parameter : null; environment = environment ? environment : null; const executeParamter = { parameter, environment }; return this._processAsync({ url: `${this.url}/${identifier}/execute`, paramter:executeParamter, callback }); }
@function GeoprocessingService.prototype.execute @description 同步执行处理自动化工具。 @param {string} identifier - 处理自动化工具 ID。 @param {Object} parameter - 处理自动化工具的输入参数。 @param {Object} environment - 处理自动化工具的环境参数。 @param {RequestCallback} [callback] - 回调函数,该参数未传时可通过返回的 promise 获取结果。 @returns {Promise} Promise 对象。
execute ( identifier , parameter , environment , callback )
javascript
SuperMap/iClient-JavaScript
src/common/iServer/GeoprocessingService.js
https://github.com/SuperMap/iClient-JavaScript/blob/master/src/common/iServer/GeoprocessingService.js
Apache-2.0
submitJob(identifier, parameter, environments, callback) { parameter = parameter ? parameter : null; environments = environments ? environments : null; const asyncParamter = JSON.stringify({ parameter: parameter, environments: environments }); return this._processAsync({ url: `${this.url}/${identifier}/jobs`, method: 'POST', callback, data: asyncParamter }); }
@function GeoprocessingService.prototype.submitJob @description 异步执行处理自动化工具。 @param {string} identifier - 处理自动化工具 ID。 @param {Object} parameter - 处理自动化工具的输入参数。 @param {Object} environments - 处理自动化工具的环境参数。 @param {RequestCallback} [callback] - 回调函数,该参数未传时可通过返回的 promise 获取结果。 @returns {Promise} Promise 对象。
submitJob ( identifier , parameter , environments , callback )
javascript
SuperMap/iClient-JavaScript
src/common/iServer/GeoprocessingService.js
https://github.com/SuperMap/iClient-JavaScript/blob/master/src/common/iServer/GeoprocessingService.js
Apache-2.0
waitForJobCompletion(jobId, identifier, options, callback) { const me = this; const timer = setInterval(function () { const transformResult = function (serverResult) { const state = serverResult.result.state.runState; if (serverResult.options.statusCallback) { serverResult.options.statusCallback(state); } if (['FINISHED', 'FAILED', 'CANCELED'].indexOf(state) !== -1) { clearInterval(timer); callback(serverResult); } }; me._processAsync({ url: `${me.url}/${identifier}/jobs/${jobId}`, callback: transformResult }); }, options.interval); }
@function GeoprocessingService.prototype.waitForJobCompletion @description 获取处理自动化异步执行状态信息。 @param {string} jobId - 处理自动化任务 ID。 @param {string} identifier - 处理自动化工具 ID。 @param {Object} options - 状态信息参数。 @param {number} options.interval - 定时器时间间隔。 @param {function} options.statusCallback - 任务状态的回调函数。
waitForJobCompletion ( jobId , identifier , options , callback )
javascript
SuperMap/iClient-JavaScript
src/common/iServer/GeoprocessingService.js
https://github.com/SuperMap/iClient-JavaScript/blob/master/src/common/iServer/GeoprocessingService.js
Apache-2.0
getJobInfo(identifier, jobId, callback) { return this._processAsync({ url: `${this.url}/${identifier}/jobs/${jobId}`, callback }); }
@function GeoprocessingService.prototype.getJobInfo @description 获取处理自动化任务的执行信息。 @param {string} identifier - 处理自动化工具 ID。 @param {string} jobId - 处理自动化任务 ID。 @returns {Promise} Promise 对象。
getJobInfo ( identifier , jobId , callback )
javascript
SuperMap/iClient-JavaScript
src/common/iServer/GeoprocessingService.js
https://github.com/SuperMap/iClient-JavaScript/blob/master/src/common/iServer/GeoprocessingService.js
Apache-2.0
cancelJob(identifier, jobId, callback) { return this._processAsync({ url: `${this.url}/${identifier}/jobs/${jobId}/cancel`, callback }); }
@function GeoprocessingService.prototype.cancelJob @description 取消处理自动化任务的异步执行。 @param {string} identifier - 处理自动化工具 ID。 @param {string} jobId - 处理自动化任务 ID。 @returns {Promise} Promise 对象。
cancelJob ( identifier , jobId , callback )
javascript
SuperMap/iClient-JavaScript
src/common/iServer/GeoprocessingService.js
https://github.com/SuperMap/iClient-JavaScript/blob/master/src/common/iServer/GeoprocessingService.js
Apache-2.0
getJobs(identifier, callback) { let url = `${this.url}/jobs`; if (identifier && typeof identifier === 'string') { url = `${this.url}/${identifier}/jobs`; } else { callback = identifier; } this._processAsync({ url, callback }); }
@function GeoprocessingService.prototype.getJobs @description 获取处理自动化服务任务列表。 @param {string} identifier - 处理自动化工具 ID。(传参代表 identifier 算子的任务列表,不传参代表所有任务的列表) @returns {Promise} Promise 对象。
getJobs ( identifier , callback )
javascript
SuperMap/iClient-JavaScript
src/common/iServer/GeoprocessingService.js
https://github.com/SuperMap/iClient-JavaScript/blob/master/src/common/iServer/GeoprocessingService.js
Apache-2.0
getResults(identifier, jobId, filter, callback) { let url = `${this.url}/${identifier}/jobs/${jobId}/results`; if (filter) { if (typeof filter === 'string') { url = `${url}/${filter}`; } else { callback = filter; } } return this._processAsync({ url, callback }); }
@function GeoprocessingService.prototype.getResults @description 处理自动化工具执行的结果等,支持结果过滤。 @param {string} identifier - 处理自动化工具 ID。 @param {string} jobId - 处理自动化任务 ID。 @param {string} filter - 输出异步结果的 ID。(可选,传入 filter 参数时对该处理自动化工具执行的结果进行过滤获取,不填参时显示所有的执行结果) @returns {Promise} Promise 对象。
getResults ( identifier , jobId , filter , callback )
javascript
SuperMap/iClient-JavaScript
src/common/iServer/GeoprocessingService.js
https://github.com/SuperMap/iClient-JavaScript/blob/master/src/common/iServer/GeoprocessingService.js
Apache-2.0
destroy() { var me = this; me.sourceNodeIDs = null; me.edgeID = null; me.nodeID = null; me.isUncertainDirectionValid = null; }
@function BurstPipelineAnalystParameters.prototype.destroy @description 释放资源,将引用资源的属性置空。
destroy ( )
javascript
SuperMap/iClient-JavaScript
src/common/iServer/BurstPipelineAnalystParameters.js
https://github.com/SuperMap/iClient-JavaScript/blob/master/src/common/iServer/BurstPipelineAnalystParameters.js
Apache-2.0
getDatasetsService(params, callback) { const url = Util.urlPathAppend(this.url,`datasources/name/${params}/datasets`); return this.processAsync(url, 'GET', callback); }
@function DatasetService.prototype.getDatasetsService @description 执行服务,查询数据集服务。 @param {RequestCallback} [callback] - 回调函数,该参数未传时可通过返回的 promise 获取结果。 @returns {Promise} Promise 对象。
getDatasetsService ( params , callback )
javascript
SuperMap/iClient-JavaScript
src/common/iServer/DatasetService.js
https://github.com/SuperMap/iClient-JavaScript/blob/master/src/common/iServer/DatasetService.js
Apache-2.0
getDatasetService(datasourceName, datasetName, callback) { const url = Util.urlPathAppend(this.url,`datasources/name/${datasourceName}/datasets/name/${datasetName}`); return this.processAsync(url, 'GET', callback); }
@function DatasetService.prototype.getDatasetService @description 执行服务,查询数据集信息服务。 @param {RequestCallback} [callback] - 回调函数,该参数未传时可通过返回的 promise 获取结果。 @returns {Promise} Promise 对象。
getDatasetService ( datasourceName , datasetName , callback )
javascript
SuperMap/iClient-JavaScript
src/common/iServer/DatasetService.js
https://github.com/SuperMap/iClient-JavaScript/blob/master/src/common/iServer/DatasetService.js
Apache-2.0
setDatasetService(params, callback) { if (!params) { return; } const url = Util.urlPathAppend(this.url, `datasources/name/${params.datasourceName}/datasets/name/${params.datasetName}`); delete params.datasourceName; return this.processAsync(url, 'PUT', callback, params); }
@function DatasetService.prototype.setDatasetService @description 执行服务,更改数据集信息服务。 @returns {Promise} Promise 对象。
setDatasetService ( params , callback )
javascript
SuperMap/iClient-JavaScript
src/common/iServer/DatasetService.js
https://github.com/SuperMap/iClient-JavaScript/blob/master/src/common/iServer/DatasetService.js
Apache-2.0
deleteDatasetService(datasourceName, datasetName, callback) { const url = Util.urlPathAppend(this.url, `datasources/name/${datasourceName}/datasets/name/${datasetName}`); return this.processAsync(url, 'DELETE', callback); }
@function DatasetService.prototype.deleteDatasetService @description 执行服务,删除数据集信息服务。 @param {RequestCallback} [callback] - 回调函数,该参数未传时可通过返回的 promise 获取结果。 @returns {Promise} Promise 对象。
deleteDatasetService ( datasourceName , datasetName , callback )
javascript
SuperMap/iClient-JavaScript
src/common/iServer/DatasetService.js
https://github.com/SuperMap/iClient-JavaScript/blob/master/src/common/iServer/DatasetService.js
Apache-2.0
destroy() { let me = this; if (Util.isArray(me.urls)) { me.urls = null; me.index = null; me.length = null; me.totalTimes = null; } me.url = null; me.isInTheSameDomain = null; me.EVENT_TYPES = null; if (me.events) { me.events.destroy(); me.events = null; } if (me.eventListeners) { me.eventListeners = null; } }
@function CommonServiceBase.prototype.destroy @description 释放资源,将引用的资源属性置空。
destroy ( )
javascript
SuperMap/iClient-JavaScript
src/common/iServer/CommonServiceBase.js
https://github.com/SuperMap/iClient-JavaScript/blob/master/src/common/iServer/CommonServiceBase.js
Apache-2.0
request(options) { let format = options.scope.format; // 兼容 callback 未传,dataFormat 传入的情况 if (typeof options.success === 'string') { options.scope.format = options.success; format = options.success; options.success = null; options.failure = null; } if (format && !this.supportDataFormat(format)) { throw new Error(`${this.CLASS_NAME} is not surport ${format} format!`); } let me = this; options.url = options.url || me.url; if (this._returnContent(options) && !options.url.includes('returnContent=true')) { options.url = Util.urlAppend(options.url, 'returnContent=true'); } options.proxy = options.proxy || me.proxy; options.withCredentials = options.withCredentials != undefined ? options.withCredentials : me.withCredentials; options.crossOrigin = options.crossOrigin != undefined ? options.crossOrigin : me.crossOrigin; options.headers = options.headers || me.headers; options.isInTheSameDomain = me.isInTheSameDomain; options.withoutFormatSuffix = options.scope.withoutFormatSuffix || false; //为url添加安全认证信息片段 options.url = SecurityManager.appendCredential(options.url); me.calculatePollingTimes(); options.scope = me; if (me.totalTimes > 0) { me.totalTimes--; return me.ajaxPolling(options); } return me._commit(options); }
@function CommonServiceBase.prototype.request @description: 该方法用于向服务发送请求。 @param {Object} options - 参数。 @param {string} [options.method='GET'] - 请求方式,包括 "GET","POST","PUT","DELETE"。 @param {string} [options.url] - 发送请求的地址。 @param {Object} [options.params] - 作为查询字符串添加到 URL 中的一组键值对,此参数只适用于 GET 方式发送的请求。 @param {string} [options.data] - 发送到服务器的数据。 @param {function} options.success - 请求成功后的回调函数。 @param {function} options.failure - 请求失败后的回调函数。 @param {Object} [options.scope] - 如果回调函数是对象的一个公共方法,设定该对象的范围。 @param {boolean} [options.isInTheSameDomain] - 请求是否在当前域中。 @param {boolean} [options.withCredentials=false] - 请求是否携带 cookie。 @param {boolean} [options.crossOrigin] - 是否允许跨域请求。 @param {Object} [options.headers] - 请求头。
request ( options )
javascript
SuperMap/iClient-JavaScript
src/common/iServer/CommonServiceBase.js
https://github.com/SuperMap/iClient-JavaScript/blob/master/src/common/iServer/CommonServiceBase.js
Apache-2.0
ajaxPolling(options) { let me = this, url = options.url, re = /^http:\/\/([a-z]{9}|(\d+\.){3}\d+):\d{0,4}/; me.index = parseInt(Math.random() * me.length); me.url = me.urls[me.index]; url = url.replace(re, re.exec(me.url)[0]); options.url = url; options.isInTheSameDomain = Util.isInTheSameDomain(url); return me._commit(options); }
@function CommonServiceBase.prototype.ajaxPolling @description 请求失败后,如果剩余请求失败次数不为 0,重新获取 URL 发送请求。 @param {Object} options - 请求参数对象。 @private
ajaxPolling ( options )
javascript
SuperMap/iClient-JavaScript
src/common/iServer/CommonServiceBase.js
https://github.com/SuperMap/iClient-JavaScript/blob/master/src/common/iServer/CommonServiceBase.js
Apache-2.0
calculatePollingTimes() { let me = this; if (me.times) { if (me.totalTimes > me.POLLING_TIMES) { if (me.times > me.POLLING_TIMES) { me.totalTimes = me.POLLING_TIMES; } else { me.totalTimes = me.times; } } else { if (me.times < me.totalTimes) { me.totalTimes = me.times; } } } else { if (me.totalTimes > me.POLLING_TIMES) { me.totalTimes = me.POLLING_TIMES; } } me.totalTimes--; }
@function CommonServiceBase.prototype.calculatePollingTimes @description 计算剩余请求失败执行次数。
calculatePollingTimes ( )
javascript
SuperMap/iClient-JavaScript
src/common/iServer/CommonServiceBase.js
https://github.com/SuperMap/iClient-JavaScript/blob/master/src/common/iServer/CommonServiceBase.js
Apache-2.0
isServiceSupportPolling() { let me = this; return !( me.CLASS_NAME === 'SuperMap.REST.ThemeService' || me.CLASS_NAME === 'SuperMap.REST.EditFeaturesService' ); }
@function CommonServiceBase.prototype.isServiceSupportPolling @description 判断服务是否支持轮询。
isServiceSupportPolling ( )
javascript
SuperMap/iClient-JavaScript
src/common/iServer/CommonServiceBase.js
https://github.com/SuperMap/iClient-JavaScript/blob/master/src/common/iServer/CommonServiceBase.js
Apache-2.0
transformResult(result, options) { result = Util.transformResult(result); return { result, options }; }
@function CommonServiceBase.prototype.transformResult @description 状态完成时转换结果。 @param {Object} result - 服务器返回的结果对象。 @param {Object} options - 请求参数。 @return {Object} 转换结果。 @private
transformResult ( result , options )
javascript
SuperMap/iClient-JavaScript
src/common/iServer/CommonServiceBase.js
https://github.com/SuperMap/iClient-JavaScript/blob/master/src/common/iServer/CommonServiceBase.js
Apache-2.0
transformErrorResult(result, options) { result = Util.transformResult(result); let error = result.error || result; return { error, options }; }
@function CommonServiceBase.prototype.transformErrorResult @description 状态失败时转换结果。 @param {Object} result - 服务器返回的结果对象。 @param {Object} options - 请求参数。 @return {Object} 转换结果。 @private
transformErrorResult ( result , options )
javascript
SuperMap/iClient-JavaScript
src/common/iServer/CommonServiceBase.js
https://github.com/SuperMap/iClient-JavaScript/blob/master/src/common/iServer/CommonServiceBase.js
Apache-2.0
serviceProcessCompleted(result, options) { result = this.transformResult(result).result; this.events.triggerEvent('processCompleted', { result: result, options: options }); }
@function CommonServiceBase.prototype.serviceProcessCompleted @description 状态完成,执行此方法。 @param {Object} result - 服务器返回的结果对象。 @param {Object} options - 请求参数对象。 @private
serviceProcessCompleted ( result , options )
javascript
SuperMap/iClient-JavaScript
src/common/iServer/CommonServiceBase.js
https://github.com/SuperMap/iClient-JavaScript/blob/master/src/common/iServer/CommonServiceBase.js
Apache-2.0
serviceProcessFailed(result, options) { result = this.transformErrorResult(result).error; let error = result.error || result; this.events.triggerEvent('processFailed', { error: error, options: options }); }
@function CommonServiceBase.prototype.serviceProcessFailed @description 状态失败,执行此方法。 @param {Object} result - 服务器返回的结果对象。 @param {Object} options - 请求参数对象。 @private
serviceProcessFailed ( result , options )
javascript
SuperMap/iClient-JavaScript
src/common/iServer/CommonServiceBase.js
https://github.com/SuperMap/iClient-JavaScript/blob/master/src/common/iServer/CommonServiceBase.js
Apache-2.0
getVectorClipJobs(callback) { return super.getJobs(this.url, callback); }
@function VectorClipJobsService.protitype.getVectorClipJobs @description 获取矢量裁剪分析所有任务。 @param {RequestCallback} [callback] - 回调函数,该参数未传时可通过返回的 promise 获取结果。 @returns {Promise} Promise 对象。
getVectorClipJobs ( callback )
javascript
SuperMap/iClient-JavaScript
src/common/iServer/VectorClipJobsService.js
https://github.com/SuperMap/iClient-JavaScript/blob/master/src/common/iServer/VectorClipJobsService.js
Apache-2.0
getVectorClipJob(id, callback) { return super.getJobs(Util.urlPathAppend(this.url, id), callback); }
@function KernelDensityJobsService.protitype.getVectorClipJob @description 获取指定 ID 的矢量裁剪分析服务。 @param {string} id - 指定要获取数据的 ID。 @param {RequestCallback} [callback] - 回调函数,该参数未传时可通过返回的 promise 获取结果。 @returns {Promise} Promise 对象。
getVectorClipJob ( id , callback )
javascript
SuperMap/iClient-JavaScript
src/common/iServer/VectorClipJobsService.js
https://github.com/SuperMap/iClient-JavaScript/blob/master/src/common/iServer/VectorClipJobsService.js
Apache-2.0
addVectorClipJob(params, seconds, callback, processRunningCallback) { return super.addJob(this.url, params, VectorClipJobsParameter, seconds, callback, processRunningCallback); }
@function VectorClipJobsService.protitype.addVectorClipJob @description 新建矢量裁剪分析服务。 @param {VectorClipJobsParameter} params - 创建一个空间分析的请求参数。 @param {number} seconds - 开始创建后,获取创建成功结果的时间间隔。 @param {RequestCallback} [callback] - 回调函数,该参数未传时可通过返回的 promise 获取结果。 @param {RequestCallback} [processRunningCallback] - 回调函数。 @returns {Promise} Promise 对象。
addVectorClipJob ( params , seconds , callback , processRunningCallback )
javascript
SuperMap/iClient-JavaScript
src/common/iServer/VectorClipJobsService.js
https://github.com/SuperMap/iClient-JavaScript/blob/master/src/common/iServer/VectorClipJobsService.js
Apache-2.0
processAsync(params, callback) { if (!(params instanceof SurfaceAnalystParameters)) { return; } var me = this, jsonParameters; jsonParameters = me.getJsonParameters(params); return me.request({ method: "POST", data: jsonParameters, scope: me, success: callback, failure: callback }); }
@function SurfaceAnalystService.prototype.processAsync @description 负责将客户端的表面分析服务参数传递到服务端。 @param {SurfaceAnalystParameters} params - 表面分析提取操作参数类。 @param {RequestCallback} [callback] - 回调函数,该参数未传时可通过返回的 promise 获取结果。 @returns {Promise} Promise 对象。
processAsync ( params , callback )
javascript
SuperMap/iClient-JavaScript
src/common/iServer/SurfaceAnalystService.js
https://github.com/SuperMap/iClient-JavaScript/blob/master/src/common/iServer/SurfaceAnalystService.js
Apache-2.0
getJsonParameters(params) { var jsonParameters = ''; var parameterObject = {}; var me = this; if (params instanceof DatasetSurfaceAnalystParameters) { me.url = Util.urlPathAppend( me.url, 'datasets/' + params.dataset + '/' + params.surfaceAnalystMethod.toLowerCase() ); DatasetSurfaceAnalystParameters.toObject(params, parameterObject); jsonParameters = Util.toJSON(parameterObject); } else if (params instanceof GeometrySurfaceAnalystParameters) { me.url = Util.urlPathAppend(me.url, 'geometry/' + params.surfaceAnalystMethod.toLowerCase()); jsonParameters = Util.toJSON(params); } else { return; } this.returnContent = true; return jsonParameters; }
@function SurfaceAnalystService.prototype.getJsonParameters @description 将参数转化为 JSON 字符串。 @param {SurfaceAnalystParameters} params - 表面分析提取操作参数类。 @returns {Object} 转化后的JSON字符串。
getJsonParameters ( params )
javascript
SuperMap/iClient-JavaScript
src/common/iServer/SurfaceAnalystService.js
https://github.com/SuperMap/iClient-JavaScript/blob/master/src/common/iServer/SurfaceAnalystService.js
Apache-2.0
destroy() { var me = this; me.dataset = null; me.bounds = null; me.fieldName = null; me.resultGridDatasetResolution = null; me.searchRadius = null; me.targetDatasource = null; me.resultGridName = null; me.deleteExistResultDataset = null; }
@function DensityKernelAnalystParameters.prototype.destroy @description 释放资源,将引用资源的属性置空。
destroy ( )
javascript
SuperMap/iClient-JavaScript
src/common/iServer/DensityKernelAnalystParameters.js
https://github.com/SuperMap/iClient-JavaScript/blob/master/src/common/iServer/DensityKernelAnalystParameters.js
Apache-2.0
static toObject(densityKernelAnalystParameters, tempObj) { for (var name in densityKernelAnalystParameters) { if (name !== "dataset") { tempObj[name] = densityKernelAnalystParameters[name]; } } }
@function DensityKernelAnalystParameters.toObject @param {DensityKernelAnalystParameters} densityKernelAnalystParameters -核密度分析参数类。 @param {DensityKernelAnalystParameters} tempObj - 核密度分析参数对象。 @description 将核密度分析参数对象转换成 JSON 对象。 @returns JSON 对象。
toObject ( densityKernelAnalystParameters , tempObj )
javascript
SuperMap/iClient-JavaScript
src/common/iServer/DensityKernelAnalystParameters.js
https://github.com/SuperMap/iClient-JavaScript/blob/master/src/common/iServer/DensityKernelAnalystParameters.js
Apache-2.0
processAsync(params, callback) { if (!(params instanceof GenerateSpatialDataParameters)) { return; } var me = this, jsonParameters; jsonParameters = me.getJsonParameters(params); return me.request({ method: "POST", data: jsonParameters, scope: me, success: callback, failure: callback }); }
@function GenerateSpatialDataService.prototype.processAsync @description 负责将客户端的动态分段服务参数传递到服务端。 @param {RequestCallback} [callback] - 回调函数,该参数未传时可通过返回的 promise 获取结果。 @param {GenerateSpatialDataParameters} params - 动态分段操作参数类。 @returns {Promise} Promise 对象。
processAsync ( params , callback )
javascript
SuperMap/iClient-JavaScript
src/common/iServer/GenerateSpatialDataService.js
https://github.com/SuperMap/iClient-JavaScript/blob/master/src/common/iServer/GenerateSpatialDataService.js
Apache-2.0
getJsonParameters(params) { var jsonParameters = "", jsonStr = "datasets/" + params.routeTable + "/linearreferencing/generatespatialdata", me = this; me.url = Util.urlPathAppend(me.url, jsonStr); me.url = Util.urlAppend(me.url, 'returnContent=true'); jsonParameters = Util.toJSON(params); return jsonParameters; }
@function GenerateSpatialDataService.prototype.getJsonParameters @description 将参数转化为 JSON 字符串。 @param {GenerateSpatialDataParameters} params - 动态分段操作参数类。 @returns {string}转化后的JSON字符串。
getJsonParameters ( params )
javascript
SuperMap/iClient-JavaScript
src/common/iServer/GenerateSpatialDataService.js
https://github.com/SuperMap/iClient-JavaScript/blob/master/src/common/iServer/GenerateSpatialDataService.js
Apache-2.0
processAsync(parameter, callback) { var me = this; me.url = Util.urlPathAppend(me.url, 'geometry/3d/convexhull'); var jsonParameters = Util.toJSON(parameter); me.url = Util.urlAppend(me.url, 'returnContent=true'); return me.request({ method: "POST", data: jsonParameters, scope: me, success: callback, failure: callback }); }
@function ConvexHullAnalystService.prototype.processAsync @description 负责将客户端的查询参数传递到服务端。 @param {ConvexHullAnalystParameters} parameter - 凸包运算参数基类。 @param {RequestCallback} [callback] - 回调函数,该参数未传时可通过返回的 promise 获取结果。 @returns {Promise} Promise 对象。
processAsync ( parameter , callback )
javascript
SuperMap/iClient-JavaScript
src/common/iServer/ConvexHullAnalystService.js
https://github.com/SuperMap/iClient-JavaScript/blob/master/src/common/iServer/ConvexHullAnalystService.js
Apache-2.0
destroy() { var me = this; me.maxGraphSize = null; me.minGraphSize = null; }
@function ThemeGraphSize.prototype.destroy @description 释放资源,将引用资源的属性置空。
destroy ( )
javascript
SuperMap/iClient-JavaScript
src/common/iServer/ThemeGraphSize.js
https://github.com/SuperMap/iClient-JavaScript/blob/master/src/common/iServer/ThemeGraphSize.js
Apache-2.0
static fromObj(obj) { var res = new ThemeGraphSize(); Util.copy(res, obj); return res; }
@function ThemeGraphSize.fromObj @description 从传入对象获统计专题图符号尺寸类。 @param {Object} obj - 传入对象。 @returns {ThemeGraphSize} ThemeGraphSize 对象。
fromObj ( obj )
javascript
SuperMap/iClient-JavaScript
src/common/iServer/ThemeGraphSize.js
https://github.com/SuperMap/iClient-JavaScript/blob/master/src/common/iServer/ThemeGraphSize.js
Apache-2.0
load() { if (!this.serviceUrl) { return; } var me = this; return me.request("GET", this.serviceUrl).then(function (result) { Util.extend(me, result); }); }
@function OnlineData.prototype.load @description 通过 URL 请求获取该服务完整信息。 @returns {Promise} 不包含请求结果的 Promise 对象,请求返回结果自动填充到该类属性中。
load ( )
javascript
SuperMap/iClient-JavaScript
src/common/online/OnlineData.js
https://github.com/SuperMap/iClient-JavaScript/blob/master/src/common/online/OnlineData.js
Apache-2.0
getPublishedServices() { return this.dataItemServices; }
@function OnlineData.prototype.getPublishedServices @description 获取数据发布的所有服务。 @returns {Object} 数据发布的所有服务。
getPublishedServices ( )
javascript
SuperMap/iClient-JavaScript
src/common/online/OnlineData.js
https://github.com/SuperMap/iClient-JavaScript/blob/master/src/common/online/OnlineData.js
Apache-2.0
getAuthorizeSetting() { return this.authorizeSetting; }
@function OnlineData.prototype.getAuthorizeSetting @description 获取数据的权限信息。 @returns {Object} 权限信息。
getAuthorizeSetting ( )
javascript
SuperMap/iClient-JavaScript
src/common/online/OnlineData.js
https://github.com/SuperMap/iClient-JavaScript/blob/master/src/common/online/OnlineData.js
Apache-2.0
request(method, url, param, requestOptions = {}) { url = SecurityManager.appendCredential(url); requestOptions['crossOrigin'] = this.options.crossOrigin; requestOptions['headers'] = this.options.headers; return FetchRequest.commit(method, url, param, requestOptions).then(function(response) { return response.json(); }); }
@function OnlineServiceBase.prototype.request @description 请求 online 服务 @param {string} [method='GET'] - 请求方式, 'GET', 'PUT', 'POST', 'DELETE'。 @param {string} url - 服务地址。 @param {Object} param - URL 查询参数。 @param {Object} [requestOptions] - http 请求参数,比如请求头,超时时间等。 @returns {Promise} 包含请求结果的 Promise 对象。
request ( method , url , param , requestOptions = { } )
javascript
SuperMap/iClient-JavaScript
src/common/online/OnlineServiceBase.js
https://github.com/SuperMap/iClient-JavaScript/blob/master/src/common/online/OnlineServiceBase.js
Apache-2.0
toJSON() { var me = this; var jsonObj = { "types": me.types, "fileName": me.fileName, "serviceStatuses": me.serviceStatuses, "serviceId": me.serviceId, "ids": me.ids, "keywords": me.keywords, "orderBy": me.orderBy, "tags": me.tags, "filterFields": me.filterFields }; for (var key in jsonObj) { if (jsonObj[key] == null) { delete jsonObj[key] } } return jsonObj; }
@function OnlineQueryDatasParameter.prototype.toJSON @description 返回对应的 JSON 对象。 @returns {Object} 对应的 JSON 对象。
toJSON ( )
javascript
SuperMap/iClient-JavaScript
src/common/online/OnlineQueryDatasParameter.js
https://github.com/SuperMap/iClient-JavaScript/blob/master/src/common/online/OnlineQueryDatasParameter.js
Apache-2.0
load() { return FetchRequest.get(this.rootUrl).then(function (response) { return response; }); }
@function Online.prototype.load @description 加载 online,验证 online 是否可用。 @returns {Promise} 包含网络请求结果的 Promise 对象。
load ( )
javascript
SuperMap/iClient-JavaScript
src/common/online/Online.js
https://github.com/SuperMap/iClient-JavaScript/blob/master/src/common/online/Online.js
Apache-2.0
login() { SecurityManager.loginOnline(this.rootUrl, true); }
@function Online.prototype.login @description 登录Online
login ( )
javascript
SuperMap/iClient-JavaScript
src/common/online/Online.js
https://github.com/SuperMap/iClient-JavaScript/blob/master/src/common/online/Online.js
Apache-2.0
queryDatas(parameter) { var me = this, url = me.mDatasUrl; if (parameter) { parameter = parameter.toJSON(); } return FetchRequest.get(url, parameter).then(function (json) { if (!json || !json.content || json.content.length < 1) { return; } var services = [], contents = json.content, len = contents.length; for (var i = 0; i < len; i++) { var content = contents[i]; var service = new OnlineData(me.mDatasUrl, content); services.push(service); } return services; }); }
@function Online.prototype.queryDatas @description 查询 Online “我的内容” 下 “我的数据” 服务(需要登录状态获取),并返回可操作的服务对象。 @param {OnlineQueryDatasParameter} parameter - myDatas 服务资源查询参数。 @returns {Promise} 包含所有数据服务信息的 Promise 对象。
queryDatas ( parameter )
javascript
SuperMap/iClient-JavaScript
src/common/online/Online.js
https://github.com/SuperMap/iClient-JavaScript/blob/master/src/common/online/Online.js
Apache-2.0
End of preview. Expand in Data Studio

Javascript CodeSearchNet–Filtered

Filtered to remove files from repositories appearing in the CodeSearchNet test split, deduplicated on identical docstring or code.

📘 Dataset Description

This dataset contains Javascript functions and their documentation comments (docstring) extracted from public GitHub repositories. Each function is paired with metadata such as the repository name, file path, original license, and GitHub URL.

Only code licensed under the following OSI-approved permissive licenses was included:

  • MIT
  • Apache License 2.0
  • BSD 2-Clause
  • BSD 3-Clause
  • ISC

These licenses permit reuse and redistribution (including commercial use) provided that proper attribution and license terms are preserved.


📄 Licensing and Legal Notice

All code snippets in this dataset were collected from public GitHub repositories that explicitly declare their licenses as one of the following: MIT, Apache-2.0, BSD-2-Clause, BSD-3-Clause, or ISC.

To comply with license terms:

  • Each sample retains its license type in the license field.
  • Repository names and GitHub URLs are included to allow proper attribution.
  • License texts are available in the LICENSES/ directory.
  • No code from repositories lacking a license or using GPL-style licenses was included.

⚠️ Disclaimer: While care has been taken to ensure license compliance, users are responsible for verifying license terms and ensuring proper attribution when using this dataset in downstream applications.

Splits

  • train: 105,655 examples
  • validation: 5,565 examples
  • test: 1,678 examples

Total: 112,898 examples

Downloads last month
77

Models trained or fine-tuned on Shuu12121/javascript-codesearch-filtered