Avoid unnecessary transition on raster sources

This commit is contained in:
Tim Schaub
2017-10-09 18:12:40 -06:00
parent 88ca77b8c7
commit 373179ad82
3 changed files with 6 additions and 3 deletions

View File

@@ -102,7 +102,8 @@ function xyz2rgb(x) {
var raster = new ol.source.Raster({
sources: [new ol.source.Stamen({
layer: 'watercolor'
layer: 'watercolor',
transition: 0
})],
operation: function(pixels, data) {
var hcl = rgb2hcl(pixels[0]);

View File

@@ -26,7 +26,8 @@ function flood(pixels, data) {
var key = 'pk.eyJ1IjoidHNjaGF1YiIsImEiOiJjaW5zYW5lNHkxMTNmdWttM3JyOHZtMmNtIn0.CDIBD8H-G2Gf-cPkIuWtRg';
var elevation = new ol.source.XYZ({
url: 'https://api.mapbox.com/v4/mapbox.terrain-rgb/{z}/{x}/{y}.pngraw?access_token=' + key,
crossOrigin: 'anonymous'
crossOrigin: 'anonymous',
transition: 0
});
var raster = new ol.source.Raster({

View File

@@ -104,7 +104,8 @@ function shade(inputs, data) {
var elevation = new ol.source.XYZ({
url: 'https://{a-d}.tiles.mapbox.com/v3/aj.sf-dem/{z}/{x}/{y}.png',
crossOrigin: 'anonymous'
crossOrigin: 'anonymous',
transition: 0
});
var raster = new ol.source.Raster({