@@ -36,26 +36,26 @@ export class Label extends GeoFeature {
3636 constructor ( name , opt_options ) {
3737 super ( name , opt_options ) ;
3838 /**
39- * @member {boolean} [Label .prototype.isOverLay=true]
39+ * @member {boolean} [LabelThemeLayer .prototype.isOverLay=true]
4040 * @description 是否进行压盖处理,如果设为 true,将隐藏被压盖的标签。
4141 */
4242 this . isOverLay = true ;
4343 /**
44- * @member {boolean} [Label .prototype.isAvoid=true]
44+ * @member {boolean} [LabelThemeLayer .prototype.isAvoid=true]
4545 * @description 是否进行地图边缘的避让处理,如果设为 true,将把与地图边缘相交的标签移到地图范围内,在地图边缘处做避让处理。
4646 */
4747 this . isAvoid = true ;
4848
4949 /**
50- * @member {string} Label .prototype.themeField
50+ * @member {string} LabelThemeLayer .prototype.themeField
5151 * @description 用于指定专题要素样式的属性字段名称。</br>
5252 * 此属性字段是要用户数据(feature) attributes 中包含的字段,且字段对应的值的类型必须是数值型。</br>
5353 * 使用标签分组显示还需要设置 styleGroups 属性。
5454 */
5555 this . themeField = null ;
5656
5757 /**
58- * @member {Array.<Object>} Label .prototype.styleGroups
58+ * @member {Array.<Object>} LabelThemeLayer .prototype.styleGroups
5959 * @description 分组样式。使用此属性需要设置 themeField 属性。</br>
6060 * 1.没有同时设置 themeField 和 styleGroups,则所有专题要素都使用本图层的 style 进行渲染;</br>
6161 * 2.同时设置 themeField 和 styleGroups,则按照 themeField 指定的字段名称获取用户数据(feature)attributes 中对应的属性值;</br>
@@ -106,7 +106,7 @@ export class Label extends GeoFeature {
106106
107107
108108 /**
109- * @function Label .prototype.redrawThematicFeatures
109+ * @function LabelThemeLayer .prototype.redrawThematicFeatures
110110 * @description 重绘所有专题要素。</br>
111111 * 此方法包含绘制专题要素的所有步骤,包含用户数据到专题要素的转换,抽稀,缓存等步骤。</br>
112112 * 地图漫游时调用此方法进行图层刷新。
@@ -123,7 +123,7 @@ export class Label extends GeoFeature {
123123 super . redrawThematicFeatures . call ( this , bounds ) ;
124124 }
125125 /**
126- * @function Label .prototype.removeFeatures
126+ * @function LabelThemeLayer .prototype.removeFeatures
127127 * @description 从专题图中删除 feature。这个函数删除所有传递进来的矢量要素。
128128 * @param {GeometryVector } features - 要删除的要素对象。
129129 */
@@ -133,7 +133,7 @@ export class Label extends GeoFeature {
133133 }
134134
135135 /**
136- * @function Label .prototype.removeAllFeatures
136+ * @function LabelThemeLayer .prototype.removeAllFeatures
137137 * @description 清除当前图层所有的矢量要素。
138138 */
139139 removeAllFeatures ( ) {
@@ -142,7 +142,7 @@ export class Label extends GeoFeature {
142142 }
143143
144144 /**
145- * @function Label .prototype.createThematicFeature
145+ * @function LabelThemeLayer .prototype.createThematicFeature
146146 * @description 创建专题图要素。
147147 * @param {Object } feature - 要创建的专题图形要素。
148148 */
@@ -170,7 +170,7 @@ export class Label extends GeoFeature {
170170
171171
172172 /**
173- * @function Label .prototype.getDrawnLabels
173+ * @function LabelThemeLayer .prototype.getDrawnLabels
174174 * @description 获取经(压盖)处理后将要绘制在图层上的标签要素。
175175 * @param {Array.<GeometryVector> } labelFeatures - 所有标签要素的数组。
176176 * @returns {Array.<GeometryVector> } 最终要绘制的标签要素数组。
@@ -334,7 +334,7 @@ export class Label extends GeoFeature {
334334
335335
336336 /**
337- * @function Label .prototype.getStyleByData
337+ * @function LabelThemeLayer .prototype.getStyleByData
338338 * @description 根据用户数据(feature)设置专题要素的 Style。
339339 * @param {GeometryVector } feat - 矢量要素对象。
340340 * @returns {Array.<ThemeStyle> } 专题要素的 Style。
@@ -383,7 +383,7 @@ export class Label extends GeoFeature {
383383 }
384384
385385 /**
386- * @function Label .prototype.setLabelsStyle
386+ * @function LabelThemeLayer .prototype.setLabelsStyle
387387 * @description 设置标签要素的 Style。
388388 * @param {Array.<GeometryVector> } labelFeatures - 需要设置 Style 的标签要素数组。
389389 * @returns {Array.<GeometryVector> } 赋予 Style 后的标签要素数组。
@@ -411,7 +411,7 @@ export class Label extends GeoFeature {
411411 }
412412
413413 /**
414- * @function Label .prototype.setStyle
414+ * @function LabelThemeLayer .prototype.setStyle
415415 * @description 设置标签要素的Style。
416416 * @param {GeometryVector } feat - 需要赋予 style 的要素。
417417 */
@@ -461,7 +461,7 @@ export class Label extends GeoFeature {
461461 }
462462
463463 /**
464- * @function Label .prototype.getLabelPxLocation
464+ * @function LabelThemeLayer .prototype.getLabelPxLocation
465465 * @description 获取标签要素的像素坐标。
466466 * @param {GeometryVector } feature - 标签要素。
467467 * @returns {mapboxgl.Point } 标签位置。
@@ -488,7 +488,7 @@ export class Label extends GeoFeature {
488488
489489
490490 /**
491- * @function Label .prototype.calculateLabelBounds
491+ * @function LabelThemeLayer .prototype.calculateLabelBounds
492492 * @description 获得标签要素的最终范围。
493493 *
494494 * @param {GeometryVector } feature - 需要计算 bounds 的标签要素数。
@@ -547,7 +547,7 @@ export class Label extends GeoFeature {
547547 }
548548
549549 /**
550- * @function Label .prototype.calculateLabelBounds2
550+ * @function LabelThemeLayer .prototype.calculateLabelBounds2
551551 * @description 获得标签要素的最终范围的另一种算法(通过记录下的标签宽高),提高计算 bounds 的效率。
552552 *
553553 * @param {GeometryVector } feature - 需要计算 bounds 的标签要素数。
@@ -643,7 +643,7 @@ export class Label extends GeoFeature {
643643 }
644644
645645 /**
646- * @function Label .prototype.getLabelInfo
646+ * @function LabelThemeLayer .prototype.getLabelInfo
647647 * @description 根据当前位置获取绘制后的标签信息,包括标签的宽,高和行数等。
648648 * @returns {Object } 绘制后的标签信息。
649649 */
@@ -742,7 +742,7 @@ export class Label extends GeoFeature {
742742 }
743743
744744 /**
745- * @function Label .prototype.rotationBounds
745+ * @function LabelThemeLayer .prototype.rotationBounds
746746 * @description 旋转 bounds。
747747 *
748748 * @param {Bounds } bounds - 要旋转的 bounds。
@@ -780,7 +780,7 @@ export class Label extends GeoFeature {
780780 }
781781
782782 /**
783- * @function Label .prototype.getRotatedLocation
783+ * @function LabelThemeLayer .prototype.getRotatedLocation
784784 * @description 获取一个点绕旋转中心顺时针旋转后的位置(此方法用于屏幕坐标)。
785785 *
786786 * @param {number } x - 旋转点横坐标。
@@ -808,7 +808,7 @@ export class Label extends GeoFeature {
808808 }
809809
810810 /**
811- * @function Label .prototype.getAvoidInfo
811+ * @function LabelThemeLayer .prototype.getAvoidInfo
812812 * @description 获取避让的信息。
813813 *
814814 * @param {Bounds } bounds - 地图像素范围。
@@ -923,7 +923,7 @@ export class Label extends GeoFeature {
923923
924924
925925 /**
926- * @function Label .prototype.isQuadrilateralOverLap
926+ * @function LabelThemeLayer .prototype.isQuadrilateralOverLap
927927 * @description 判断两个四边形是否有压盖。
928928 * @param {Array.<Object> } quadrilateral - 四边形节点数组。例如:[{"x":1,"y":1},{"x":3,"y":1},{"x":6,"y":4},{"x":2,"y":10},{"x":1,"y":1}]。
929929 * @param {Array.<Object> } quadrilateral2 - 第二个四边形节点数组。
@@ -968,7 +968,7 @@ export class Label extends GeoFeature {
968968 }
969969
970970 /**
971- * @function Label .prototype.isPointInPoly
971+ * @function LabelThemeLayer .prototype.isPointInPoly
972972 * @description 判断一个点是否在多边形里面。(射线法)
973973 *
974974 * @param {Object } pt - 需要判定的点对象,该对象含有属性x(横坐标),属性y(纵坐标)。
0 commit comments