Module: ol/source

ol/source


import * as olSource from 'ol/source';

Methods

module:ol/source.sourcesFromTileGrid(tileGrid, factory){function}

import {sourcesFromTileGrid} from 'ol/source';

Creates a sources function from a tile grid. This function can be used as value for the sources property of the module:ol/layer/Layer~Layer subclasses that support it.

Name Type Description
tileGrid module:ol/tilegrid/TileGrid~TileGrid

Tile grid.

factory function

Source factory. This function takes a module:ol/tilecoord~TileCoord as argument and is expected to return a module:ol/source/Source~Source. Note: The returned sources should have a tile grid with a limited set of resolutions, matching the resolution range of a single zoom level of the pyramid tileGrid that sourcesFromTileGrid was called with.

Returns:
Sources function.