MCPcopy Index your code
hub / github.com/SuperMap/iClient-JavaScript / resize

Method resize

src/common/mapping/WebMapBase.js:189–200  ·  view source on GitHub ↗

* @function WebMapBase.prototype.resize * @description 调整地图大小。 * @param {boolean} [keepBounds=false] - 是否保持当前地图范围。

(keepBounds = false)

Source from the content-addressed store, hash-verified

187 * @param {boolean} [keepBounds=false] - 是否保持当前地图范围。
188 */
189 resize(keepBounds = false) {
190 this.map && this.map.resize();
191 this._handler && this._handler.echartsLayerResize();
192 const mapContainerStyle = window.getComputedStyle(document.getElementById(this.options.target));
193 const { bounds } = this.mapOptions;
194 if (keepBounds && this.map && bounds && mapContainerStyle) {
195 const zoom = this._getResizedZoom(bounds, mapContainerStyle);
196 if (zoom !== this.map.getZoom()) {
197 this.map && this.map.setZoom(zoom);
198 }
199 }
200 }
201
202 /**
203 * @function WebMapBase.prototype.setCenter

Callers 5

resizeEventMethod · 0.45
_resizeHandlerFunction · 0.45
ThemeLayer.jsFile · 0.45
_resizeMethod · 0.45
echartsLayerResizeMethod · 0.45

Calls 4

_getResizedZoomMethod · 0.95
echartsLayerResizeMethod · 0.45
getZoomMethod · 0.45
setZoomMethod · 0.45

Tested by

no test coverage detected