Skip to content

Commit c1c89fd

Browse files
committed
[update] API文档补充returns
review by zhaoq
1 parent f5769df commit c1c89fd

File tree

1 file changed

+20
-3
lines changed

1 file changed

+20
-3
lines changed

src/mapboxgl/overlay/symbol/WebSymbol.js

Lines changed: 20 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,12 @@ import MapExtendSymbol from './MapExtendSymbol';
8181
* :---- |:--- |:---
8282
* id |string |符号ID
8383
*
84+
*
85+
* **Returns**
86+
* 类型 |描述
87+
* :--- |:---
88+
* boolean |符号是否存在
89+
*
8490
* **Example**
8591
* ```
8692
* const pointExists = map.hasSymbol('point-1');
@@ -103,9 +109,9 @@ import MapExtendSymbol from './MapExtendSymbol';
103109
* ## mapboxgl.Map.prototype.updateSymbol
104110
* 更新指定 ID 的符号。
105111
*
106-
* 参数名称 |类型 |描述
107-
* :---- |:--- |:---
108-
* id |string |已经添加的符号ID
112+
* |参数名称 |类型 |描述 | ||
113+
* |---- |--- |--- |---|---|
114+
* id |string |已经添加的符号ID|||
109115
* |symbol |object |由Mapbox Layers中的[paint](https://docs.mapbox.com/mapbox-gl-js/style-spec/layers/#paint-property)、[layout](https://docs.mapbox.com/mapbox-gl-js/style-spec/layers/#layout-property)(visibility 属性除外)组成的符号对象|||
110116
* | | |参数名称 |类型 |描述 |
111117
* | | |paint |object |Mapbox Layers [paint](https://docs.mapbox.com/mapbox-gl-js/style-spec/layers/#paint-property)|
@@ -124,6 +130,12 @@ import MapExtendSymbol from './MapExtendSymbol';
124130
* :---- |:--- |:---
125131
* id |string |符号ID
126132
*
133+
* **Returns**
134+
* 类型 |描述
135+
* :--- |:---
136+
* object |由Mapbox Layers中的[paint](https://docs.mapbox.com/mapbox-gl-js/style-spec/layers/#paint-property)、[layout](https://docs.mapbox.com/mapbox-gl-js/style-spec/layers/#layout-property)(visibility 属性除外)组成的符号对象
137+
*
138+
*
127139
* **Example**
128140
* ```
129141
* const point1 = map.getSymbol('point-1');
@@ -156,6 +168,11 @@ import MapExtendSymbol from './MapExtendSymbol';
156168
* index |number |符号数组的index, 符号不是数组的设置为null
157169
* name |string |属性名称
158170
*
171+
* **Returns**
172+
* 类型 |描述
173+
* :--- |:---
174+
* any |属性值
175+
*
159176
* **Example**
160177
* ```
161178
* map.getSymbolProperty('point-1', null, "icon-color");

0 commit comments

Comments
 (0)