You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
externalgraphic files are not scaled to take account of Device Pixel Ratio when generating (polygon) fills. This results in patterns appearing very small on high DP ratio devices like iPhone X (dpr = 3.0). This seems to be fixable (I have tested this on both .png files and .svg files) by inserting: imageRatio *= window.devicePixelRatio;
at line 2152 of sldreader.js (release 0.2.8): https://developer.mozilla.org/en-US/docs/Web/API/Window/devicePixelRatio
However, if this gave unaccceptable support for older browsers (e.g. pre-IE11), then DEVICE_PIXEL_RATIO from import 'ol/has' could be used. (However, I don't really understand the "require" statements at the top of sldreader.js so wouldn't like to suggest how that could be added).
The text was updated successfully, but these errors were encountered:
Good catch. I have refactored the polygon graphic fill logic in PR #89, taking device pixel ratio into account.
I will publish a new version of the library later today.
externalgraphic files are not scaled to take account of Device Pixel Ratio when generating (polygon) fills. This results in patterns appearing very small on high DP ratio devices like iPhone X (dpr = 3.0). This seems to be fixable (I have tested this on both .png files and .svg files) by inserting:
imageRatio *= window.devicePixelRatio;
at line 2152 of sldreader.js (release 0.2.8):
https://developer.mozilla.org/en-US/docs/Web/API/Window/devicePixelRatio
However, if this gave unaccceptable support for older browsers (e.g. pre-IE11), then DEVICE_PIXEL_RATIO from import 'ol/has' could be used. (However, I don't really understand the "require" statements at the top of sldreader.js so wouldn't like to suggest how that could be added).
The text was updated successfully, but these errors were encountered: