Skip to content

Commit 9a8e337

Browse files
committed
优化中文API review by songym
1 parent caf843b commit 9a8e337

23 files changed

+622
-612
lines changed

build/jsdocs/template/config.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -297,6 +297,10 @@
297297
"name": "高效率点图层",
298298
"name_en": "Graphic"
299299
},
300+
"DeckGL": {
301+
"name": "DeckGL",
302+
"name_en": "DeckGL"
303+
},
300304
"Theme": {
301305
"name": "客户端专题图",
302306
"name_en": "Theme"

src/mapboxgl/control/Logo.js

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5,18 +5,18 @@ import {LogoBase64} from '@supermap/iclient-common/control/img/Logo';
55
/**
66
* @class mapboxgl.supermap.LogoControl
77
* @category Control
8-
* @classdesc Logo控件。默认不显示</br>
8+
* @classdesc Logo控件。默认不显示
99
*
1010
* @example
1111
* (start code)
1212
* map.addControl(new mapboxgl.supermap.LogoControl(),'bottom-right');
1313
* (end)
14-
* @param {Object} options - logo控件配置项</br>
15-
* @param {string} options.imageUrl - logo图片地址</br>
16-
* @param {string} options.width - logo图片宽</br>
17-
* @param {string} options.height - logo图片高</br>
18-
* @param {string} options.link - logo图片跳转链接</br>
19-
* @param {string} options.alt - logo图片失效时显示文本
14+
* @param {Object} options - logo控件配置项
15+
* @param {string} [options.imageUrl] - logo图片地址
16+
* @param {string} [options.width] - logo图片宽
17+
* @param {string} [options.height] - logo图片高
18+
* @param {string} [options.link] - logo图片跳转链接
19+
* @param {string} [options.alt='SuperMap iClient'] - logo图片失效时显示文本
2020
*/
2121
export class Logo {
2222
constructor(options) {
@@ -35,8 +35,8 @@ export class Logo {
3535

3636
/**
3737
* @function mapboxgl.supermap.LogoControl.prototype.onAdd
38-
* @description 添加一个logo
39-
* @returns {div} 返回创建的logo元素
38+
* @description 添加一个logo
39+
* @returns {div} 返回创建的logo元素
4040
*/
4141
onAdd(map) {
4242
this._map = map;

src/mapboxgl/core/MapExtend.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import '../core/Base';
33

44
/**
55
* @function mapboxgl.supermap.MapExtend
6-
* @description 扩展了mapboxgl.Map对图层相关的操作
6+
* @description 扩展了mapboxgl.Map对图层相关的操作
77
* @private
88
*/
99
export var MapExtend = function () {
@@ -78,7 +78,7 @@ export var MapExtend = function () {
7878

7979
/**
8080
* @function mapboxgl.supermap.MapExtend.prototype.removeFromMap
81-
* @description 移除事件
81+
* @description 移除事件
8282
*/
8383
function removeLayer(layer) {
8484
layer.removeFromMap();
@@ -87,7 +87,7 @@ export var MapExtend = function () {
8787
/**
8888
* @function mapboxgl.supermap.MapExtend.prototype.setVisibility
8989
* @description 设置图层可见性,设置图层的隐藏,显示,重绘的相应的可见标记。
90-
* @param {boolean} visibility - 是否显示图层(当前地图的resolution在最大最小resolution之间)。
90+
* @param {boolean} [visibility] - 是否显示图层(当前地图的resolution在最大最小resolution之间)。
9191
*/
9292
function setVisibility(layer, visibility) {
9393
layer.setVisibility(visibility);
@@ -96,8 +96,8 @@ export var MapExtend = function () {
9696
/**
9797
* @function mapboxgl.supermap.MapExtend.prototype.moveTo
9898
* @description 将图层移动到某个图层之前。
99-
* @param {string} layerID -待插入的图层ID。</br>
100-
* @param {boolean} beforeLayerID - 是否将本图层插入到图层id为layerID的图层之前(如果为false则将本图层插入到图层id为layerID的图层之后)。
99+
* @param {string} layerID -待插入的图层ID。
100+
* @param {boolean} [beforeLayerID] - 是否将本图层插入到图层id为layerID的图层之前(如果为false则将本图层插入到图层id为layerID的图层之后)。
101101
*/
102102
function moveLayer(layerID, beforeLayerID) {
103103
var layer = document.getElementById(layerID);

src/mapboxgl/core/Util.js

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,14 @@ import {Bounds, GeometryPoint, GeoJSON as GeoJSONFormat} from '@supermap/iclient
44

55
/**
66
* @class mapboxgl.supermap.Util
7-
* @classdesc 工具类
7+
* @classdesc 工具类
88
*/
99
export class Util {
1010

1111
/**
1212
* @function mapboxgl.supermap.Util.toSuperMapGeometry
13-
* @description 将 geoJSON 对象转为SuperMap几何图形
14-
* @param {Object} geoJSON - geoJSON 对象
13+
* @description 将 geoJSON 对象转为SuperMap几何图形
14+
* @param {Object} geoJSON - geoJSON 对象
1515
*/
1616
static toSuperMapGeometry(geoJSON) {
1717
if (geoJSON && geoJSON.type) {
@@ -51,9 +51,9 @@ export class Util {
5151

5252
/**
5353
* @function mapboxgl.supermap.Util.isArray
54-
* @description 判断是否为数组格式
55-
* @param {Object} obj - 待判断对象
56-
* @returns {boolean} 是否是数组
54+
* @description 判断是否为数组格式
55+
* @param {Object} obj - 待判断对象
56+
* @returns {boolean} 是否是数组
5757
*/
5858
static isArray(obj) {
5959
return Object.prototype.toString.call(obj) == '[object Array]'
@@ -62,8 +62,8 @@ export class Util {
6262

6363
/**
6464
* @function mapboxgl.supermap.Util.toGeoJSON
65-
* @description 将传入对象转为 GeoJSON 格式
66-
* @param {Object} smObj - 待转参数
65+
* @description 将传入对象转为 GeoJSON 格式
66+
* @param {Object} smObj - 待转参数
6767
*/
6868
static toGeoJSON(smObj) {
6969
if (smObj) {
@@ -74,9 +74,9 @@ export class Util {
7474

7575
/**
7676
* @function mapboxgl.supermap.Util.toProcessingParam
77-
* @description 将Region节点数组转为Processing服务需要的分析参数
78-
* @param {Array} points - Region各个节点数组
79-
* @returns {Object} processing 服务裁剪、查询分析的分析参数
77+
* @description 将Region节点数组转为Processing服务需要的分析参数
78+
* @param {Array} points - Region各个节点数组
79+
* @returns {Object} processing 服务裁剪、查询分析的分析参数
8080
*/
8181
static toProcessingParam(points) {
8282
var geometryParam = {};
@@ -98,10 +98,10 @@ export class Util {
9898

9999
/**
100100
* @function mapboxgl.supermap.Util.extend
101-
* @description 对象拷贝赋值
102-
* @param {Object} dest - 目标对象
103-
* @param {Object} arguments - 待拷贝的对象
104-
* @returns {Object} 赋值后的目标对象
101+
* @description 对象拷贝赋值
102+
* @param {Object} dest - 目标对象
103+
* @param {Object} arguments - 待拷贝的对象
104+
* @returns {Object} 赋值后的目标对象
105105
*/
106106
static extend(dest) {
107107
for (var index = 0; index < Object.getOwnPropertyNames(arguments).length; index++) {

0 commit comments

Comments
 (0)