cachingopenlayers-3geoserverretina

OpenLayers 3 - retina vs cached tiles


I have an application which serves some layers from GeoServer (GeoWebcache) tile cache. By default it stores them in 256*256 pixel resolution but the ol.source.TileWMS source requests 512*512 pixel ones when using a retina Macbook Pro which causes the server to reply:

400: The requested tile dimensions 512x512 do not match those of the grid set (256x256)

(It perfectly works on my Lenovo T420.) Is there a way to force it to use 256*256 tiles on the rMBP too?

Thanks in advance!

Best Regards, Balázs Eigner


Solution

  • Okay, it looks like it's really easy to solve: you have only have to set 'hidpi' option to false on the source.