Skip to content

Commit

Permalink
【docs】去掉重复api
Browse files Browse the repository at this point in the history
  • Loading branch information
xiongjiaojiao committed Sep 10, 2024
1 parent 257cc45 commit 6ad0774
Show file tree
Hide file tree
Showing 11 changed files with 18 additions and 83 deletions.
1 change: 1 addition & 0 deletions build/jsdocs/leaflet/docs.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
"src/common/iServer/ProcessingServiceBase",
"src/common/iServer/PointWithMeasure",
"src/common/iServer/ServerTheme",
"src/common/iServer/QueryService",
"src/common/overlay/RankSymbol",
"src/common/overlay/ThemeVector",
"src/common/overlay/Graph",
Expand Down
1 change: 1 addition & 0 deletions build/jsdocs/mapboxgl/docs.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
"src/common/iServer/ProcessingServiceBase",
"src/common/iServer/PointWithMeasure",
"src/common/iServer/ServerTheme",
"src/common/iServer/QueryService",
"src/common/overlay/RankSymbol",
"src/common/overlay/ThemeVector",
"src/common/overlay/Graph",
Expand Down
1 change: 1 addition & 0 deletions build/jsdocs/maplibregl/docs.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
"src/common/iServer/ProcessingServiceBase",
"src/common/iServer/PointWithMeasure",
"src/common/iServer/ServerTheme",
"src/common/iServer/QueryService",
"src/common/overlay/RankSymbol",
"src/common/overlay/ThemeVector",
"src/common/overlay/Graph",
Expand Down
1 change: 1 addition & 0 deletions build/jsdocs/openlayers/docs.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
"src/common/iServer/ProcessingServiceBase",
"src/common/iServer/PointWithMeasure",
"src/common/iServer/ServerTheme",
"src/common/iServer/QueryService",
"src/common/overlay/RankSymbol",
"src/common/overlay/Graph",
"src/common/overlay/ThemeVector",
Expand Down
2 changes: 1 addition & 1 deletion src/common/iServer/GetFeaturesParametersBase.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import { Util } from '../commontypes/Util';
* @category iServer Data FeatureResults
* @classdesc 要素查询参数基类。此类存储了进行要素查询的数据集列表以及一些通用的查询参数,
* 包括:是否返回查询结果、查询结果的最大/最小索引号、动态投影的目标坐标系、聚合查询相关参数等。
* * <div style="padding: 20px;border: 1px solid #eee;border-left-width: 5px;border-radius: 3px;border-left-color: #ce4844;">
* <div style="padding: 20px;border: 1px solid #eee;border-left-width: 5px;border-radius: 3px;border-left-color: #ce4844;">
* <p style="color: #ce4844">Notice</p>
* <p style="font-size: 13px">推荐设置 returnFeaturesOnly 配置为 true 来提升性能,如果需要获取总数量与数据集信息,FeatureService 提供了 getFeaturesCount 和 getFeaturesDatasetInfo 方法</p>
* </div>
Expand Down
4 changes: 2 additions & 2 deletions src/common/iServer/InitMapServiceBase.js
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ export class InitMapServiceBase {
}

/**
* @function getMapInfo
* @function getWKT
* @description 获取坐标投影的 WKT。
* @returns {Promise}
*/
Expand Down Expand Up @@ -149,7 +149,7 @@ export function getTileset(tilesets = [], targets) {

/**
* @private
* @function createMapOptions
* @function scalesToResolutions
* @description mapboxgl maplibregl 获取地图resolutions。
* @returns {Array} resolutions
*/
Expand Down
9 changes: 5 additions & 4 deletions src/common/overlay/l7/L7LayerBase.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ import { Util as CommonUtil } from '../../commontypes/Util';
import { CustomOverlayLayer } from '../Base';

/**
* @class L7Layer
* @class L7LayerBase
* @category Visualization L7
* @version 11.2.0
* @version 11.2.1
* @classdesc L7Layer对接了@antv/L7的图层类型,能够通过mapbox-gl操作@antv/L7的图层。
* @param {Object} options - 图层配置项,包括以下参数:
* @param {string} options.type - @antv/L7的图层类型,详情参见: {@link https://l7.antv.antgroup.com/api/point_layer/pointlayer}。
Expand Down Expand Up @@ -50,8 +50,9 @@ export class L7LayerBase extends CustomOverlayLayer {
this.setSelectedDatasFn = this.setSelectedDatas.bind(this);
this.reRenderFn = this.reRender.bind(this);
}

/**
* @function L7Layer.prototype.getL7Layer
* @function L7LayerBase.prototype.getL7Layer
* @description 获取@antv/L7的layer实例。
* @returns {Object} @antv/L7的layer实例。
*/
Expand All @@ -60,7 +61,7 @@ export class L7LayerBase extends CustomOverlayLayer {
}

/**
* @function L7Layer.prototype.reRender
* @function L7LayerBase.prototype.reRender
* @description 当修改@antv/L7的layer的配置时,重新渲染。
*/
reRender() {
Expand Down
34 changes: 3 additions & 31 deletions src/leaflet/core/Util.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@
getMeterPerMapUnit as MeterPerMapUnit,
getZoomByResolution,
scalesToResolutions,
getDpi
getDpi,
scaleToResolution as transformScaleToResolution
} from '@supermapgis/iclient-common/util/MapCalculateUtil';

/**
Expand Down Expand Up @@ -136,36 +137,7 @@ export var resolutionToScale = function(resolution, dpi, mapUnit) {
return scale;
};

/**
* @function scaleToResolution
* @category BaseTypes Util
* @description 通过比例尺计算分辨率。
* @param {number} scale - 比例尺。
* @param {number} dpi - 屏幕分辨率。
* @param {string} mapUnit - 地图单位。
* @returns {number} 分辨率。
* @usage
* ```
* // 浏览器
* <script type="text/javascript" src="{cdn}"></script>
* <script>
* const result = {namespace}.Util.scaleToResolution(scale, dpi, mapUnit);
*
* </script>
*
* // ES6 Import
* import { scaleToResolution } from '{npm}';
*
* const result = scaleToResolution(scale, dpi, mapUnit);
* ```
*/
export var scaleToResolution = function(scale, dpi, mapUnit) {
var inchPerMeter = 1 / 0.0254;
var meterPerMapUnitValue = getMeterPerMapUnit(mapUnit);
var resolution = scale * dpi * inchPerMeter * meterPerMapUnitValue;
resolution = 1 / resolution;
return resolution;
};
export var scaleToResolution = transformScaleToResolution;

/**
* @function normalizeScale
Expand Down
1 change: 1 addition & 0 deletions src/mapboxgl/overlay/L7Layer.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import { featureFilter } from '@mapbox/mapbox-gl-style-spec';
* @class L7Layer
* @category Visualization L7
* @version 11.2.0
* @extends {L7LayerBase}
* @classdesc L7Layer对接了@antv/L7的图层类型,能够通过mapbox-gl操作@antv/L7的图层。
* @param {Object} options - 图层配置项,包括以下参数:
* @param {string} options.type - @antv/L7的图层类型,详情参见: {@link https://l7.antv.antgroup.com/api/point_layer/pointlayer}。
Expand Down
1 change: 1 addition & 0 deletions src/maplibregl/mapping/WebMap.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ import MapManager from './webmap/MapManager';
* @version 11.2.1
* @extends {WebMapBase}
* @category iPortal/Online Resources Map
* @classdesc 对接 iPortal/Online 地图类。
* <div style="padding: 20px;border: 1px solid #eee;border-left-width: 5px;border-radius: 3px;border-left-color: #ce4844;">
* <p style="color: #ce4844">Notice</p>
* <p style="font-size: 13px">该功能可能依赖以下插件,请确认引入该插件。</p>
Expand Down
46 changes: 1 addition & 45 deletions src/maplibregl/overlay/L7Layer.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import { featureFilter } from '@maplibre/maplibre-gl-style-spec';
* @class L7Layer
* @category Visualization L7
* @version 11.2.0
* @extends {L7LayerBase}
* @classdesc L7Layer对接了@antv/L7的图层类型,能够通过maplibre-gl操作@antv/L7的图层。
* @param {Object} options - 图层配置项,包括以下参数:
* @param {string} options.type - @antv/L7的图层类型,详情参见: {@link https://l7.antv.antgroup.com/api/point_layer/pointlayer}。
Expand All @@ -27,51 +28,6 @@ export class L7Layer extends L7LayerBase {
this.l7layer = new L7[type]({ ...options, name: this.id });
this.setDataFn = this.l7layer.setData.bind(this.l7layer);
}
this.overlay = true;
}
/**
* @function L7Layer.prototype.getL7Layer
* @description 获取@antv/L7的layer实例。
* @returns {Object} @antv/L7的layer实例。
*/
getL7Layer() {
return this.l7layer;
}

/**
* @function L7Layer.prototype.reRender
* @description 当修改@antv/L7的layer的配置时,重新渲染。
*/
reRender() {
if (this.scene && this.scene.getLayer(this.l7layer.id)) {
this.scene.layerService.renderLayer(this.l7layer.id);
}
this.map && this.map.triggerRepaint();
}

moveLayer(id, beforeId) {
this.map.style.moveLayer(id, beforeId);
}

setVisibility(visibility) {
if (this.animateStatus) {
this.cancelAnimationFrame();
}
visibility ? this.l7layer.show() : this.l7layer.hide();
this.map.style.setLayoutProperty(this.id, 'visibility', visibility ? 'visible' : 'none');
}
addSceneLayer(scene) {
this.scene = scene;
this.scene.addLayer(this.l7layer);
this.updateSourceEffect();
}

updateSourceEffect() {
const source = this.l7layer.getSource();
source &&
source.on('update', () => {
this.reRender();
});
}

onAdd(map) {
Expand Down

0 comments on commit 6ad0774

Please sign in to comment.