cd-mapgis 1.0.34 → 1.0.35
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/MapView.js +1 -2
package/package.json
CHANGED
package/src/MapView.js
CHANGED
|
@@ -72,12 +72,11 @@ export default class MapView {
|
|
|
72
72
|
* @param {*} p
|
|
73
73
|
*/
|
|
74
74
|
viewOnTemplayer(p) {
|
|
75
|
+
this.clearTemplayer(); //移除之前的显示
|
|
75
76
|
p.style = StyleUtil.getViewOnTemplayerStyle();
|
|
76
77
|
//重建图层,避免在其他地方全部移除图层后,templayer不为空,但是已经不在地图中的情况
|
|
77
78
|
let res = LayerUtil.getJsonLayer(p);
|
|
78
|
-
console.log(res);
|
|
79
79
|
this._view_templayer = res.layer;
|
|
80
|
-
this.clearTemplayer(); //移除之前的显示
|
|
81
80
|
this.map.addLayer(this._view_templayer);// 添加到地图
|
|
82
81
|
// fit方法 - 自动适应范围
|
|
83
82
|
let extent = res.geometry.getExtent();
|