Skip to content

Interactive interface for browsing global, full-resolution satellite imagery

Add a mock change style button to test multi-styles

ZachTRice52898830b34d
diff --git a/web/index.html b/web/index.html
index ccff082f1..291db1b8e 100644
--- a/web/index.html
+++ b/web/index.html
@@ -53,6 +53,9 @@ Licensed under the NASA Open Source Agreement, Version 1.3 (http://opensource.gs
<div id="wv-tour" class="wv-tour"></div>
<div id="wv-alerts" class="wv-alerts"></div>
<div class="backdrop"></div>
+ <div style="position:absolute;display:block;top:0;left:50%;right:50%;width:150px;height:40px;background-color:#fff;">
+ <input id="frpCheckbox"type="checkbox" name="frpColors" value="frp"> Use FRP Styles?<br>
+ </div>
</body>
</html>
diff --git a/web/js/map/layerbuilder.js b/web/js/map/layerbuilder.js
index 871020052..545c8b269 100644
--- a/web/js/map/layerbuilder.js
+++ b/web/js/map/layerbuilder.js
@@ -607,7 +607,16 @@ export function mapLayerBuilder(models, config, cache, mapUi, store) {
// TODO: Check performance of fetch here and move somewhere else if needed / do some cachinng magic
fetch('../../config/vectorstyles/FIRMS_MODIS_MAPBOX_STYLE.json').then(function(response) {
response.json().then(function(glStyle) {
- stylefunction(layer, glStyle, 'MODIS_Aqua_Thermal_Anomalies_All_v6_NRT');
+ $(document).ready(function() {
+ $(document).on('change', document.getElementById('frpCheckbox'), function(e) {
+ if (document.getElementById('frpCheckbox').checked === true) {
+ stylefunction(layer, glStyle, 'MODIS_Fire_Points_FRP');
+ } else {
+ stylefunction(layer, glStyle, 'MODIS_Fire_Points_Confidence');
+ }
+ });
+ });
+ stylefunction(layer, glStyle, 'MODIS_Fire_Points_Confidence');
});
});