We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c74a972 commit 5cd5620Copy full SHA for 5cd5620
src/openlayers/mapping/WebMap.js
@@ -111,6 +111,21 @@ export class WebMap extends Observable {
111
this.createMap(options.mapSetting);
112
this.createWebmap();
113
}
114
+
115
+ /**
116
+ * @function ol.supermap.WebMap.prototype.createMap
117
+ * @description 重新渲染地图
118
+ */
119
+ reRender() {
120
+ // 移除所有图层 没找到清空地图的方法
121
+ this.layerAdded = 0;
122
+ const layers = this.map.getLayers().getArray();
123
+ for (let i = 0, length = layers.length; i < length; i++) {
124
+ this.map.removeLayer(layers[0]);
125
+ }
126
+ this.createWebmap();
127
128
129
/**
130
* @private
131
* @function ol.supermap.WebMap.prototype.createMap
0 commit comments