Raster source for composing pixels from other sources

This commit is contained in:
Tim Schaub
2015-02-05 14:15:45 -07:00
parent 49cc39c4dd
commit acc97a53eb
7 changed files with 415 additions and 1 deletions

28
examples/raster.js Normal file
View File

@@ -0,0 +1,28 @@
goog.require('ol.Map');
goog.require('ol.View');
goog.require('ol.layer.Image');
goog.require('ol.source.OSM');
goog.require('ol.source.Raster');
var map = new ol.Map({
layers: [
new ol.layer.Image({
source: new ol.source.Raster({
sources: [new ol.source.OSM()],
operations: [function(pixels) {
var pixel = pixels[0];
var b = pixel[2];
pixel[2] = pixel[0];
pixel[0] = b;
return pixels;
}]
})
})
],
target: 'map',
view: new ol.View({
center: [0, 0],
zoom: 2
})
});