Skip to content

Commit 76c014f

Browse files
committed
优化api
1 parent 9790bc6 commit 76c014f

File tree

6 files changed

+20
-20
lines changed

6 files changed

+20
-20
lines changed

src/mapboxgl/overlay/GraphThemeLayer.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ export class Graph extends Theme {
122122
/**
123123
* @function mapboxgl.supermap.GraphThemeLayer.prototype.createThematicFeature
124124
* @description 向专题图图层中添加数据, 支持的 feature 类型为:iServer 返回的 feature json 对象。
125-
* @param {Object} feature - 待填加得要素
125+
* @param {Object} feature - 待添加的要素
126126
*
127127
*/
128128
createThematicFeature(feature) {

src/mapboxgl/overlay/LabelThemeLayer.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,8 @@ export class Label extends GeoFeature {
5757
* @description 分组样式。使用此属性需要设置 themeField 属性。</br>
5858
* 1.没有同时设置 themeField 和 styleGroups,则所有专题要素都使用本图层的 style 进行渲染;</br>
5959
* 2.同时设置 themeField 和 styleGroups,则按照 themeField 指定的字段名称获取用户数据(feature)attributes 中对应的属性值;</br>
60-
* a.如果属性值等于 styleGroups 数组里某个元素定义的 value 值,则此专题要素取 styleGroups 数组中该元素定义的 style 进行渲染。</br>
61-
* b.如果属性值不等于 styleGroups 数组里任何元素定义的 value 值,则此专题要素按照本图层的 style 进行渲染。</br>
60+
* &nbsp;&nbsp;a.如果属性值等于 styleGroups 数组里某个元素定义的 value 值,则此专题要素取 styleGroups 数组中该元素定义的 style 进行渲染。</br>
61+
* &nbsp;&nbsp;b.如果属性值不等于 styleGroups 数组里任何元素定义的 value 值,则此专题要素按照本图层的 style 进行渲染。</br>
6262
* 此数组每个元素对象必须有两个属性:value : 与字段 themeField 相对应的属性值;style:专题要素 style。
6363
*/
6464
this.styleGroups = null;

src/mapboxgl/overlay/RangeTheme3DLayer.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ export class RangeTheme3DLayer extends Theme3DLayer {
5858
/**
5959
* @function mapboxgl.supermap.RangeTheme3DLayer.prototype.getLayerStyleOptions
6060
* @description 获取图层样式。
61-
* @returns {Object} mapboxgl 样式对象。
61+
* @returns {Object} Mapbox GL 样式对象。
6262
*/
6363
getLayerStyleOptions() {
6464
var opacity = this.opacity == null ? 1 : this.opacity;

src/mapboxgl/overlay/RankSymbolThemeLayer.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ import {FeatureTheme} from '@supermap/iclient-common';
1717
* @param {string} opt_options.themeFields - 指定创建专题图字段。
1818
* @param {boolean} [opt_options.isOverLay=true] - 是否进行压盖处理,如果设为 true,图表绘制过程中将隐藏对已在图层中绘制的图表产生压盖的图表。
1919
* @param {string} [opt_options.chartsType] - 图表类型。目前可用:"Bar", "Line", "Pie"。
20-
* @param {Object} [opt_options.symbolSetting] - 各类型图表的 symbolSetting 对象可设属性请参考具体图表模型类的注释中对 symbolSetting 对象可设属性的描述。symbolSetting 对象通常都具有以下 5 个基础可设属性:</br>
20+
* @param {Object} [opt_options.symbolSetting] - 各类型图表的 symbolSetting 对象可设属性请参考具体图表模型类的注释中对 symbolSetting 对象可设属性的描述。symbolSetting 对象通常都具有以下 5 个基础可设属性:
2121
* @param {number} [opt_options.symbolSetting.width] - 专题要素(图表)宽度。
2222
* @param {number} [opt_options.symbolSetting.height] - 专题要素(图表)高度。
2323
* @param {Array.<number>} opt_options.symbolSetting.codomain - 值域,长度为 2 的一维数组,第一个元素表示值域下限,第二个元素表示值域上限。

src/mapboxgl/overlay/ThreeLayer.js

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,9 @@ const {
2121
/**
2222
* @class mapboxgl.supermap.ThreeLayer
2323
* @category Visualization Three
24-
* @classdesc Three图层
24+
* @classdesc Three 图层
2525
* @param {string} id - 图层 ID。
26-
* @param {string} [renderer="gl"] - 图层渲染方式(canvas或WebGL)。取值:"gl","canvas"。
26+
* @param {string} [renderer="gl"] - 图层渲染方式( canvas 或 WebGL )。取值:"gl","canvas"。
2727
* @param {object} options - 初始化参数。
2828
* @param {object} options.threeOptions - threejs 渲染器初始化参数对象。参数内容详见:
2929
* [WebGLRenderer]{@link https://threejs.org/docs/index.html#api/renderers/WebGLRenderer}
@@ -49,8 +49,8 @@ const {
4949
* }
5050
*
5151
* 叠加模型可以通过两种方式:</br>
52-
* 1.调用 threeLayer.toThreeMesh 直接将地理坐标转换成threejs 3D 模型(适用于挤压模型,如城市建筑),然后添加到3D场景
53-
* 2.使用 ThreeJS 的接口创建好 Mesh,然后调用 threeLayer.setPosition 设置地理位置,然后添加到3D场景
52+
* 1.调用 threeLayer.toThreeMesh 直接将地理坐标转换成 threejs 3D 模型(适用于挤压模型,如城市建筑),然后添加到 3D 场景
53+
* 2.使用 ThreeJS 的接口创建好 Mesh,然后调用 threeLayer.setPosition 设置地理位置,然后添加到 3D 场景
5454
*
5555
*/
5656
export class ThreeLayer extends mapboxgl.Evented {
@@ -66,7 +66,7 @@ export class ThreeLayer extends mapboxgl.Evented {
6666

6767
/**
6868
* @function mapboxgl.supermap.ThreeLayer.prototype.toThreeShape
69-
* @description 创建threejs shape 对象。
69+
* @description 创建 threejs shape 对象。
7070
* @param {Array} coordinates - 坐标点数组。
7171
* @returns THREE.Shape{@link https://threejs.org/docs/index.html#api/extras/core/Shape} threejs shape 对象。
7272
*/
@@ -86,7 +86,7 @@ export class ThreeLayer extends mapboxgl.Evented {
8686

8787
/**
8888
* @function mapboxgl.supermap.ThreeLayer.prototype.toThreeMesh
89-
* @description 创建threejs Mesh 对象。将地理坐标转换成 threejs 3D 模型(适用于挤压模型,如城市建筑)。
89+
* @description 创建 threejs Mesh 对象。将地理坐标转换成 threejs 3D 模型(适用于挤压模型,如城市建筑)。
9090
* @param {Array.<Object>} coordinates - 坐标点数组。
9191
* @param {number} amount - 高度。
9292
* @param {THREE.Material} material - Threejs 材质对象。参考:[THREE.Material]{@link https://threejs.org/docs/index.html#api/extras/core/Material}
@@ -117,7 +117,7 @@ export class ThreeLayer extends mapboxgl.Evented {
117117

118118
/**
119119
* @function mapboxgl.supermap.ThreeLayer.prototype.addObject
120-
* @description 设置threejs 3D对象的坐标(经纬度)。
120+
* @description 设置threejs 3D 对象的坐标(经纬度)。
121121
* @param {THREE.Object3D} object3D - threejs 3D 对象。参考:[THREE.Object3D]{@link https://threejs.org/docs/index.html#api/core/Object3D}及子类对象。
122122
* @param {(Array.<number>|Object)} coordinate - 添加的 three 对象坐标(经纬度)。
123123
* @returns {this} this
@@ -149,7 +149,7 @@ export class ThreeLayer extends mapboxgl.Evented {
149149

150150
/**
151151
* @function mapboxgl.supermap.ThreeLayer.prototype.getThreeRenderer
152-
* @description 获取threejs renderer。
152+
* @description 获取 threejs renderer。
153153
* @returns {THREE.WebGLRenderer|THREE.CanvasRenderer} threejs renderer。参考:
154154
* [THREE.WebGLRenderer]{@link https://threejs.org/docs/index.html#api/renderers/WebGLRenderer}/
155155
* [THREE.CanvasRenderer]{@link https://threejs.org/docs/index.html#examples/renderers/CanvasRenderer}
@@ -197,7 +197,7 @@ export class ThreeLayer extends mapboxgl.Evented {
197197

198198
/**
199199
* @function mapboxgl.supermap.ThreeLayer.prototype.clearAll
200-
* @description 清除所有threejs 对象。
200+
* @description 清除所有 threejs 对象。
201201
* @param {boolean} clearCamera - 是否同时清除相机。
202202
* @returns {this} this 对象。
203203
*/
@@ -220,7 +220,7 @@ export class ThreeLayer extends mapboxgl.Evented {
220220
* @description 设置 threejs 3D 对象的坐标(经纬度)。
221221
* @param {THREE.Object3D} object3D - threejs 3D 对象,参考:[THREE.Object3D]{@link https://threejs.org/docs/index.html#api/core/Object3D}及子类对象。
222222
* @param {(Array.<number>|Object)} coordinate - 添加的 three 对象坐标(经纬度)。
223-
* @returns {this} this对象
223+
* @returns {this} this 对象
224224
*/
225225
setPosition(object3D, coordinate) {
226226
if (!object3D || !coordinate) {
@@ -235,7 +235,7 @@ export class ThreeLayer extends mapboxgl.Evented {
235235

236236
/**
237237
* @function mapboxgl.supermap.ThreeLayer.prototype.lngLatToPosition
238-
* @description 经纬度转threejs 3D失量对象
238+
* @description 经纬度转threejs 3D 失量对象
239239
* @param {(Array.<number>|Object)} lngLat - 经纬度坐标。
240240
* @returns {THREE.Vector3} threejs 3D 失量对象。参考:[THREE.Vector3]{@link https://threejs.org/docs/index.html#api/math/Vector3}
241241
*/
@@ -318,7 +318,7 @@ export class ThreeLayer extends mapboxgl.Evented {
318318
* @function mapboxgl.supermap.ThreeLayer.prototype.addTo
319319
* @description 添加图层到地图。
320320
* @param {Object} map - 地图对象。
321-
* @returns {this} this对象
321+
* @returns {this} this 对象
322322
*/
323323
addTo(map) {
324324
var me = this;
@@ -339,7 +339,7 @@ export class ThreeLayer extends mapboxgl.Evented {
339339
/**
340340
* @function mapboxgl.supermap.ThreeLayer.prototype.getCanvasContainer
341341
* @description 获取 three 图层容器。
342-
* @returns {HTMLElement} three图层的容器
342+
* @returns {HTMLElement} three 图层的容器
343343
*/
344344
getCanvasContainer() {
345345
return this.renderer.getCanvasContainer();
@@ -412,7 +412,7 @@ export class ThreeLayer extends mapboxgl.Evented {
412412

413413
_update() {
414414
/**
415-
* render事件,地图渲染时(地图状态改变时)触发。
415+
* render 事件,地图渲染时(地图状态改变时)触发。
416416
* @event mapboxgl.supermap.ThreeLayer#render
417417
* @type {Object}
418418
* @property {string} type - render

src/mapboxgl/overlay/UniqueTheme3DLayer.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ export class UniqueTheme3DLayer extends Theme3DLayer {
6262
/**
6363
* @function mapboxgl.supermap.UniqueTheme3DLayer.prototype.getHighlightStyleOptions
6464
* @description 获取高亮样式。
65-
* @returns {Object} mapboxgl 样式对象。
65+
* @returns {Object} Mapbox GL 样式对象。
6666
*/
6767
getHighlightStyleOptions() {
6868
var color = (this.highlight && this.highlight.color != null) ? this.highlight.color : '#ADA91E';

0 commit comments

Comments
 (0)