Skip to content

sourcesFromTileGrid should translate from view to source projection #16985

@jcphill

Description

@jcphill

Following the example at https://openlayers.org/en/latest/examples/cog-pyramid.html I have a tile grid in EPSG:4269 that I would like to display in EPSG:3857 but the function returned by sourcesFromTileGrid() is passed an extent and resolution in the view projection EPSG:3857 and does not do any translation to EPSG:4269 before building the list of sources to return. At zoom 0 the function returns the coarsest tiles, which are displayed correctly, but zoomed in the function returns an empty list.

The TileGrid should have a projection associated with it, or sourcesFromTileGrid() should assume that the projection of the TileGrid matches that of the sources returned by the source factory function. The function returned by sourcesFromTileGrid() should somehow determine the view projection and do something reasonable to select sources from the grid. Because a single GeoTIFF source reads projected internal tiles correctly I assume that similar logic is already implemented there.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions