Skip to content

Commit 3a99cd9

Browse files
优化 fgb 文档描述
1 parent 5c0ed15 commit 3a99cd9

File tree

4 files changed

+25
-9
lines changed

4 files changed

+25
-9
lines changed

build/jsdocs/template/typeLinkExt.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ var typeLinks = {
4646
"ol.control.Control": olapi + "module-ol_control_Control-Control.html",
4747
"ol.tilegrid.TileGrid": olapi + "module-ol_tilegrid_TileGrid-TileGrid.html",
4848
"ol.tilegrid.WMTS": olapi + "module-ol_tilegrid_WMTS.html",
49+
"ol.loadingstrategy": olapi + "module-ol_loadingstrategy.html",
4950

5051
//leaflet
5152
"L.Marker": lfapi + '#marker',
@@ -104,6 +105,7 @@ var typeLinks = {
104105
"GeoJSONFeature": geometryapi + '#section-3.2',
105106
// WebMap 结构
106107
"WebMapSummaryObject": helpDocApi + '#iP/Appendix/WebMap/WebMapSummary.htm',
108+
"FlatGeobuf": 'https://github.com/flatgeobuf/flatgeobuf',
107109

108110
// Web API
109111
"Promise": webApi + 'JavaScript/Reference/Global_Objects/Promise',

src/leaflet/overlay/FGBLayer.js

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,19 +11,33 @@ import { deserialize } from 'flatgeobuf/lib/mjs/geojson';
1111
/**
1212
* @class FGBLayer
1313
* @deprecatedclassinstance L.supermap.FGBLayer
14-
* @classdesc Fgb 图层源
14+
* @classdesc FGB 图层,该图层把 {@link FlatGeobuf} 格式解析为点线面要素
1515
* @version 11.1.0
1616
* @category Visualization FGB
1717
* @extends {L.LayerGroup}
1818
* @param {string} url - FGB 服务地址,例如:http://localhost:8090/iserver/services/xxx/rest/data/featureResults/newResourceId.fgb。
1919
* @param {Object} options - 参数。
2020
* @param {function} [options.pointToLayer] - 定义点要素如何绘制在地图上。
2121
* @param {function} [options.style] - 定义点、线、面要素样式。参数为{@link L.Path-option}。
22-
* @param {boolean} [options.strategy='bbox'] - 指定加载策略,可选值为 all,bbox。 all为全量加载, bbox为按需加载。
22+
* @param {string} [options.strategy='bbox'] - 指定加载策略,可选值为 all,bbox。 all为全量加载, bbox为按需加载。
2323
* @param {Array} [options.extent] - 加载范围, 参数规范为: [minX, minY, maxX, maxY], 传递此参数后, 图层将使用局部加载。
2424
* @param {function} [options.featureLoader] - 要素自定义方法。
2525
* @param {function} [options.onEachFeature] - 要素创建时调用
2626
* @usage
27+
* ```
28+
* // 浏览器
29+
* <script type="text/javascript" src="{cdn}"></script>
30+
* <script>
31+
* new {namespace}.FGBLayer(url, options);
32+
*
33+
* </script>
34+
*
35+
* // ES6 Import
36+
* import { FGBLayer } from '{npm}';
37+
*
38+
* new FGBLayer(url, options);
39+
*
40+
* ```
2741
*/
2842

2943
export var FGBLayer = L.LayerGroup.extend({

src/mapboxgl/overlay/FGBLayer.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,11 @@ import { deserialize } from 'flatgeobuf/lib/mjs/geojson';
1717
/**
1818
* @class FGBLayer
1919
* @category Visualization FGB
20-
* @classdesc FGB。
20+
* @classdesc FGB 图层,该图层把 {@link FlatGeobuf} 格式解析为点线面要素
2121
* @version 11.1.0
2222
* @param {Object} options - 参数。
2323
* @param {string} [options.layerID] - 图层 ID。默认使用 CommonUtil.createUniqueID("FGBlayer_") 创建图层 ID。
24-
* @param {boolean} [options.strategy='bbox'] - 指定加载策略,可选值为 all,bbox。 all为全量加载, bbox为当前可见范围加载。
24+
* @param {string} [options.strategy='bbox'] - 指定加载策略,可选值为 all,bbox。 all为全量加载, bbox为当前可见范围加载。
2525
* @param {Array} [options.extent] - 加载范围, 参数规范为: [minX, minY, maxX, maxY], 传递此参数后, 图层将使用局部加载。
2626
* @param {function} [options.featureLoader] - 要素自定义方法,接收要素作为参数,需返回要素。
2727
* @param {Object} [options.paint] - 参数内容详见: {@link https://docs.mapbox.com/mapbox-gl-js/style-spec/layers/#paint-property}
@@ -110,8 +110,8 @@ export class FGBLayer {
110110
this._handleFeatures(extent);
111111
}
112112

113-
moveLayer(id, beforeId) {
114-
this.map.removeLayer(this.layerId, beforeId);
113+
moveLayer(beforeId) {
114+
this.map.moveLayer(this.layerId, beforeId);
115115
}
116116

117117
removeLayer() {

src/openlayers/overlay/FGB.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,13 @@ import GeoJSON from 'ol/format/GeoJSON';
1111
* @class FGB
1212
* @browsernamespace ol.source
1313
* @category Visualization FGB
14-
* @classdesc FGB 图层源。
14+
* @classdesc FGB 图层源,该图层源把 {@link FlatGeobuf} 格式解析为点线面要素
1515
* @version 11.1.0
1616
* @param {Object} opt_options - 参数。
1717
* @param {string} opt_options.url - FGB 服务地址,例如:http://localhost:8090/iserver/services/xxx/rest/data/featureResults/newResourceId.fgb。
18-
* @param {GeoJSONObject} [opt_options.strategy='bbox'] - 指定加载策略,可选值为 ol.loadingstrategy.all,ol/loadingstrategy.bbox。all为全部加载, bbox为当前可见范围加载
18+
* @param {ol.loadingstrategy} [opt_options.strategy='bbox'] - 指定加载策略,可选值为 ol.loadingstrategy.all,ol/loadingstrategy.bbox。all为全部加载, bbox为当前可见范围加载
1919
* @param {Array} [opt_options.extent] - 加载范围, 参数规范为: [minX, minY, maxX, maxY], 传递此参数后, 图层将使用局部加载。
20-
* @param {Function} [opt_options.featureLoader] - 要素加载回调函数
20+
* @param {function} [opt_options.featureLoader] - 要素加载回调函数
2121
* @param {boolean} [opt_options.overlaps] - 是否优化重叠要素的填充与描边操作
2222
* @param {boolean} [opt_options.useSpatialIndex] - 是否启用要素空间索引
2323
* @param {boolean} [opt_options.wrapX] - 是否平铺地图

0 commit comments

Comments
 (0)