MCPcopy Create free account
hub / github.com/SuperMap/iClient-JavaScript / setRasterTileSize

Method setRasterTileSize

src/common/mapping/WebMapBase.js:282–292  ·  view source on GitHub ↗

* @function WebMapBase.prototype.setRasterTileSize * @description 更新地图栅格图层瓦片大小。 * @param {number} tileSize - 栅格瓦片大小。

(tileSize)

Source from the content-addressed store, hash-verified

280 * @param {number} tileSize - 栅格瓦片大小。
281 */
282 setRasterTileSize(tileSize) {
283 if (!this.map || tileSize <= 0) {
284 return;
285 }
286 const sources = this.map.getStyle().sources;
287 Object.keys(sources).forEach((sourceId) => {
288 if (sources[sourceId].type === 'raster' && sources[sourceId].rasterSource === 'iserver') {
289 this._updateRasterSource(sourceId, { tileSize });
290 }
291 });
292 }
293
294 /**
295 * @function WebMapBase.prototype.setMaxBounds

Callers 2

WebMapV2Spec.jsFile · 0.80
WebMapV2Spec.jsFile · 0.80

Calls 3

_updateRasterSourceMethod · 0.95
forEachMethod · 0.80
getStyleMethod · 0.45

Tested by

no test coverage detected