Skip to content
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

Add tilePixelRatio option to ol.source.WMTS #2216

Merged
merged 6 commits into from
Jun 19, 2014
Merged

Add tilePixelRatio option to ol.source.WMTS #2216

merged 6 commits into from
Jun 19, 2014

Conversation

elemoine
Copy link
Member

This PR adds a tilePixelRatio option to ol.source.WMTS. This option can be used with WMTS services that send larger tiles (512x512) than advertized (256x256), for high quality rendering on hidpi/retina screens. The PR includes an example (from @ahocevar) demonstrating the use of that option.

Meant to replace #2194.

@ahocevar
Copy link
Member

Looks great. Thanks!

@@ -2823,6 +2824,16 @@ olx.source.TileImageOptions.prototype.tileLoadFunction;


/**
* The pixel ratio used by the tile service. For example, if the tile
* service advertizes 256px by 256px tiles but actually sends 512 px
* by 512 px images (for retina/hidpi devices) then `tilePixelRatio`
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor, but you use 256px (no space) and 512 px (space). Could be made consistent.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes! I'll change it.

@ahocevar
Copy link
Member

Two minor doc comments. In my opinion this is good to merge.

elemoine pushed a commit that referenced this pull request Jun 19, 2014
Add tilePixelRatio option to ol.source.WMTS
@elemoine elemoine merged commit dc6867e into openlayers:master Jun 19, 2014
@elemoine elemoine deleted the pixelratio branch June 19, 2014 07:51
@elemoine
Copy link
Member Author

Thanks Andreas for the collaboration on this.

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.

None yet

2 participants