Skip to content

Commit 86ab559

Browse files
author
caoxinke
committed
去掉地址匹配服务中多余的参数format。
1 parent b633f15 commit 86ab559

File tree

9 files changed

+40
-214
lines changed

9 files changed

+40
-214
lines changed

dist/iclient9-leaflet.js

Lines changed: 10 additions & 130 deletions
Original file line numberDiff line numberDiff line change
@@ -16813,22 +16813,9 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
1681316813
/**
1681416814
* @class L.supermap.baiduTileLayer
1681516815
* @classdesc 百度切片图层类。
16816-
* @extends L.TileLayer
16817-
* @see [L.TileLayer]{@link http://leafletjs.com/reference-1.2.0.html#tilelayer}
16816+
* @extends L.TileLayer{@linkdoc-leaflet/#tilelayer}
1681816817
* @param url -{String} 切片地址
16819-
* @param options -{object} 切片可选参数。如:<br>
16820-
* layersID - {number} 图层ID,如果有layersID,则是在使用专题图。<br>
16821-
* redirect - {boolean} 是否从定向,如果为 true,则将请求重定向到图片的真实地址;如果为 false,则响应体中是图片的字节流。<br>
16822-
* transparent - {number} 设置透明度。<br>
16823-
* cacheEnabled - {String} 启用缓存。<br>
16824-
* clipRegionEnabled - {boolean} 是否启用地图裁剪。<br>
16825-
* prjCoordSys - {object} 请求的地图的坐标参考系统。 如:prjCoordSys={"epsgCode":3857}。<br>
16826-
* overlapDisplayed - {boolean} 地图对象在同一范围内时,是否重叠显示。<br>
16827-
* overlapDisplayedOptions - {String} 避免地图对象压盖显示的过滤选项。<br>
16828-
* tileversion - {String} 切片版本名称,cacheEnabled 为 true 时有效。<br>
16829-
* crs - {L.Proj.CRS} 坐标系统类。<br>
16830-
* serverType - {String} 服务来源 iServer|iPortal|online
16831-
* attribution - {String} 版权信息。
16818+
* @param options -{object} 切片参数
1683216819
*/
1683316820
var BaiduTileLayer = exports.BaiduTileLayer = _leaflet2.default.TileLayer.extend({
1683416821

@@ -19409,19 +19396,16 @@ var AddressMatchService = exports.AddressMatchService = _ServiceBase.ServiceBase
1940919396
* @description 获取正向地址匹配结果。
1941019397
* @param params - {object} 正向匹配参数。
1941119398
* @param callback - {function} 请求结果的回调函数。
19412-
* @param resultFormat - {SuperMap.DataFormat} 返回的结果类型(默认为GeoJSON)。
1941319399
*/
19414-
code: function code(params, callback, resultFormat) {
19415-
var me = this,
19416-
format = me._processFormat(resultFormat);
19400+
code: function code(params, callback) {
19401+
var me = this;
1941719402
var addressMatchService = new _AddressMatchService2.default(me.url, {
1941819403
serverType: me.options.serverType,
1941919404
eventListeners: {
1942019405
scope: me,
1942119406
processCompleted: callback,
1942219407
processFailed: callback
19423-
},
19424-
format: format
19408+
}
1942519409
});
1942619410
addressMatchService.code(me.url + '/geocoding', params);
1942719411
return me;
@@ -19432,27 +19416,21 @@ var AddressMatchService = exports.AddressMatchService = _ServiceBase.ServiceBase
1943219416
* @description 获取反向地址匹配结果。
1943319417
* @param params -{object} 反向匹配参数。
1943419418
* @param callback -{function} 请求结果的回调函数。
19435-
* @param resultFormat -{SuperMap.DataFormat} 返回的结果类型(默认为GeoJSON)。
1943619419
*/
19437-
decode: function decode(params, callback, resultFormat) {
19438-
var me = this,
19439-
format = me._processFormat(resultFormat);
19420+
decode: function decode(params, callback) {
19421+
var me = this;
1944019422
var addressMatchService = new _AddressMatchService2.default(me.url, {
1944119423
serverType: me.options.serverType,
1944219424
eventListeners: {
1944319425
scope: me,
1944419426
processCompleted: callback,
1944519427
processFailed: callback
19446-
},
19447-
format: format
19428+
}
1944819429
});
1944919430
addressMatchService.decode(me.url + '/geodecoding', params);
1945019431
return me;
19451-
},
19452-
19453-
_processFormat: function _processFormat(resultFormat) {
19454-
return resultFormat ? resultFormat : _SuperMap2.default.DataFormat.GEOJSON;
1945519432
}
19433+
1945619434
});
1945719435

1945819436
var addressMatchService = exports.addressMatchService = function addressMatchService(url, options) {
@@ -63978,105 +63956,7 @@ var names = ["Van_der_Grinten_I", "VanDerGrinten", "vandg"];
6397863956
/* 397 */
6397963957
/***/ (function(module, exports) {
6398063958

63981-
module.exports = {
63982-
"_from": "proj4@2.4.3",
63983-
"_id": "proj4@2.4.3",
63984-
"_inBundle": false,
63985-
"_integrity": "sha1-87t+Yxv/wEfDaho8wUUzoDu+mWk=",
63986-
"_location": "/proj4",
63987-
"_phantomChildren": {},
63988-
"_requested": {
63989-
"type": "version",
63990-
"registry": true,
63991-
"raw": "proj4@2.4.3",
63992-
"name": "proj4",
63993-
"escapedName": "proj4",
63994-
"rawSpec": "2.4.3",
63995-
"saveSpec": null,
63996-
"fetchSpec": "2.4.3"
63997-
},
63998-
"_requiredBy": [
63999-
"/"
64000-
],
64001-
"_resolved": "https://registry.npmjs.org/proj4/-/proj4-2.4.3.tgz",
64002-
"_shasum": "f3bb7e631bffc047c36a1a3cc14533a03bbe9969",
64003-
"_spec": "proj4@2.4.3",
64004-
"_where": "G:\\iClient9",
64005-
"author": "",
64006-
"bugs": {
64007-
"url": "https://github.com/proj4js/proj4js/issues"
64008-
},
64009-
"bundleDependencies": false,
64010-
"contributors": [
64011-
{
64012-
"name": "Mike Adair",
64013-
"email": "madair@dmsolutions.ca"
64014-
},
64015-
{
64016-
"name": "Richard Greenwood",
64017-
"email": "rich@greenwoodmap.com"
64018-
},
64019-
{
64020-
"name": "Calvin Metcalf",
64021-
"email": "calvin.metcalf@gmail.com"
64022-
},
64023-
{
64024-
"name": "Richard Marsden",
64025-
"url": "http://www.winwaed.com"
64026-
},
64027-
{
64028-
"name": "T. Mittan"
64029-
},
64030-
{
64031-
"name": "D. Steinwand"
64032-
},
64033-
{
64034-
"name": "S. Nelson"
64035-
}
64036-
],
64037-
"dependencies": {
64038-
"mgrs": "1.0.0",
64039-
"wkt-parser": "^1.1.3"
64040-
},
64041-
"deprecated": false,
64042-
"description": "Proj4js is a JavaScript library to transform point coordinates from one coordinate system to another, including datum transformations.",
64043-
"devDependencies": {
64044-
"chai": "~1.8.1",
64045-
"curl": "git://github.com/cujojs/curl.git",
64046-
"grunt": "~0.4.2",
64047-
"grunt-cli": "~0.1.13",
64048-
"grunt-contrib-connect": "~0.6.0",
64049-
"grunt-contrib-jshint": "~1.1.0",
64050-
"grunt-contrib-uglify": "~0.11.1",
64051-
"grunt-mocha-phantomjs": "~0.4.0",
64052-
"grunt-rollup": "^1.0.1",
64053-
"istanbul": "~0.2.4",
64054-
"mocha": "~1.17.1",
64055-
"rollup": "^0.41.4",
64056-
"rollup-plugin-json": "^2.0.1",
64057-
"rollup-plugin-node-resolve": "^2.0.0",
64058-
"tin": "~0.4.0"
64059-
},
64060-
"directories": {
64061-
"test": "test",
64062-
"doc": "docs"
64063-
},
64064-
"homepage": "https://github.com/proj4js/proj4js#readme",
64065-
"license": "MIT",
64066-
"main": "dist/proj4-src.js",
64067-
"module": "lib/index.js",
64068-
"name": "proj4",
64069-
"repository": {
64070-
"type": "git",
64071-
"url": "git://github.com/proj4js/proj4js.git"
64072-
},
64073-
"scripts": {
64074-
"build": "grunt",
64075-
"build:tmerc": "grunt build:tmerc",
64076-
"test": "npm run build && istanbul test _mocha test/test.js"
64077-
},
64078-
"version": "2.4.3"
64079-
};
63959+
module.exports = {"_args":[["proj4@2.4.3","E:\\codes\\iClient9"]],"_from":"proj4@2.4.3","_id":"proj4@2.4.3","_inBundle":false,"_integrity":"sha1-87t+Yxv/wEfDaho8wUUzoDu+mWk=","_location":"/proj4","_phantomChildren":{},"_requested":{"type":"version","registry":true,"raw":"proj4@2.4.3","name":"proj4","escapedName":"proj4","rawSpec":"2.4.3","saveSpec":null,"fetchSpec":"2.4.3"},"_requiredBy":["/"],"_resolved":"https://registry.npmjs.org/proj4/-/proj4-2.4.3.tgz","_spec":"2.4.3","_where":"E:\\codes\\iClient9","author":"","bugs":{"url":"https://github.com/proj4js/proj4js/issues"},"contributors":[{"name":"Mike Adair","email":"madair@dmsolutions.ca"},{"name":"Richard Greenwood","email":"rich@greenwoodmap.com"},{"name":"Calvin Metcalf","email":"calvin.metcalf@gmail.com"},{"name":"Richard Marsden","url":"http://www.winwaed.com"},{"name":"T. Mittan"},{"name":"D. Steinwand"},{"name":"S. Nelson"}],"dependencies":{"mgrs":"1.0.0","wkt-parser":"^1.1.3"},"description":"Proj4js is a JavaScript library to transform point coordinates from one coordinate system to another, including datum transformations.","devDependencies":{"chai":"~1.8.1","curl":"git://github.com/cujojs/curl.git","grunt":"~0.4.2","grunt-cli":"~0.1.13","grunt-contrib-connect":"~0.6.0","grunt-contrib-jshint":"~1.1.0","grunt-contrib-uglify":"~0.11.1","grunt-mocha-phantomjs":"~0.4.0","grunt-rollup":"^1.0.1","istanbul":"~0.2.4","mocha":"~1.17.1","rollup":"^0.41.4","rollup-plugin-json":"^2.0.1","rollup-plugin-node-resolve":"^2.0.0","tin":"~0.4.0"},"directories":{"test":"test","doc":"docs"},"homepage":"https://github.com/proj4js/proj4js#readme","license":"MIT","main":"dist/proj4-src.js","module":"lib/index.js","name":"proj4","repository":{"type":"git","url":"git://github.com/proj4js/proj4js.git"},"scripts":{"build":"grunt","build:tmerc":"grunt build:tmerc","test":"npm run build && istanbul test _mocha test/test.js"},"version":"2.4.3"}
6408063960

6408163961
/***/ }),
6408263962
/* 398 */

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-legacy.js

Lines changed: 6 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -2309,8 +2309,6 @@ var _SuperMap = __webpack_require__(4);
23092309

23102310
var _SuperMap2 = _interopRequireDefault(_SuperMap);
23112311

2312-
var _REST = __webpack_require__(1);
2313-
23142312
var _CommonServiceBase2 = __webpack_require__(3);
23152313

23162314
var _CommonServiceBase3 = _interopRequireDefault(_CommonServiceBase2);
@@ -2351,24 +2349,21 @@ var AddressMatchService = exports.AddressMatchService = function (_CommonService
23512349
* @description 编码
23522350
* @param params - {String} 编码参数
23532351
* @param callback - {function} 回调函数
2354-
* @param resultFormat - {SuperMap.DataFormat} 返回的结果类型(默认为GeoJSON)。
23552352
* @return {SuperMap.REST.AddressMatchService} 返回正向匹配地址
23562353
*/
23572354

23582355

23592356
_createClass(AddressMatchService, [{
23602357
key: 'code',
2361-
value: function code(params, callback, resultFormat) {
2362-
var me = this,
2363-
format = me._processFormat(resultFormat);
2358+
value: function code(params, callback) {
2359+
var me = this;
23642360
var addressMatchService = new _AddressMatchService2.default(me.url, {
23652361
serverType: me.serverType,
23662362
eventListeners: {
23672363
scope: me,
23682364
processCompleted: callback,
23692365
processFailed: callback
2370-
},
2371-
format: format
2366+
}
23722367
});
23732368
addressMatchService.code(me.url + '/geocoding', params);
23742369
return me;
@@ -2379,32 +2374,24 @@ var AddressMatchService = exports.AddressMatchService = function (_CommonService
23792374
* @description 解码
23802375
* @param params - {String} 编码参数
23812376
* @param callback - {function} 回调函数
2382-
* @param resultFormat - {SuperMap.DataFormat} 返回的结果类型(默认为GeoJSON)。
23832377
* @return {SuperMap.REST.AddressMatchService} 返回反向匹配地址
23842378
*/
23852379

23862380
}, {
23872381
key: 'decode',
2388-
value: function decode(params, callback, resultFormat) {
2389-
var me = this,
2390-
format = me._processFormat(resultFormat);
2382+
value: function decode(params, callback) {
2383+
var me = this;
23912384
var addressMatchService = new _AddressMatchService2.default(me.url, {
23922385
serverType: me.serverType,
23932386
eventListeners: {
23942387
scope: me,
23952388
processCompleted: callback,
23962389
processFailed: callback
2397-
},
2398-
format: format
2390+
}
23992391
});
24002392
addressMatchService.decode(me.url + '/geodecoding', params);
24012393
return me;
24022394
}
2403-
}, {
2404-
key: '_processFormat',
2405-
value: function _processFormat(resultFormat) {
2406-
return resultFormat ? resultFormat : _REST.DataFormat.GEOJSON;
2407-
}
24082395
}]);
24092396

24102397
return AddressMatchService;

dist/iclient9-legacy.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-openlayers.js

Lines changed: 7 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -12668,7 +12668,7 @@ function _inherits(subClass, superClass) { if (typeof superClass !== "function"
1266812668
* @class ol.source.Baidu
1266912669
* @classdesc 百度地图
1267012670
* @param opt_options - {object} 可选参数
12671-
* @extends ol.source.TileImage
12671+
* @extends ol.source.TileImage{@linkdoc-openlayers/ol.source.TileImage}
1267212672
*/
1267312673
var Baidu = function (_ol$source$TileImage) {
1267412674
_inherits(Baidu, _ol$source$TileImage);
@@ -15346,23 +15346,20 @@ var AddressMatchService = function (_ServiceBase) {
1534615346
* @description 获取正向地址匹配结果。
1534715347
* @param params -{Object}正向匹配参数。
1534815348
* @param callback -{function}请求结果的回调函数。
15349-
* @param resultFormat -{Object}返回的结果类型(默认为GeoJSON)。
1535015349
*/
1535115350

1535215351

1535315352
_createClass(AddressMatchService, [{
1535415353
key: 'code',
15355-
value: function code(params, callback, resultFormat) {
15356-
var me = this,
15357-
format = me._processFormat(resultFormat);
15354+
value: function code(params, callback) {
15355+
var me = this;
1535815356
var addressMatchService = new _AddressMatchService2.default(me.url, {
1535915357
serverType: me.options.serverType,
1536015358
eventListeners: {
1536115359
scope: me,
1536215360
processCompleted: callback,
1536315361
processFailed: callback
15364-
},
15365-
format: format
15362+
}
1536615363
});
1536715364
addressMatchService.code(me.url + '/geocoding', params);
1536815365
return me;
@@ -15373,31 +15370,23 @@ var AddressMatchService = function (_ServiceBase) {
1537315370
* @description 获取反向地址匹配结果。
1537415371
* @param params -{Object} 反向匹配参数。
1537515372
* @param callback -{function}请求结果的回调函数。
15376-
* @param resultFormat -{Object} 返回的结果类型(默认为GeoJSON)。
1537715373
*/
1537815374

1537915375
}, {
1538015376
key: 'decode',
15381-
value: function decode(params, callback, resultFormat) {
15382-
var me = this,
15383-
format = me._processFormat(resultFormat);
15377+
value: function decode(params, callback) {
15378+
var me = this;
1538415379
var addressMatchService = new _AddressMatchService2.default(me.url, {
1538515380
serverType: me.options.serverType,
1538615381
eventListeners: {
1538715382
scope: me,
1538815383
processCompleted: callback,
1538915384
processFailed: callback
15390-
},
15391-
format: format
15385+
}
1539215386
});
1539315387
addressMatchService.decode(me.url + '/geodecoding', params);
1539415388
return me;
1539515389
}
15396-
}, {
15397-
key: '_processFormat',
15398-
value: function _processFormat(resultFormat) {
15399-
return resultFormat ? resultFormat : _SuperMap2.default.DataFormat.GEOJSON;
15400-
}
1540115390
}]);
1540215391

1540315392
return AddressMatchService;

dist/iclient9-openlayers.min.js

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

src/leaflet/services/AddressMatchService.js

Lines changed: 5 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ import CommonMatchAddressService from'../../common/iServer/AddressMatchService';
1717
* data - {number}
1818
*
1919
*/
20-
export var AddressMatchService = ServiceBase.extend({
20+
export var AddressMatchService = ServiceBase.extend({
2121

2222
initialize: function (url, options) {
2323
ServiceBase.prototype.initialize.call(this, url, options);
@@ -28,19 +28,16 @@ export var AddressMatchService = ServiceBase.extend({
2828
* @description 获取正向地址匹配结果。
2929
* @param params - {object} 正向匹配参数。
3030
* @param callback - {function} 请求结果的回调函数。
31-
* @param resultFormat - {SuperMap.DataFormat} 返回的结果类型(默认为GeoJSON)。
3231
*/
33-
code: function (params, callback, resultFormat) {
34-
var me = this,
35-
format = me._processFormat(resultFormat);
32+
code: function (params, callback) {
33+
var me = this;
3634
var addressMatchService = new CommonMatchAddressService(me.url, {
3735
serverType: me.options.serverType,
3836
eventListeners: {
3937
scope: me,
4038
processCompleted: callback,
4139
processFailed: callback
4240
},
43-
format: format
4441
});
4542
addressMatchService.code(me.url + '/geocoding', params);
4643
return me;
@@ -51,27 +48,21 @@ export var AddressMatchService = ServiceBase.extend({
5148
* @description 获取反向地址匹配结果。
5249
* @param params -{object} 反向匹配参数。
5350
* @param callback -{function} 请求结果的回调函数。
54-
* @param resultFormat -{SuperMap.DataFormat} 返回的结果类型(默认为GeoJSON)。
5551
*/
56-
decode: function (params, callback, resultFormat) {
57-
var me = this,
58-
format = me._processFormat(resultFormat);
52+
decode: function (params, callback) {
53+
var me = this;
5954
var addressMatchService = new CommonMatchAddressService(me.url, {
6055
serverType: me.options.serverType,
6156
eventListeners: {
6257
scope: me,
6358
processCompleted: callback,
6459
processFailed: callback
6560
},
66-
format: format
6761
});
6862
addressMatchService.decode(me.url + '/geodecoding', params);
6963
return me;
7064
},
7165

72-
_processFormat: function (resultFormat) {
73-
return (resultFormat) ? resultFormat : SuperMap.DataFormat.GEOJSON;
74-
}
7566
});
7667

7768
export var addressMatchService = function (url, options) {

0 commit comments

Comments
 (0)