Skip to content

Commit 76633d4

Browse files
committed
【API/FIX】graphicLayer 的 removeGraphics 接口。reiview by songym.
1 parent 561b949 commit 76633d4

20 files changed

+149
-219
lines changed

CHANGELOG.md

Lines changed: 33 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -4,41 +4,50 @@
44

55
### for Leaflet
66

7-
- 可视化 - 矢量瓦片
8-
- `L.supermap.tiledVectorLayer` 新增 `options.processCharacters` 参数,支持本地设置服务端的CartoCSS样式时替换特殊字符
7+
- 可视化 - 矢量瓦片
8+
- `L.supermap.tiledVectorLayer` 新增 `options.processCharacters` 参数,支持本地设置服务端的CartoCSS样式时替换特殊字符
99

10-
- `SuperMap.QueryParameters` 及其子类新增 `options.returnFeatureWithFieldCaption` 参数,支持指定返回的查询结果要素字段标识为字段别名
10+
- `SuperMap.QueryParameters` 及其子类新增 `options.returnFeatureWithFieldCaption` 参数,支持指定返回的查询结果要素字段标识为字段别名
1111

12-
- 可视化 - 高性能图层
13-
- `L.supermap.graphic` 新增 `options.id` 参数,以及 `getId``setId` 接口,支持设置与修改 `graphic` 要素`id`
14-
- `L.supermap.graphicLayer` 新增 `getGraphicBy` 支持 通过要素属性值获取指定要素
15-
- `L.supermap.graphicLayer` 新增 `getGraphicById` 支持 通过要素 `id` 获取指定要素
16-
- `L.supermap.graphicLayer` 新增 `getGraphicsByAttribute` 支持 通过要素 `attribute`属性对象值获取指定要素数组
17-
- `L.supermap.graphicLayer` 废弃 `removeGraphics` 改用 `removeAllGraphics` 支持删除所有要素
18-
- `L.supermap.graphicLayer` 新增 `removeGraphics` 支持删除单个或多个要素
12+
- 可视化 - 高效率点图层
13+
- `L.supermap.graphic`
14+
- 新增 `options.id` 参数,以及 `getId``setId` 接口,支持设置与修改 `graphic` 要素`id`
15+
16+
- `L.supermap.graphicLayer`
17+
- 新增 `getGraphicBy` 接口支持通过要素属性值获取指定要素
18+
- 新增 `getGraphicById` 接口支持通过要素 `id` 获取指定要素
19+
- 新增 `getGraphicsByAttribute` 接口支持通过要素 `attribute`属性对象值获取指定要素数组
20+
- `removeGraphics` 接口新增删除单个或多个要素的功能
21+
- `L.supermap.ThemeLayer` 及其子类
22+
- `addFeatures` 方法默认只支持添加经纬度坐标要素,新增 `options.alwaysMapCRS` 参数,设置该参数为true , `addFeatures` 方法可添加底图坐标要素
1923

2024
### for OpenLayers
2125

2226
- `SuperMap.QueryParameters` 及其子类新增 `options.returnFeatureWithFieldCaption` 参数,支持指定返回的查询结果要素字段标识为字段别名
2327

24-
- 可视化 - 高性能图层
25-
- `ol.Graphic` 新增 `options.id` 参数,以及 `getId``setId` 接口,支持设置与修改 `graphic` 要素`id`
26-
- `ol.source.Graphic` 新增 `getGraphicBy` 支持 通过要素属性值获取指定要素
27-
- `ol.source.Graphic` 新增 `getGraphicById` 支持 通过要素 `id` 获取指定要素
28-
- `ol.source.Graphic` 新增 `getGraphicsByAttribute` 支持 通过要素 `attribute`属性对象值获取指定要素数组
29-
- `ol.source.Graphic` 废弃 `removeGraphics` 改用 `removeAllGraphics` 支持删除所有要素
30-
- `ol.source.Graphic` 新增 `removeGraphics` 支持删除单个或多个要素
28+
- 可视化 - 高效率点图层
29+
- `ol.Graphic`
30+
- 新增 `options.id` 参数,以及 `getId``setId` 接口,支持设置与修改 `graphic` 要素`id`
31+
32+
- `ol.source.Graphic`
33+
- 新增 `getGraphicBy` 接口支持通过要素属性值获取指定要素
34+
- 新增 `getGraphicById` 接口支持通过要素 `id` 获取指定要素
35+
- 新增 `getGraphicsByAttribute` 接口支持通过要素 `attribute`属性对象值获取指定要素数组
36+
- `removeGraphics` 接口新增删除单个或多个要素的功能
37+
3138
### for MapboxGL
3239

3340
- `SuperMap.QueryParameters` 及其子类新增 `options.returnFeatureWithFieldCaption` 参数,支持指定返回的查询结果要素字段标识为字段别名
3441

35-
- 可视化 - 高性能图层
36-
- `mapboxgl.supermap.Graphic` 新增 `options.id` 参数,以及 `getId``setId` 接口,支持设置与修改 `graphic` 要素`id`
37-
- `mapboxgl.supermap.GraphThemeLayer` 新增 `getGraphicBy` 支持 通过要素属性值获取指定要素
38-
- `mapboxgl.supermap.GraphThemeLayer` 新增 `getGraphicById` 支持 通过要素 `id` 获取指定要素
39-
- `mapboxgl.supermap.GraphThemeLayer` 新增 `getGraphicsByAttribute` 支持 通过要素 `attribute`属性对象值获取指定要素数组
40-
- `mapboxgl.supermap.GraphThemeLayer` 废弃 `removeGraphics` 改用 `removeAllGraphics` 支持删除所有要素
41-
- `mapboxgl.supermap.GraphThemeLayer` 新增 `removeGraphics` 支持删除单个或多个要素
42+
- 可视化 - 高效率点图层
43+
- `mapboxgl.supermap.Graphic`
44+
- 新增 `options.id` 参数,以及 `getId``setId` 接口,支持设置与修改 `graphic` 要素`id`
45+
46+
- `mapboxgl.supermap.GraphThemeLayer`
47+
- 新增 `getGraphicBy` 接口支持通过要素属性值获取指定要素
48+
- 新增 `getGraphicById` 接口支持通过要素 `id` 获取指定要素
49+
- 新增 `getGraphicsByAttribute` 接口支持通过要素 `attribute`属性对象值获取指定要素数组
50+
- `removeGraphics` 接口新增删除单个或多个要素的功能
4251

4352
### for Classic
4453
- `SuperMap.Layer.MapVLayer` 支持北京54 等其他坐标系(注:数据坐标系要求与地图保持一致)

dist/classic/iclient-classic-es6.js

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7667,13 +7667,12 @@ class MapVLayer_MapVLayer extends SuperMap_SuperMap.Layer {
76677667
* @deprecated
76687668
*/
76697669
transferToMapLatLng(latLng) {
7670-
const unit = this.map.getUnits() || "degree";
7671-
if (["m", "meter"].indexOf(unit.toLowerCase()) === -1) {
7672-
return latLng;
7673-
}
7674-
7675-
let source = "EPSG:4326",
7670+
var source = "EPSG:4326",
7671+
dest = "EPSG:4326";
7672+
var unit = this.map.getUnits() || "degree";
7673+
if (["m", "meter"].indexOf(unit.toLowerCase()) > -1) {
76767674
dest = "EPSG:3857";
7675+
}
76777676
return new SuperMap_SuperMap.LonLat(latLng.lon, latLng.lat).transform(source, dest);
76787677
}
76797678

dist/classic/iclient-classic-es6.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/classic/iclient-classic.js

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10155,13 +10155,12 @@ var MapVLayer = exports.MapVLayer = function (_SuperMap$Layer) {
1015510155
}, {
1015610156
key: 'transferToMapLatLng',
1015710157
value: function transferToMapLatLng(latLng) {
10158-
var unit = this.map.getUnits() || "degree";
10159-
if (["m", "meter"].indexOf(unit.toLowerCase()) === -1) {
10160-
return latLng;
10161-
}
10162-
1016310158
var source = "EPSG:4326",
10159+
dest = "EPSG:4326";
10160+
var unit = this.map.getUnits() || "degree";
10161+
if (["m", "meter"].indexOf(unit.toLowerCase()) > -1) {
1016410162
dest = "EPSG:3857";
10163+
}
1016510164
return new _SuperMap.SuperMap.LonLat(latLng.lon, latLng.lat).transform(source, dest);
1016610165
}
1016710166
}]);

0 commit comments

Comments
 (0)