Skip to content

Commit c88471a

Browse files
committed
fix bug
1.mapv控制台报错问题 2.mapv删除数据接口设计错误问题 3.LinearRing删除数据接口数据删不掉的问题
1 parent 67ede1e commit c88471a

File tree

18 files changed

+1902
-1338
lines changed

18 files changed

+1902
-1338
lines changed

dist/iclient-classic.js

Lines changed: 30 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -3636,11 +3636,11 @@ var MapVLayer = exports.MapVLayer = function (_SuperMap$Layer) {
36363636

36373637
/**
36383638
* @function SuperMap.Layer.MapVLayer.prototype.removeData
3639-
* @description 按照过滤条件移除数据
3640-
* @param filter - {string} 过滤条件
3639+
* @description 删除符合过滤条件的数据
3640+
* @param filter - {function} 过滤条件。条件参数为数据项,返回值为true,表示删除该元素;否则表示不删除
36413641
* @example
36423642
* filter=function(data){
3643-
* if(data.id="1"){
3643+
* if(data.id=="1"){
36443644
* return true
36453645
* }
36463646
* return false;
@@ -3737,7 +3737,7 @@ var MapVLayer = exports.MapVLayer = function (_SuperMap$Layer) {
37373737
value: function transferToMapLatLng(latLng) {
37383738
var source = "EPSG:4326",
37393739
dest = "EPSG:4326";
3740-
var unit = this.map.getUnits();
3740+
var unit = this.map.getUnits() || "degree";
37413741
if (["m", "meter"].indexOf(unit.toLowerCase()) > -1) {
37423742
dest = "EPSG:3857";
37433743
}
@@ -5446,7 +5446,7 @@ function _possibleConstructorReturn(self, call) { if (!self) { throw new Referen
54465446
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
54475447

54485448
/**
5449-
* @class SuperMap.MapVRenderer
5449+
* @class MapVRenderer
54505450
* @classdesc MapV渲染器。
54515451
* @private
54525452
* @extends mapv.MapVBaseLayer
@@ -5485,7 +5485,7 @@ var MapVRenderer = function (_MapVBaseLayer) {
54855485
}
54865486

54875487
/**
5488-
* @function SuperMap.MapVRenderer.prototype.clickEvent
5488+
* @function MapvRenderer.prototype.clickEvent
54895489
* @description 点击事件
54905490
* @param e - {Object} 触发对象
54915491
*/
@@ -5499,7 +5499,7 @@ var MapVRenderer = function (_MapVBaseLayer) {
54995499
}
55005500

55015501
/**
5502-
* @function SuperMap.MapVRenderer.prototype.mousemoveEvent
5502+
* @function MapvRenderer.prototype.mousemoveEvent
55035503
* @description 鼠标移动事件
55045504
* @param e - {Object} 触发对象
55055505
*/
@@ -5512,7 +5512,7 @@ var MapVRenderer = function (_MapVBaseLayer) {
55125512
}
55135513

55145514
/**
5515-
* @function SuperMap.MapVRenderer.prototype.bindEvent
5515+
* @function MapvRenderer.prototype.bindEvent
55165516
* @description 绑定鼠标移动和鼠标点击事件
55175517
* @param e - {Object} 触发对象
55185518
*/
@@ -5533,7 +5533,7 @@ var MapVRenderer = function (_MapVBaseLayer) {
55335533
}
55345534

55355535
/**
5536-
* @function SuperMap.MapVRenderer.prototype.unbindEvent
5536+
* @function MapvRenderer.prototype.unbindEvent
55375537
* @description 解绑鼠标移动和鼠标滑动触发的事件
55385538
* @param e - {Object} 触发对象
55395539
*/
@@ -5554,7 +5554,7 @@ var MapVRenderer = function (_MapVBaseLayer) {
55545554
}
55555555

55565556
/**
5557-
* @function SuperMap.MapVRenderer.prototype.getContext
5557+
* @function MapvRenderer.prototype.getContext
55585558
* @description 获取信息
55595559
*/
55605560

@@ -5565,7 +5565,7 @@ var MapVRenderer = function (_MapVBaseLayer) {
55655565
}
55665566

55675567
/**
5568-
* @function SuperMap.MapVRenderer.prototype.addData
5568+
* @function MapvRenderer.prototype.addData
55695569
* @description 追加数据
55705570
* @param data - {oject} 待添加的数据
55715571
* @param options - {oject} 待添加的数据信息
@@ -5583,7 +5583,7 @@ var MapVRenderer = function (_MapVBaseLayer) {
55835583
}
55845584

55855585
/**
5586-
* @function SuperMap.MapVRenderer.prototype.updateData
5586+
* @function MapvRenderer.prototype.updateData
55875587
* @description 更新覆盖原数据
55885588
* @param data - {oject} 待更新的数据
55895589
* @param options - {oject} 待更新的数据信息
@@ -5602,7 +5602,7 @@ var MapVRenderer = function (_MapVBaseLayer) {
56025602
}
56035603

56045604
/**
5605-
* @function SuperMap.MapVRenderer.prototype.getData
5605+
* @function MapvRenderer.prototype.getData
56065606
* @description 获取数据
56075607
*/
56085608

@@ -5613,24 +5613,28 @@ var MapVRenderer = function (_MapVBaseLayer) {
56135613
}
56145614

56155615
/**
5616-
* @function SuperMap.MapVRenderer.prototype.removeData
5617-
* @description 删除数据
5618-
* @param filter - {string} 删除条件\过滤信息
5616+
* @function MapvRenderer.prototype.removeData
5617+
* @description 删除符合过滤条件的数据
5618+
* @param filter - {function} 过滤条件。条件参数为数据项,返回值为true,表示删除该元素;否则表示不删除
56195619
*/
56205620

56215621
}, {
56225622
key: 'removeData',
5623-
value: function removeData(filter) {
5623+
value: function removeData(_filter) {
56245624
if (!this.dataSet) {
56255625
return;
56265626
}
5627-
var newData = this.dataSet.get(filter);
5627+
var newData = this.dataSet.get({
5628+
filter: function filter(data) {
5629+
return _filter != null && typeof _filter === "function" ? !_filter(data) : true;
5630+
}
5631+
});
56285632
this.dataSet.set(newData);
56295633
this.update({ options: null });
56305634
}
56315635

56325636
/**
5633-
* @function SuperMap.MapVRenderer.prototype.clearData
5637+
* @function MapvRenderer.prototype.clearData
56345638
* @description 清除数据
56355639
*/
56365640

@@ -5642,7 +5646,7 @@ var MapVRenderer = function (_MapVBaseLayer) {
56425646
}
56435647

56445648
/**
5645-
* @function SuperMap.MapVRenderer.prototype.render
5649+
* @function MapvRenderer.prototype.render
56465650
* @description 着色
56475651
* @param time - {number}
56485652
*/
@@ -5654,7 +5658,7 @@ var MapVRenderer = function (_MapVBaseLayer) {
56545658
}
56555659

56565660
/**
5657-
* @function SuperMap.MapVRenderer.prototype.transferToMercator
5661+
* @function MapvRenderer.prototype.transferToMercator
56585662
* @description 墨卡托坐标为经纬度
56595663
*/
56605664

@@ -5779,7 +5783,7 @@ var MapVRenderer = function (_MapVBaseLayer) {
57795783
}
57805784

57815785
/**
5782-
* @function SuperMap.MapVRenderer.prototype.addAnimatorEvent
5786+
* @function MapvRenderer.prototype.addAnimatorEvent
57835787
* @description 添加动画事件
57845788
*/
57855789

@@ -5791,7 +5795,7 @@ var MapVRenderer = function (_MapVBaseLayer) {
57915795
}
57925796

57935797
/**
5794-
* @function SuperMap.MapVRenderer.prototype.clear
5798+
* @function MapvRenderer.prototype.clear
57955799
* @description 清除环境
57965800
* @param context - {Object} 当前环境
57975801
*/
@@ -5803,7 +5807,7 @@ var MapVRenderer = function (_MapVBaseLayer) {
58035807
}
58045808

58055809
/**
5806-
* @function SuperMap.MapVRenderer.prototype.show
5810+
* @function MapvRenderer.prototype.show
58075811
* @description 展示渲染效果
58085812
*/
58095813

@@ -5814,7 +5818,7 @@ var MapVRenderer = function (_MapVBaseLayer) {
58145818
}
58155819

58165820
/**
5817-
* @function SuperMap.MapVRenderer.prototype.hide
5821+
* @function MapvRenderer.prototype.hide
58185822
* @description 隐藏渲染效果
58195823
*/
58205824

@@ -5825,7 +5829,7 @@ var MapVRenderer = function (_MapVBaseLayer) {
58255829
}
58265830

58275831
/**
5828-
* @function SuperMap.MapVRenderer.prototype.draw
5832+
* @function MapvRenderer.prototype.draw
58295833
* @description 渲染绘制
58305834
*/
58315835

dist/iclient-classic.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.

0 commit comments

Comments
 (0)