@@ -7,11 +7,11 @@ import {Util} from './Util';
77/**
88 * @class SuperMap.Bounds
99 * @classdesc 表示边界类实例。使用bounds之前需要设置left,bottom, right, top四个属性,这些属性的初始值为null。
10- * @param left - {number} 左边界,注意考虑宽度,理论上小于right值。
11- * @param bottom - {number} 下边界。考虑高度,理论上小于top值。
12- * @param right - {number} 右边界。
13- * @param top - {number} 上边界。
14- * @param array - {Array<number>} [left, bottom, right, top] 如果同时传多个参数,则使用左下右上组成的数组。
10+ * @param { number } left - 左边界,注意考虑宽度,理论上小于right值。
11+ * @param { number } bottom - 下边界。考虑高度,理论上小于top值。
12+ * @param { number } right - 右边界。
13+ * @param { number } top - 上边界。
14+ * @param {Array. <number> } array - [left, bottom, right, top], 如果同时传多个参数,则使用左下右上组成的数组。
1515 * @example
1616 * var bounds = new SuperMap.Bounds();
1717 * bounds.extend(new SuperMap.LonLat(4,5));
@@ -115,9 +115,9 @@ export class Bounds {
115115 * var array1 = bounds.toArray();
116116 * //array1 = [-90,-180,80,100];
117117 * var array2 = bounds.toArray(true);
118- * @param reverseAxisOrder - {boolean} 是否反转轴顺序,
118+ * @param {boolean } reverseAxisOrder - 是否反转轴顺序,
119119 * 如果设为true,则倒转顺序(bottom,left,top,right),否则按正常轴顺序(left,bottom,right,top)。
120- * @returns {Array } left, bottom, right, top数组。
120+ * @returns {Array.<number> } left, bottom, right, top数组。
121121 */
122122 toArray ( reverseAxisOrder ) {
123123 if ( reverseAxisOrder === true ) {
@@ -138,8 +138,8 @@ export class Bounds {
138138 * var str2 = bounds.toBBOX(1);
139139 * //str2 = "-1.8,-1.1,1.6,1.4";
140140 * var str2 = bounds.toBBOX(1,true);
141- * @param decimal - {integer} 边界方位坐标的有效数字个数,默认为6。
142- * @param reverseAxisOrder - {boolean} 是否是反转轴顺序。
141+ * @param {integer } decimal - 边界方位坐标的有效数字个数,默认为6。
142+ * @param { boolean } reverseAxisOrder - 是否是反转轴顺序。
143143 * 如果设为true,则倒转顺序(bottom,left,top,right),否则按正常轴顺序(left,bottom,right,top)。
144144 * @returns {string } 边界对象的字符串表示形式,如:"5,42,10,45"。
145145 */
@@ -253,8 +253,8 @@ export class Bounds {
253253 * @example
254254 * var bounds = new SuperMap.Bounds(-50,-50,40,40);
255255 * var bounds2 = bounds.scale(2);
256- * @param ratio - {float} 需要扩大的比例,默认为1。
257- * @param origin - { SuperMap.Pixel|SuperMap.LonLat} 扩大时的基准点,默认为当前bounds的中心点。
256+ * @param {float } ratio - 需要扩大的比例,默认为1。
257+ * @param { ( SuperMap.Pixel|SuperMap.LonLat) } origin - 扩大时的基准点,默认为当前bounds的中心点。
258258 * @returns {SuperMap.Bounds } 返回通过ratio、origin计算得到的新的边界范围。
259259 */
260260 scale ( ratio , origin ) {
@@ -289,8 +289,8 @@ export class Bounds {
289289 * var bounds1 = new SuperMap.Bounds(-50,-50,40,40);
290290 * //bounds2 是新的 bounds
291291 * var bounds2 = bounds.add(20,10);
292- * @param x - {float} 传入坐标点的x坐标。
293- * @param y - {float} 传入坐标点的y坐标。
292+ * @param {float } x - 传入坐标点的x坐标。
293+ * @param {float } y - 传入坐标点的y坐标。
294294 * @returns {SuperMap.Bounds } 返回一个新的bounds,此bounds的坐标是由传入的x,y参数与当前bounds坐标计算所得。
295295 */
296296 add ( x , y ) {
@@ -308,7 +308,7 @@ export class Bounds {
308308 * var bounds1 = new SuperMap.Bounds(-50,-50,40,40);
309309 * //bounds改变
310310 * bounds.extend(new SuperMap.LonLat(50,60));
311- * @param object - { SuperMap.Geometry.Point|SuperMap.LonLat | SuperMap.Bounds} 可以是point,lanlat和bounds 。
311+ * @param { ( SuperMap.Geometry.Point|SuperMap.LonLat| SuperMap.Bounds) } object - 可以是point、lonlat和bounds 。
312312 */
313313 extend ( object ) {
314314 var bounds = null ;
@@ -367,13 +367,12 @@ export class Bounds {
367367 * worldBounds: new SuperMap.Bounds(-180,-90,180,90)
368368 * }
369369 * );
370- * @param ll - {SuperMap.LonLat|Object} <SuperMap.LonLat> 对象或者是一个
371- * 包含 'lon' 与 'lat' 属性的对象。
372- * @param options - {Object} 可选参数<br>
373- * inclusive - {boolean} 是否包含边界,默认为 true 。<br>
374- * worldBounds - {@link SuperMap.Bounds} 如果提供 worldBounds 参数, 如果 ll 参数提供的坐标超出了世界边界(worldBounds),
375- * 但是通过日界线的转化可以被包含, 它将被认为是包含在该范围内的。
376- * @returns {boolean } 传入坐标是否包含在范围内.
370+ * @param {(SuperMap.LonLat|Object) } ll - <SuperMap.LonLat> 对象或者是一个包含 'lon' 与 'lat' 属性的对象。
371+ * @param {Object } options - 可选参数<br>
372+ * @param {boolean } options.inclusive - 是否包含边界,默认为 true。<br>
373+ * @param {SuperMap.Bounds } options.worldBounds - 如果提供 worldBounds 参数, 如果 ll 参数提供的坐标超出了世界边界(worldBounds),
374+ * 但是通过日界线的转化可以被包含, 它将被认为是包含在该范围内的。
375+ * @returns {boolean } 传入坐标是否包含在范围内。
377376 */
378377 containsLonLat ( ll , options ) {
379378 if ( typeof options === "boolean" ) {
@@ -403,8 +402,8 @@ export class Bounds {
403402 * var bounds = new SuperMap.Bounds(-50,-50,40,40);
404403 * //isContains = true
405404 * var isContains = bounds.containsPixel(new SuperMap.Pixel(40,40),true);
406- * @param px - {SuperMap.Pixel} 提供的像素参数。
407- * @param inclusive - {boolean} 是否包含边界,默认为true。
405+ * @param {SuperMap.Pixel } px - 提供的像素参数。
406+ * @param {boolean } inclusive - 是否包含边界,默认为true。
408407 * @returns {boolean } 传入的pixel在当前边界范围之内。
409408 */
410409 containsPixel ( px , inclusive ) {
@@ -418,9 +417,9 @@ export class Bounds {
418417 * var bounds = new SuperMap.Bounds(-50,-50,40,40);
419418 * //isContains = true
420419 * var isContains = bounds.contains(40,40,true);
421- * @param x - {float} 传入的x坐标值。
422- * @param y - {float} 传入的y坐标值。
423- * @param inclusive - {boolean} 是否包含边界,默认为true。
420+ * @param {float } x - 传入的x坐标值。
421+ * @param {float } y - 传入的y坐标值。
422+ * @param {boolean } inclusive - 是否包含边界,默认为true。
424423 * @returns {boolean } 传入的x,y坐标在当前范围内。
425424 */
426425 contains ( x , y , inclusive ) {
@@ -450,20 +449,19 @@ export class Bounds {
450449 /**
451450 * @function SuperMap.Bounds.prototype.intersectsBounds
452451 * @description 判断目标边界范围是否与当前边界范围相交。如果两个边界范围中的任意
453- * 边缘相交或者一个边界包含了另外一个就认为这两个边界相交。
452+ * 边缘相交或者一个边界包含了另外一个就认为这两个边界相交。
454453 * @example
455454 * var bounds = new SuperMap.Bounds(-180,-90,100,80);
456455 * var isIntersects = bounds.intersectsBounds(
457456 * new SuperMap.Bounds(-170,-90,120,80)
458457 * );
459- * @param bounds - {SuperMap.Bounds} 目标边界。
460- * @param options - {Object} 可选参数。<br>
461- * inclusive - {boolean} 边缘重合也看成相交,默认为true。如果是false,
458+ * @param {SuperMap.Bounds } bounds - 目标边界。
459+ * @param {Object } options - 可选参数。<br>
460+ * @param { boolean } options. inclusive - 边缘重合也看成相交,默认为true。如果是false,
462461 * 两个边界范围没有重叠部分仅仅是在边缘相接(重合),
463462 * 这种情况被认为没有相交。<br>
464- * worldBounds - {@link SuperMap.Bounds} 提供了 worldBounds 参数, 如果他们相交时
465- * 是在全球范围内, 两个边界将被视为相交。这仅适用于交叉
466- * 或完全不在世界范围的边界。
463+ * @param {SuperMap.Bounds } options.worldBounds - 提供了 worldBounds 参数, 如果他们相交时
464+ * 是在全球范围内, 两个边界将被视为相交。这仅适用于交叉或完全不在世界范围的边界。
467465 * @returns {boolean } 传入的bounds对象与当前bounds相交。
468466 */
469467 intersectsBounds ( bounds , options ) {
@@ -536,10 +534,10 @@ export class Bounds {
536534 * var isContains = bounds.containsBounds(
537535 * new SuperMap.Bounds(-170,-90,100,80),true,true
538536 * );
539- * @param bounds - {SuperMap.Bounds} 目标边界。
540- * @param partial - {boolean} 目标边界的任意部分都包含在当前边界中则被认为是包含关系。默认为false,
541- * 如果设为false,整个目标边界全部被包含在当前边界范围内。
542- * @param inclusive - {boolean} 边缘共享被视为包含。默认为true。
537+ * @param {SuperMap.Bounds } bounds - 目标边界。
538+ * @param {boolean } partial - 目标边界的任意部分都包含在当前边界中则被认为是包含关系。默认为false,
539+ * 如果设为false,整个目标边界全部被包含在当前边界范围内。
540+ * @param {boolean } inclusive - 边缘共享被视为包含。默认为true。
543541 * @returns {boolean } 传入的边界被当前边界包含。
544542 */
545543 containsBounds ( bounds , partial , inclusive ) {
@@ -567,7 +565,7 @@ export class Bounds {
567565 * var str = bounds.determineQuadrant(
568566 * new SuperMap.LonLat(20,20)
569567 * );
570- * @param lonlat - {SuperMap.LonLat} 传入的坐标对象。
568+ * @param {SuperMap.LonLat } lonlat - 传入的坐标对象。
571569 * @returns {string } 传入坐标所在的象限("br" "tr" "tl" "bl" 分别对应"右下","右上","左上" "左下")。
572570 */
573571 determineQuadrant ( lonlat ) {
@@ -589,13 +587,13 @@ export class Bounds {
589587 * var maxExtent = new SuperMap.Bounds(-180,-90,100,80);
590588 * //新的bounds
591589 * var newBounds = bounds.wrapDateLine(maxExtent);
592- * @param maxExtent - {SuperMap.Bounds} 最大的边界范围(一般是全球范围)。
593- * @param options - {Object} 可选选项参数。<br>
594- * leftTolerance - {float} left允许的误差。默认为0。<br>
595- * rightTolerance - {float} right允许的误差。默认为0。
590+ * @param {SuperMap.Bounds } maxExtent - 最大的边界范围(一般是全球范围)。
591+ * @param {Object } options - 可选选项参数。<br>
592+ * @param { float } options. leftTolerance - left允许的误差。默认为0。<br>
593+ * @param { float } options. rightTolerance - right允许的误差。默认为0。
596594 * @returns {SuperMap.Bounds } 克隆当前边界。如果当前边界完全在最大范围之外此函数则返回一个不同值的边界,
597- * 若落在最大边界的左边,则给当前的bounds值加上最大范围的宽度,即向右移动,
598- * 若落在右边,则向左移动,即给当前的bounds值加上负的最大范围的宽度。
595+ * 若落在最大边界的左边,则给当前的bounds值加上最大范围的宽度,即向右移动,
596+ * 若落在右边,则向左移动,即给当前的bounds值加上负的最大范围的宽度。
599597 */
600598 wrapDateLine ( maxExtent , options ) {
601599 options = options || { } ;
@@ -673,8 +671,8 @@ export class Bounds {
673671 * @description 通过字符串参数创建新的bounds的构造函数。
674672 * @example
675673 * var bounds = SuperMap.Bounds.fromString("-180,-90,100,80");
676- * @param str - {string} 边界字符串,用逗号隔开 (e.g. <i>"5,42,10,45"</i>)
677- * @param reverseAxisOrder - {boolean} 是否反转轴顺序.
674+ * @param {string } str - 边界字符串,用逗号隔开 (e.g. <i>"5,42,10,45"</i>)
675+ * @param {boolean } reverseAxisOrder - 是否反转轴顺序.
678676 * 如果设为true,则倒转顺序(bottom,left,top,right),否则按正常轴顺序(left,bottom,right,top)。
679677 * @returns {SuperMap.Bounds } 返回给定的字符串创建的新的边界对象
680678 */
@@ -688,8 +686,8 @@ export class Bounds {
688686 * @description 通过边界框数组创建Bounds。
689687 * @example
690688 * var bounds = SuperMap.Bounds.fromArray([-180,-90,100,80]);
691- * @param bbox - {Array( float)} 边界值数组。 (e.g. <i>[5,42,10,45]</i>)
692- * @param reverseAxisOrder - {boolean} 是否是反转轴顺序。如果设为true,则倒转顺序(bottom,left,top,right),否则按正常轴顺序(left,bottom,right,top)。
689+ * @param {Array.< float> } bbox - 边界值数组。 (e.g. <i>[5,42,10,45]</i>)
690+ * @param {boolean } reverseAxisOrder - 是否是反转轴顺序。如果设为true,则倒转顺序(bottom,left,top,right),否则按正常轴顺序(left,bottom,right,top)。
693691 * @returns {SuperMap.Bounds } 返回根据传入的数组创建的新的边界对象。
694692 */
695693 static fromArray ( bbox , reverseAxisOrder ) {
@@ -703,7 +701,7 @@ export class Bounds {
703701 * @description 通过传入的边界大小来创建新的边界。
704702 * @example
705703 * var bounds = SuperMap.Bounds.fromSize(new SuperMap.Size(20,10));
706- * @param size - {SuperMap.Size} 传入的边界大小。
704+ * @param {SuperMap.Size } size - 传入的边界大小。
707705 * @returns {SuperMap.Bounds } 返回根据传入的边界大小的创建新的边界。
708706 */
709707 static fromSize ( size ) {
@@ -716,7 +714,7 @@ export class Bounds {
716714 /**
717715 * @function SuperMap.Bounds.oppositeQuadrant
718716 * @description 反转象限。"t"和"b" 交换,"r"和"l"交换, 如:"tl"变为"br"。
719- * @param quadrant - {string} 代表象限的字符串,如:"tl"。
717+ * @param {string } quadrant - 代表象限的字符串,如:"tl"。
720718 * @returns {string } 反转后的象限。
721719 */
722720 static oppositeQuadrant ( quadrant ) {
0 commit comments