-
-
Notifications
You must be signed in to change notification settings - Fork 3k
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
Conversation
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` |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
Two minor doc comments. In my opinion this is good to merge. |
Add tilePixelRatio option to ol.source.WMTS
Thanks Andreas for the collaboration on this. |
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.