• 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.

    Parameters

    • tileGrid: TileGrid

      Tile grid.

    • factory: ((arg0) => external.olsource.Source)

      Source factory. This function takes a module:ol/tilecoordTileCoord as argument and is expected to return a module:ol/source/SourceSource. 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 ((arg0, arg1) => default[])

    Sources function.

      • (arg0, arg1): default[]
      • Parameters

        • arg0: Extent
        • arg1: number

        Returns default[]

    Api