Skip to content

Interactive interface for browsing global, full-resolution satellite imagery

WV-2520 Removing Granule Fill (no granule layers) (#4042)

Ryan Weilerbcd30f4c2f96
diff --git a/web/js/map/granule/util.js b/web/js/map/granule/util.js
index e17bdd526..1285f9a38 100644
--- a/web/js/map/granule/util.js
+++ b/web/js/map/granule/util.js
@@ -372,30 +372,26 @@ export const granuleFootprint = (map) => {
useSpatialIndex: false,
});
- const getVectorLayer = (text, showFill) => {
- const fill = showFill ? new OlStyleFill({ color: 'rgb(0, 123, 255, 0.25)' }) : null;
- return new OlVectorLayer({
- className: 'granule-map-footprint',
- source: vectorSource,
- style: [
- new OlStyle({
- fill,
- stroke: new OlStyleStroke({
- color: 'rgb(0, 123, 255, 0.65)',
- width: 3,
- }),
- text: new OlText({
- textAlign: 'center',
- text,
- font: '18px monospace',
- fill: new OlStyleFill({ color: 'white' }),
- stroke: new OlStyleStroke({ color: 'black', width: 2 }),
- overflow: true,
- }),
+ const getVectorLayer = (text) => new OlVectorLayer({
+ className: 'granule-map-footprint',
+ source: vectorSource,
+ style: [
+ new OlStyle({
+ stroke: new OlStyleStroke({
+ color: 'rgb(0, 123, 255, 0.65)',
+ width: 3,
}),
- ],
- });
- };
+ text: new OlText({
+ textAlign: 'center',
+ text,
+ font: '18px monospace',
+ fill: new OlStyleFill({ color: 'white' }),
+ stroke: new OlStyleStroke({ color: 'black', width: 2 }),
+ overflow: true,
+ }),
+ }),
+ ],
+ });
const removeFootprint = () => {
currentGranule = {};
@@ -406,8 +402,7 @@ export const granuleFootprint = (map) => {
const drawFootprint = (points, date) => {
const geometry = new OlGeomPolygon([points]);
const featureFootprint = new OlFeature({ geometry });
- const showFill = map.getView().getZoom() < 3;
- const newVectorLayer = getVectorLayer(date, showFill);
+ const newVectorLayer = getVectorLayer(date);
vectorSource.addFeature(featureFootprint);
vectorLayer = newVectorLayer;
map.addLayer(vectorLayer);