[OpenLayers-Users] Image without dithering after zoom

Andreas Hocevar ahocevar at opengeo.org
Wed Jul 11 02:39:22 PDT 2012


You can specify a tile class on a per-layer basis, using the className
layer option: http://dev.openlayers.org/releases/OpenLayers-2.12/doc/apidocs/files/OpenLayers/Layer/Grid-js.html#OpenLayers.Layer.Grid.className

With this you can define these image rendering options only for specific layers.

Andreas.

On Wed, Jul 11, 2012 at 9:11 AM, Bennos <benjaminpreisig at gmx.at> wrote:
> Hi Andreas,
>
> after your reply I did some additional research and found the CSS property
> image-rendering ( https://developer.mozilla.org/en/css/image-rendering MDN
> ). This property allows to change the browsers image handling behaviour.
> Though it is not widely supported - Firefox (Mac and Win7) and IE9 implement
> it, Chrome and Safari on Mac seem to not supporting it as well as Opera (my
> own experiences).
>
> To implement it within your map you would have to extend your CSS class
> .olImageTile:
>
> .olTileImage{
>         image-rendering: -moz-crisp-edges;
>         -ms-interpolation-mode: nearest-neighbor;
>         image-rendering: -webkit-optimize-contrast;
> }
>
> Maybe this is not the best way, because other map tiles like WMS, TMS and
> OSM are also using this class.
> This could be a client-side approach, which is sadly not implemented in all
> browsers.
>
> Benjamin
>
> --
> View this message in context: http://osgeo-org.1560.n6.nabble.com/Image-without-dithering-after-zoom-tp4987191p4987522.html
> Sent from the OpenLayers Users mailing list archive at Nabble.com.
> _______________________________________________
> Users mailing list
> Users at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/openlayers-users



-- 
Andreas Hocevar
OpenGeo - http://opengeo.org/
Expert service straight from the developers.


More information about the Users mailing list