Skip to content

Handle tile coordinate wrapping when reprojecting raster tiles #4551

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Dec 11, 2015

Conversation

petrsloup
Copy link
Member

This PR adds handling of wrapX to the tile reprojection process.

This way, when reprojecting for example EPSG:3857 to EPSG:4326 the map is "repeated", because the default TileGrid for EPSG:4326 (ol.tilegrid.createForProjection('EPSG:4326')) has wrapX enabled.

Internally, this uses ol.source.Tile#getTileCoordForTileUrlFunction to handle the wrapping.

Fixes #4447

@ahocevar I believe you did a lot of work on the wrapX feature. Can you please take a look if this is indeed the right way of handling this?

@ahocevar
Copy link
Member

This is exactly the right fix. Thanks @petrsloup, please merge.

petrsloup added a commit that referenced this pull request Dec 11, 2015
Handle tile coordinate wrapping when reprojecting raster tiles
@petrsloup petrsloup merged commit 48c8f9e into openlayers:master Dec 11, 2015
@petrsloup
Copy link
Member Author

@ahocevar Thanks for the review.

@petrsloup petrsloup deleted the rasterreproj-wrapx branch December 11, 2015 15:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants