* @function WebMapBase.prototype.setRasterTileSize * @description 更新地图栅格图层瓦片大小。 * @param {number} tileSize - 栅格瓦片大小。
(tileSize)
| 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 |
no test coverage detected