Skip to content

Commit e0ecd20

Browse files
committed
【 fix 】把数据类型为 java 类型的参数改为 js 基础类型; review by xiongjj
1 parent dd98a3a commit e0ecd20

26 files changed

+87
-87
lines changed

src/classic/resource/Android/phonegap/cordova-2.7.0.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3654,10 +3654,10 @@ define("cordova/plugin/MediaFileData", function(require, exports, module) {
36543654
* MediaFileData encapsulates format information of a media file.
36553655
*
36563656
* @param {DOMString} codecs
3657-
* @param {long} bitrate
3658-
* @param {long} height
3659-
* @param {long} width
3660-
* @param {float} duration
3657+
* @param {number} bitrate
3658+
* @param {number} height
3659+
* @param {number} width
3660+
* @param {number} duration
36613661
*/
36623662
var MediaFileData = function(codecs, bitrate, height, width, duration){
36633663
this.codecs = codecs || null;
@@ -6314,7 +6314,7 @@ module.exports = {
63146314
/**
63156315
* Causes the device to vibrate.
63166316
*
6317-
* @param {Integer} mills The number of milliseconds to vibrate for.
6317+
* @param {number} mills The number of milliseconds to vibrate for.
63186318
*/
63196319
vibrate: function(mills) {
63206320
exec(null, null, "Notification", "vibrate", [mills]);
@@ -6324,7 +6324,7 @@ module.exports = {
63246324
* Causes the device to beep.
63256325
* On Android, the default notification ringtone is played "count" times.
63266326
*
6327-
* @param {Integer} count The number of beeps.
6327+
* @param {number} count The number of beeps.
63286328
*/
63296329
beep: function(count) {
63306330
exec(null, null, "Notification", "beep", [count]);

src/common/commontypes/BaseTypes.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -283,7 +283,7 @@ export var NumberExt = SuperMap.Number = {
283283
* @function SuperMap.Number.limitSigDigs
284284
* @description 限制浮点数的有效数字位数。
285285
* @param {number} num - 浮点数。
286-
* @param {integer} sig - 有效位数。
286+
* @param {number} sig - 有效位数。
287287
* @returns {number} 将数字四舍五入到指定数量的有效位数。
288288
*/
289289
limitSigDigs: function (num, sig) {
@@ -298,7 +298,7 @@ export var NumberExt = SuperMap.Number = {
298298
* @function SuperMap.Number.format
299299
* @description 数字格式化输出。
300300
* @param {number} num - 数字。
301-
* @param {integer} [dec=0] - 数字的小数部分四舍五入到指定的位数。设置为 null 值时小数部分不变。
301+
* @param {number} [dec=0] - 数字的小数部分四舍五入到指定的位数。设置为 null 值时小数部分不变。
302302
* @param {string} [tsep=','] - 千位分隔符。
303303
* @param {string} [dsep='.'] - 小数点分隔符。
304304
* @returns {string} 数字格式化后的字符串。
@@ -346,8 +346,8 @@ if (!Number.prototype.limitSigDigs) {
346346
/**
347347
* APIMethod: Number.limitSigDigs
348348
* 限制浮点数的有效数字位数.
349-
* @param {integer} sig -有效位数。
350-
* @returns {integer} 将数字四舍五入到指定数量的有效位数。
349+
* @param {number} sig -有效位数。
350+
* @returns {number} 将数字四舍五入到指定数量的有效位数。
351351
* 如果传入值 为 null、0、或者是负数, 返回值 0。
352352
*/
353353
Number.prototype.limitSigDigs = function (sig) {

src/common/commontypes/Bounds.js

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ export class Bounds {
142142
* var str2 = bounds.toBBOX(1);
143143
* //str2 = "-1.8,-1.1,1.6,1.4";
144144
* var str2 = bounds.toBBOX(1,true);
145-
* @param {integer} [decimal=6] - 边界方位坐标的有效数字个数。
145+
* @param {number} [decimal=6] - 边界方位坐标的有效数字个数。
146146
* @param {boolean} [reverseAxisOrder=false] - 是否是反转轴顺序。
147147
* 如果设为true,则倒转顺序(bottom,left,top,right),否则按正常轴顺序(left,bottom,right,top)。
148148
* @returns {string} 边界对象的字符串表示形式,如:"5,42,10,45"。
@@ -190,7 +190,7 @@ export class Bounds {
190190
* var bounds = new SuperMap.Bounds(-180,-90,100,80);
191191
* //width = 280;
192192
* var width = bounds.getWidth();
193-
* @returns {float} 获取当前 bounds 的宽度(right 减去 left)。
193+
* @returns {number} 获取当前 bounds 的宽度(right 减去 left)。
194194
*/
195195
getWidth() {
196196
return (this.right - this.left);
@@ -203,7 +203,7 @@ export class Bounds {
203203
* var bounds = new SuperMap.Bounds(-180,-90,100,80);
204204
* //height = 170;
205205
* var height = bounds.getHeight();
206-
* @returns {float} 返回边界高度(top 减去 bottom)。
206+
* @returns {number} 返回边界高度(top 减去 bottom)。
207207
*/
208208
getHeight() {
209209
return (this.top - this.bottom);
@@ -257,7 +257,7 @@ export class Bounds {
257257
* @example
258258
* var bounds = new SuperMap.Bounds(-50,-50,40,40);
259259
* var bounds2 = bounds.scale(2);
260-
* @param {float} [ratio=1] - 需要扩大的比例。
260+
* @param {number} [ratio=1] - 需要扩大的比例。
261261
* @param {(SuperMap.Pixel|SuperMap.LonLat)} [origin] - 扩大时的基准点,默认为当前 bounds 的中心点。
262262
* @returns {SuperMap.Bounds} 返回通过 ratio、origin 计算得到的新的边界范围。
263263
*/
@@ -293,8 +293,8 @@ export class Bounds {
293293
* var bounds1 = new SuperMap.Bounds(-50,-50,40,40);
294294
* //bounds2 是新的 bounds
295295
* var bounds2 = bounds.add(20,10);
296-
* @param {float} x - 传入坐标点的 x 坐标。
297-
* @param {float} y - 传入坐标点的 y 坐标。
296+
* @param {number} x - 传入坐标点的 x 坐标。
297+
* @param {number} y - 传入坐标点的 y 坐标。
298298
* @returns {SuperMap.Bounds} 返回一个新的 bounds,此 bounds 的坐标是由传入的 x,y 参数与当前 bounds 坐标计算所得。
299299
*/
300300
add(x, y) {
@@ -421,8 +421,8 @@ export class Bounds {
421421
* var bounds = new SuperMap.Bounds(-50,-50,40,40);
422422
* //isContains = true
423423
* var isContains = bounds.contains(40,40,true);
424-
* @param {float} x - 传入的 x 坐标值。
425-
* @param {float} y - 传入的 y 坐标值。
424+
* @param {number} x - 传入的 x 坐标值。
425+
* @param {number} y - 传入的 y 坐标值。
426426
* @param {boolean} [inclusive=true] - 是否包含边界。
427427
* @returns {boolean} 传入的 x,y 坐标是否在当前范围内。
428428
*/
@@ -593,8 +593,8 @@ export class Bounds {
593593
* var newBounds = bounds.wrapDateLine(maxExtent);
594594
* @param {SuperMap.Bounds} maxExtent - 最大的边界范围(一般是全球范围)。
595595
* @param {Object} options - 可选选项参数。
596-
* @param {float} [options.leftTolerance=0] - left 允许的误差。
597-
* @param {float} [options.rightTolerance=0] - right 允许的误差。
596+
* @param {number} [options.leftTolerance=0] - left 允许的误差。
597+
* @param {number} [options.rightTolerance=0] - right 允许的误差。
598598
* @returns {SuperMap.Bounds} 克隆当前边界。如果当前边界完全在最大范围之外此函数则返回一个不同值的边界,
599599
* 若落在最大边界的左边,则给当前的bounds值加上最大范围的宽度,即向右移动,
600600
* 若落在右边,则向左移动,即给当前的bounds值加上负的最大范围的宽度。
@@ -690,7 +690,7 @@ export class Bounds {
690690
* @description 通过边界框数组创建 Bounds。
691691
* @example
692692
* var bounds = SuperMap.Bounds.fromArray([-180,-90,100,80]);
693-
* @param {Array.<float>} bbox - 边界值数组。(e.g. <i>[5,42,10,45]</i>)。
693+
* @param {Array.<number>} bbox - 边界值数组。(e.g. <i>[5,42,10,45]</i>)。
694694
* @param {boolean} [reverseAxisOrder=false] - 是否是反转轴顺序。如果设为true,则倒转顺序(bottom,left,top,right),否则按正常轴顺序(left,bottom,right,top)。
695695
* @returns {SuperMap.Bounds} 返回根据传入的数组创建的新的边界对象。
696696
*/

src/common/commontypes/Geometry.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ export class Geometry {
3838
this.bounds = null;
3939

4040
/**
41-
* @member {interger} SuperMap.Geometry.prototype.SRID
41+
* @member {number} SuperMap.Geometry.prototype.SRID
4242
* @description 投影坐标参数。通过该参数,服务器判断 Geometry 对象的坐标参考系是否与数据集相同,如果不同,则在数据入库前进行投影变换。
4343
* @example
4444
* var geometry= new SuperMap.Geometry();
@@ -147,7 +147,7 @@ export class Geometry {
147147
/**
148148
* @function SuperMap.Geometry.prototype.getArea
149149
* @description 计算几何对象的面积 ,此方法需要在子类中定义。
150-
* @returns {float} The area of the collection by summing its parts
150+
* @returns {number} The area of the collection by summing its parts
151151
*/
152152
getArea() {
153153
//to be overridden by geometries that actually have an area

src/common/commontypes/LonLat.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import {Util} from './Util';
99
* @classdesc 这个类用来表示经度和纬度对。
1010
* @param {number} [lon=0.0] - 地图单位上的 X 轴坐标,如果地图是地理投影,则此值是经度,否则,此值是地图地理位置的 x 坐标。
1111
* @param {number} [lat=0.0] - 地图单位上的 Y 轴坐标,如果地图是地理投影,则此值是纬度,否则,此值是地图地理位置的 y 坐标。
12-
* @param {Array.<float>} [location] - 如果要同时设置,则使用传入横纵坐标组成的数组。
12+
* @param {Array.<number>} [location] - 如果要同时设置,则使用传入横纵坐标组成的数组。
1313
* @example
1414
* var lonLat = new SuperMap.LonLat(30,45);
1515
*/
@@ -22,13 +22,13 @@ export class LonLat {
2222
lon = lon[0];
2323
}
2424
/**
25-
* @member {float} [SuperMap.LonLat.prototype.lon=0.0]
25+
* @member {number} [SuperMap.LonLat.prototype.lon=0.0]
2626
* @description 地图的单位的 X 轴(横轴)坐标。
2727
*/
2828
this.lon = lon ? Util.toFloat(lon) : 0.0;
2929

3030
/**
31-
* @member {float} [SuperMap.LonLat.prototype.lat=0.0]
31+
* @member {number} [SuperMap.LonLat.prototype.lat=0.0]
3232
* @description 地图的单位的 Y 轴(纵轴)坐标。
3333
*/
3434
this.lat = lat ? Util.toFloat(lat) : 0.0;
@@ -78,8 +78,8 @@ export class LonLat {
7878
* var lonLat1 = new SuperMap.LonLat(100,50);
7979
* //lonLat2 是新的对象
8080
* var lonLat2 = lonLat1.add(100,50);
81-
* @param {float} lon - 传入的经度参数。
82-
* @param {float} lat - 传入的纬度参数。
81+
* @param {number} lon - 传入的经度参数。
82+
* @param {number} lat - 传入的纬度参数。
8383
* @returns {SuperMap.LonLat} 返回一个新的 LonLat 对象,此对象的经纬度是由传入的经纬度与当前的经纬度相加所得。
8484
*/
8585
add(lon, lat) {
@@ -173,7 +173,7 @@ export class LonLat {
173173
/**
174174
* @function SuperMap.LonLat.fromArray
175175
* @description 通过数组生成一个 <SuperMap.LonLat> 对象。
176-
* @param {Array.<float>} arr - 数组的格式,长度只能为2,:[Lon,Lat]。如:[5,-42]。
176+
* @param {Array.<number>} arr - 数组的格式,长度只能为2,:[Lon,Lat]。如:[5,-42]。
177177
* @returns {SuperMap.LonLat} 返回一个 <SuperMap.LonLat> 对象。
178178
*/
179179
static fromArray(arr) {

src/common/commontypes/Pixel.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ export class Pixel {
115115
* var distance = pixcel.distanceTo(pixcel2);
116116
*
117117
* @param {SuperMap.Pixel} px - 用于计算的一个 pixel。
118-
* @returns {float} 作为参数传入的像素与当前像素点的距离。
118+
* @returns {number} 作为参数传入的像素与当前像素点的距离。
119119
*/
120120
distanceTo(px) {
121121
return Math.sqrt(

src/common/commontypes/geometry/Collection.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ export class Collection extends Geometry {
125125
* @function SuperMap.Geometry.Collection.prototype.addComponent
126126
* @description 添加一个几何对象到集合中。如果设置了 componentTypes 类型,则添加的几何对象必须是 componentTypes 中的类型。
127127
* @param {SuperMap.Geometry} component - 待添加的几何对象。
128-
* @param {int} [index] - 几何对象插入的位置。
128+
* @param {number} [index] - 几何对象插入的位置。
129129
* @returns {boolean} 是否添加成功。
130130
*/
131131
addComponent(component, index) {

src/common/commontypes/geometry/GeoText.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,22 +15,22 @@ import '../LonLat';
1515
* @classdesc 文本标签类。
1616
* @category BaseTypes Geometry
1717
* @extends {SuperMap.Geometry}
18-
* @param {float} x - x 坐标。
19-
* @param {float} y - y 坐标。
18+
* @param {number} x - x 坐标。
19+
* @param {number} y - y 坐标。
2020
* @param {string} text - 标签中的文本内容。
2121
*/
2222
export class GeoText extends Geometry {
2323

2424
constructor(x, y, text) {
2525
super(x, y, text);
2626
/**
27-
* @member {float} SuperMap.Geometry.GeoText.prototype.x
27+
* @member {number} SuperMap.Geometry.GeoText.prototype.x
2828
* @description 横坐标。
2929
*/
3030
this.x = parseFloat(x);
3131

3232
/**
33-
* @member {float} SuperMap.Geometry.GeoText.prototype.y
33+
* @member {number} SuperMap.Geometry.GeoText.prototype.y
3434
* @description 纵坐标。
3535
*/
3636
this.y = parseFloat(y);

src/common/commontypes/geometry/LinearRing.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ export class LinearRing extends LineString {
4040
* 重复的点是不能被添加的。这将影响未关闭环的关闭。
4141
* 这个方法可以通过将非空索引(组件数组的下标)作为第二个参数重写。
4242
* @param {SuperMap.Geometry.Point} point - 点对象。
43-
* @param {integer} [index] - 插入组件数组的下标。
43+
* @param {number} [index] - 插入组件数组的下标。
4444
* @returns {boolean} 点对象是否添加成功。
4545
*/
4646
addComponent(point, index) {
@@ -86,7 +86,7 @@ export class LinearRing extends LineString {
8686
/**
8787
* @function SuperMap.Geometry.LinearRing.prototype.getArea
8888
* @description 获得当前几何对象区域大小,如果是沿顺时针方向的环则是正值,否则为负值。
89-
* @returns {float} 环的面积。
89+
* @returns {number} 环的面积。
9090
*/
9191
getArea() {
9292
var area = 0.0;

src/common/commontypes/geometry/MultiPoint.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ export class MultiPoint extends Collection {
3434
* @function SuperMap.Geometry.MultiPoint.prototype.addPoint
3535
* @description 添加点,封装了 {@link SuperMap.Geometry.Collection|SuperMap.Geometry.Collection.addComponent} 方法。
3636
* @param {SuperMap.Geometry.Point} point - 添加的点。
37-
* @param {integer} [index] - 下标。
37+
* @param {number} [index] - 下标。
3838
*/
3939
addPoint(point, index) {
4040
this.addComponent(point, index);

src/common/commontypes/geometry/Point.js

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,10 @@ import {Util} from '../Util';
1111
* @classdesc 点几何对象类。
1212
* @category BaseTypes Geometry
1313
* @extends {SuperMap.Geometry}
14-
* @param {float} x - x 坐标。
15-
* @param {float} y - y 坐标。
14+
* @param {number} x - x 坐标。
15+
* @param {number} y - y 坐标。
1616
* @param {string} [type = 'Point'] - 用来存储点的类型。
17-
* @param {float} [tag] - 用来存储额外的属性,比如差值分析中的 Z 值。
17+
* @param {number} [tag] - 用来存储额外的属性,比如差值分析中的 Z 值。
1818
* @example
1919
* var point = new SuperMap.Geometry.Point(-111.04, 45.68);
2020
*/
@@ -24,13 +24,13 @@ export class Point extends Geometry {
2424
constructor(x, y, type, tag) {
2525
super(x, y, type, tag);
2626
/**
27-
* @member {float} SuperMap.Geometry.Point.prototype.x
27+
* @member {number} SuperMap.Geometry.Point.prototype.x
2828
* @description 横坐标。
2929
*/
3030
this.x = parseFloat(x);
3131

3232
/**
33-
* @member {float} SuperMap.Geometry.Point.prototype.y
33+
* @member {number} SuperMap.Geometry.Point.prototype.y
3434
* @description 纵坐标。
3535
*/
3636
this.y = parseFloat(y);
@@ -98,8 +98,8 @@ export class Point extends Geometry {
9898
/**
9999
* @function SuperMap.Geometry.Point.prototype.move
100100
* @description 沿着 x、y 轴的正方向上按照给定的位移移动点对象,move 不仅改变了几何对象的位置并且清理了边界缓存。
101-
* @param {float} x - x 轴正方向上的偏移量。
102-
* @param {float} y - y 轴正方向上偏移量。
101+
* @param {number} x - x 轴正方向上的偏移量。
102+
* @param {number} y - y 轴正方向上偏移量。
103103
*/
104104
move(x, y) {
105105
this.x = this.x + x;

src/common/commontypes/geometry/Polygon.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ export class Polygon extends Collection {
4040
/**
4141
* @function SuperMap.Geometry.Polygon.prototype.getArea
4242
* @description 获得区域面积,从区域的外部口径减去计此区域内部口径算所得的面积。
43-
* @returns {float} 几何对象的面积。
43+
* @returns {number} 几何对象的面积。
4444
*/
4545
getArea() {
4646
var area = 0.0;

src/common/commontypes/geometry/Rectangle.js

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,10 @@ import {Bounds} from '../Bounds';
99
* @class SuperMap.Geometry.Rectangle
1010
* @classdesc 矩形几何对象类。
1111
* @category BaseTypes Geometry
12-
* @param {float} x - 矩形左下角点的横坐标。
13-
* @param {float} y - 矩形左下角点的纵坐标。
14-
* @param {float} width - 矩形的宽度。
15-
* @param {float} height - 矩形的高度。
12+
* @param {number} x - 矩形左下角点的横坐标。
13+
* @param {number} y - 矩形左下角点的纵坐标。
14+
* @param {number} width - 矩形的宽度。
15+
* @param {number} height - 矩形的高度。
1616
* @extends {SuperMap.Geometry}
1717
* @example
1818
* //x 为矩形左下角点的横坐标;y 为矩形左下角点的纵坐标;w 为矩形的宽度;h 为矩形的高度
@@ -29,25 +29,25 @@ export class Rectangle extends Geometry {
2929
constructor(x, y, width, height) {
3030
super(x, y, width, height);
3131
/**
32-
* @member {float} SuperMap.Geometry.Rectangle.prototype.x
32+
* @member {number} SuperMap.Geometry.Rectangle.prototype.x
3333
* @description 矩形左下角点的横坐标。
3434
*/
3535
this.x = x;
3636

3737
/**
38-
* @member {float} SuperMap.Geometry.Rectangle.prototype.y
38+
* @member {number} SuperMap.Geometry.Rectangle.prototype.y
3939
* @description 矩形左下角点的纵坐标。
4040
*/
4141
this.y = y;
4242

4343
/**
44-
* @member {float} SuperMap.Geometry.Rectangle.prototype.width
44+
* @member {number} SuperMap.Geometry.Rectangle.prototype.width
4545
* @description 矩形的宽度。
4646
*/
4747
this.width = width;
4848

4949
/**
50-
* @member {float} SuperMap.Geometry.Rectangle.prototype.height
50+
* @member {number} SuperMap.Geometry.Rectangle.prototype.height
5151
* @description 矩形的高度。
5252
*/
5353
this.height = height;
@@ -70,7 +70,7 @@ export class Rectangle extends Geometry {
7070
/**
7171
* @function SuperMap.Geometry.Rectangle.prototype.getArea
7272
* @description 获取矩形对象的面积。
73-
* @returns {float} 矩形对象面积。
73+
* @returns {number} 矩形对象面积。
7474
*/
7575
getArea() {
7676
var area = this.width * this.height;

src/common/format/JSON.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ export class JSONFormat extends Format {
4444
this.newline = "\n";
4545

4646
/**
47-
* @member {integer} [SuperMap.Format.JSON.prototype.level=0]
47+
* @member {number} [SuperMap.Format.JSON.prototype.level=0]
4848
* @description 用于格式化输出, 表示的是缩进级别。
4949
*/
5050
this.level = 0;

0 commit comments

Comments
 (0)