Interactive interface for browsing global, full-resolution satellite imagery
remove date key for static layers
Mike McGann3ca74c14424c
diff --git a/doc/configuration.md b/doc/configuration.mdindex f582cd662..852dd7e93 100644--- a/doc/configuration.md+++ b/doc/configuration.md@@ -69,7 +69,7 @@ The following properties are required if this information is not available via t- **type**: Tile service type, either *wmts*, *wms*, or *vector*.- **format**: Image format type, either *image/png* or *image/jpeg*.- **tileSize**: For WMS layers only, an array of pixel dimensions used to tile the requests. For example, *[512, 512]*-- **period**: Use *subdaily*, *daily*, *monthly*, or *yearly* for layers that have new content and no startDate defined in GetCapabilities. Changing the period will affect how often the layer is requested in the timeline. Use *static* to clear the startDate and always have the layer shown on the timeline.+- **period**: Use *subdaily*, *daily*, *monthly*, or *yearly* for layers that have new content and no startDate defined in GetCapabilities. Changing the period will affect how often the layer is requested in the timeline. Omit this parameter to always have the layer shown on the timeline.- **startDate**: The first day that data is available, represented in YYYY-MM-DD or YYYY-MM-DDThh:mm:ssZ format.- **endDate**: The last day that data is available, represented in YYYY-MM-DD or YYYY-MM-DDThh:mm:ssZ format.- **inactive**: Use *true* if the layer is no longer being produced.diff --git a/web/js/map/layerbuilder.js b/web/js/map/layerbuilder.jsindex a20846910..f4e33d44a 100644--- a/web/js/map/layerbuilder.js+++ b/web/js/map/layerbuilder.js@@ -170,9 +170,13 @@ export function mapLayerBuilder(models, config, cache, mapUi) {var projId = models.proj.selected.id;var palette = '';layerGroupStr = options.group ? options.group : models.layers.activeLayers;- date = util.toISOStringSeconds(- util.roundTimeOneMinute(self.closestDate(def, options))- );+ // Don't key by time if this is a static layer--it is valid for+ // every date.+ if (def.period) {+ date = util.toISOStringSeconds(+ util.roundTimeOneMinute(self.closestDate(def, options))+ );+ }if (models.palettes.isActive(def.id)) {palette = models.palettes.key(def.id);}