Interactive interface for browsing global, full-resolution satellite imagery
Fix animating custom colormaps #667
Benjamin King42fa28c65958
diff --git a/web/js/map/layerbuilder.js b/web/js/map/layerbuilder.jsindex 9e214f17d..ee70f47d6 100644--- a/web/js/map/layerbuilder.js+++ b/web/js/map/layerbuilder.js@@ -187,7 +187,7 @@ export function mapLayerBuilder(models, config, cache, Parent) {};if (models.palettes.isActive(def.id)) {var lookup = models.palettes.getLookup(def.id);- sourceOptions.tileClass = lookupFactory(lookup);+ sourceOptions.tileClass = lookupFactory(lookup, sourceOptions);}var layer = new OlLayerTile({extent: extent,@@ -265,7 +265,7 @@ export function mapLayerBuilder(models, config, cache, Parent) {if (models.palettes.isActive(def.id)) {var lookup = models.palettes.getLookup(def.id);- sourceOptions.tileClass = lookupFactory(lookup);+ sourceOptions.tileClass = lookupFactory(lookup, sourceOptions);}var layer = new OlLayerTile({extent: extent,diff --git a/web/js/ol/lookupimagetile.js b/web/js/ol/lookupimagetile.jsindex 67357c9d5..72dcde4e6 100644--- a/web/js/ol/lookupimagetile.js+++ b/web/js/ol/lookupimagetile.js@@ -2,8 +2,8 @@ import OlImageTile from 'ol/imagetile';import OlTileState from 'ol/tilestate';class LookupImageTile extends OlImageTile {- constructor(lookup, tileCoord, state, src, crossOrigin, tileLoadFunction) {- super(tileCoord, state, src, crossOrigin, tileLoadFunction);+ constructor(lookup, tileCoord, state, src, crossOrigin, tileLoadFunction, sourceOptions) {+ super(tileCoord, state, src, crossOrigin, tileLoadFunction, sourceOptions);this.lookup_ = lookup;this.canvas_ = null;}@@ -14,6 +14,7 @@ LookupImageTile.prototype.getImage = function() {LookupImageTile.prototype.load = function() {if (this.state === OlTileState.IDLE) {this.state = OlTileState.LOADING;+ this.changed();var that = this;var onImageLoad = function() {that.canvas_ = document.createElement('canvas');@@ -50,9 +51,9 @@ LookupImageTile.prototype.load = function() {}};-export function lookupFactory(lookup) {+export function lookupFactory(lookup, sourceOptions) {return function (tileCoord, state, src, crossOrigin, tileLoadFunction) {return new LookupImageTile(lookup, tileCoord, state, src,- crossOrigin, tileLoadFunction);+ crossOrigin, tileLoadFunction, sourceOptions);};};