OpenLayers 3 : put one layer in grayscale without changing other layers -
i have tricky question concerning possibility put layers in grayscale open layers 3.
i achieve put whole map in grayscale using possibilities of canvas element, can seen in examples proposed in following discussion : openlayers 3 - tile canvas context
but need different these examples : want give users possibility put layers 1 one in grayscale, without changing colour of other layers. idea instance have 1 background layer in grayscale other data on in colour.
does know how such thing can achieved ?
thanks
ol.source.raster looking for. here example.
var raster = new ol.source.raster({ sources: [new ol.source.stamen({ layer: 'watercolor' })], operation: function(pixels, data) { // convert pixels grayscale return pixels; } });
this enables manipulate pixel data of arbitrary sources on per-layer base.
Comments
Post a Comment