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

Popular posts from this blog

Ansible - ERROR! the field 'hosts' is required but was not set -

customize file_field button ruby on rails -

SoapUI on windows 10 - high DPI/4K scaling issue -