-
Notifications
You must be signed in to change notification settings - Fork 49
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
OpenLayers HIDPI often causes GeoServer cache to fail. #915
Comments
Spontaneous thought: |
I think the idea of forcing specific DPI:s is good! Would 90 and 180 be enough (one for ordinary devices and one for highDPI-devices)? Or do we want more? |
Maybe it could be configured like (devicePixelRatio: dpi): |
Ahh very nice! I like it! |
The code looks great, nicely commented and easy to understand. Will give it a go next week! |
Thanx! Don't forget to add useCustomHdpi: true in the layers config. |
@jesade-vbg: Note: dpi can't be float, round up. |
Problems occur when having pixelRatio 3. ratio 1 and 2 seems to be working fine but 3 causes cache MISS in geoserver. This also happens with the hidpi = true setting when requesting pixelRatio 3 270dpi, so its not my code. I've found out that alot of people is having the exact same problem with openlayers + geoserver + pixelRatio 3. If anyone has any idea, please let me know. |
Turning on HIDPI changes the way OpenLayer requests tiles etc.
You can specify diffrent dpi:s in geoserver, 90, 180 etc.
But OpenLayers requests the exact dpi as the device has, for example 72, 113, 155, 189 etc etc.
Confirmed in docs: HiDPI >
If you're lucky, it requests 180 as it's set up in GeoServer.
For example, OpenLayers adds this to the Url:
Resulting in this header from geoserver:
geowebcache-cache-result: MISS
=== slow
Could we somehow force OpenLayers to request (as an example)?:
or double resolution for hidpi devices:
Everyone wants fast maps and sharp "crisp" maps. It would be nice to be able to deliver both.
The text was updated successfully, but these errors were encountered: