Skip to content

Commit 9fb4aad

Browse files
committed
【fix】jsdoc
1 parent 6aabe7b commit 9fb4aad

File tree

4 files changed

+24
-4
lines changed

4 files changed

+24
-4
lines changed

build/jsdocs/openlayers/docs.json

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -62,9 +62,7 @@
6262
"src/common/components/templates/PopContainer",
6363
"src/common/components/templates/Select",
6464
"src/common/security/KeyServiceParameter",
65-
"src/common/components/templates/TemplateBase",
66-
67-
"src/openlayers/core/Util"
65+
"src/common/components/templates/TemplateBase"
6866
]
6967
},
7068
"plugins": ["plugins/markdown","../plugins/usage", "../plugins/moduleCategories"],

src/mapboxgl/core/decryptSource.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
* @name decryptSources
33
* @namespace
44
* @category BaseTypes Util
5+
* @version 11.2.0
56
* @description 配置需要解密的矢量瓦片的sourceId。
67
* @usage
78
* ```
@@ -24,6 +25,7 @@ const decryptSources = {
2425
* @description 设置需要解密的矢量瓦片的sourceId数组
2526
* @param {Array.<string>} sourceIds sourceId数组
2627
* @returns {Array.<string>} sourceId数组
28+
* @version 11.2.0
2729
*/
2830
set(sourceIds) {
2931
this.values = sourceIds;
@@ -34,6 +36,7 @@ const decryptSources = {
3436
* @description 添加需要解密的矢量瓦片的sourceId
3537
* @param {string} sourceId sourceId
3638
* @returns {Array.<string>} sourceId
39+
* @version 11.2.0
3740
*/
3841
add(sourceId) {
3942
this.values.push(sourceId);

src/openlayers/core/Util.js

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
* // ES6 Import
3232
* import { Util } from '{npm}';
3333
*
34-
* const result = Util.getOlVersion();
34+
* const result = Util.setMask();
3535
* ```
3636
*/
3737
export const Util = {
@@ -54,6 +54,7 @@
5454
* @function Util.toGeoJSON
5555
* @description 将传入对象转为 GeoJSON 格式。
5656
* @param {Object} smObj - 待转换参数。
57+
* @private
5758
*/
5859
toGeoJSON(smObj) {
5960
if (!smObj) {
@@ -66,6 +67,7 @@
6667
* @function Util.toSuperMapGeometry
6768
* @description 将 GeoJSON 对象转为 SuperMap 几何图形。
6869
* @param {GeoJSONObject} geoJSON - GeoJSON 对象。
70+
* @private
6971
*/
7072
toSuperMapGeometry(geoJSON) {
7173
if (!geoJSON || !geoJSON.type) {
@@ -82,6 +84,7 @@
8284
* @param {number} dpi - 屏幕分辨率。
8385
* @param {string} mapUnit - 地图单位。
8486
* @returns {number} 比例尺。
87+
* @private
8588
*/
8689
resolutionToScale(resolution, dpi, mapUnit) {
8790
const inchPerMeter = 1 / 0.0254;
@@ -96,6 +99,7 @@
9699
* @description 转为 SuperMapBounds 格式。
97100
* @param {Array.<number>} bounds - bounds 数组。
98101
* @returns {Bounds} 返回 SuperMap 的 Bounds 对象。
102+
* @private
99103
*/
100104
toSuperMapBounds(bounds) {
101105
if (bounds instanceof Bounds) {
@@ -109,6 +113,7 @@
109113
* @description 将 Region 节点数组转为 Processing 服务需要的分析参数。
110114
* @param {Array} points - Region 各个节点数组。
111115
* @returns processing 服务裁剪、查询分析的分析参数。
116+
* @private
112117
*/
113118
toProcessingParam(points) {
114119
if (points.length < 1) {
@@ -134,6 +139,7 @@
134139
* @param {number} dpi - 屏幕分辨率。
135140
* @param {string} mapUnit - 地图单位。
136141
* @returns {number} 分辨率。
142+
* @private
137143
*/
138144
scaleToResolution(scale, dpi, mapUnit) {
139145
const inchPerMeter = 1 / 0.0254;
@@ -148,6 +154,7 @@
148154
* @description 获取每地图单位多少米。
149155
* @param {string} mapUnit - 地图单位。
150156
* @returns {number} 返回每地图单位多少米。
157+
* @private
151158
*/
152159
getMeterPerMapUnit,
153160

@@ -156,6 +163,7 @@
156163
* @description 判断是否为数组格式。
157164
* @param {Object} obj - 待判断对象。
158165
* @returns {boolean} 是否是数组。
166+
* @private
159167
*/
160168
isArray,
161169

@@ -164,6 +172,7 @@
164172
* @description 将 csv 格式转为 GeoJSON。
165173
* @param {Object} csv - csv 对象。
166174
* @param {Object} options - 转换参数。
175+
* @private
167176
*/
168177
Csv2GeoJSON(csv, options) {
169178
const defaultOptions = {
@@ -252,6 +261,7 @@
252261
* @description 创建 2D 画布。
253262
* @param {number} opt_width - 画布宽度。
254263
* @param {number} opt_height - 画布高度。
264+
* @private
255265
*/
256266
createCanvasContext2D(opt_width, opt_height) {
257267
const canvas = document.createElement('CANVAS');
@@ -266,6 +276,7 @@
266276
/**
267277
* @function Util.supportWebGL2
268278
* @description 是否支持 webgl2。
279+
* @private
269280
*/
270281
supportWebGL2() {
271282
const canvas = document.createElement('canvas');
@@ -277,13 +288,15 @@
277288
* @description 是否为字符串
278289
* @param {string} str - 需要判断的内容
279290
* @returns {boolean}
291+
* @private
280292
*/
281293
isString,
282294
/**
283295
* @function Util.isObject
284296
* @description 是否为对象
285297
* @param {any} obj - 需要判断的内容
286298
* @returns {boolean}
299+
* @private
287300
*/
288301
isObject(obj) {
289302
return Object.prototype.toString.call(obj) === '[object Object]';
@@ -294,6 +307,7 @@
294307
* @description 字符串裁剪两边的空格
295308
* @param {string} str - 需要裁剪的字符串
296309
* @returns {boolean}
310+
* @private
297311
*/
298312
trim(str = '') {
299313
return str.replace(/(^\s*)|(\s*$)/g, '');
@@ -303,6 +317,7 @@
303317
* @description 随机生成id
304318
* @param {string} attr - 几位数字的id
305319
* @returns {string}
320+
* @private
306321
*/
307322
newGuid(attr) {
308323
let len = attr || 32;
@@ -318,6 +333,7 @@
318333
* @description 检测数据是否为number
319334
* @param {string} value - 值,未知数据类型
320335
* @returns {boolean}
336+
* @private
321337
*/
322338
isNumber(value) {
323339
if (value === '') {
@@ -336,6 +352,7 @@
336352
* @param {string} featureName 原始数据中的地名
337353
* @param {string} fieldName 需要匹配的地名
338354
* @returns {boolean} 是否匹配
355+
* @private
339356
*/
340357
isMatchAdministrativeName,
341358

@@ -344,6 +361,7 @@
344361
* @param {string} featureName 初始匹配的要素数组
345362
* @param {string} fieldName 要匹配的地名
346363
* @returns {boolean} 是否匹配
364+
* @private
347365
*/
348366
getHighestMatchAdministration(features, fieldName) {
349367
let filterFeatures = features.filter((item) => {

src/openlayers/mapping/TileSuperMapRest.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -372,6 +372,7 @@ export class TileSuperMapRest extends TileImage {
372372
* @function TileSuperMapRest.updateParams
373373
* @description 更新参数。
374374
* @param {Object} params - 参数对象。
375+
* @version 11.2.0
375376
*/
376377
updateParams(params) {
377378
Object.assign(this.requestParams, params);

0 commit comments

Comments
 (0)