Skip to content

Commit

Permalink
Merge pull request #214 from USGS-WiM/staging
Browse files Browse the repository at this point in the history
Added CHANGELOG.md and build for release
  • Loading branch information
njestes authored May 24, 2024
2 parents 25288b2 + 12273d9 commit 4f3cce3
Show file tree
Hide file tree
Showing 8 changed files with 108 additions and 106 deletions.
46 changes: 46 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
# Changelog

All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).

## [Unreleased](https://github.com/USGS-WiM/swi/tree/staging)

### Added

-

### Changed

-

### Deprecated

-

### Removed

-

### Fixed

-

### Security

-

## [v1.5](https://github.com/USGS-WiM/swi/tree/v1.5) - 2024-05-24

### Added

- Disclaimer shown on initial load

### Fixed

- Updated links

### Removed

- Display of historic data and historic data service calls
24 changes: 21 additions & 3 deletions build/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
<a class="navbar-brand" target="_blank" href="https://www.fws.gov">
<img id="fwsLogo" alt="FWS logo" src="images/fwsLogo.png" style="padding: 10px 0 0 0;">
</a>
<a class="navbar-brand" target="_blank" href="https://www.fws.gov/wetlands/index.html">
<a class="navbar-brand" target="_blank" href="https://www.fws.gov/program/national-wetlands-inventory">
<div id="titles">
<div class='hidden-lg hidden-md hidden-sm' style='font-size:20px;'>NWI</div>
<div class='hidden-xs' style='font-size:20px;'>National Wetlands Inventory</div>
Expand Down Expand Up @@ -84,6 +84,26 @@
</div>
</div>

<div class="modal fade overflow-y-hidden" id="disclaimerModal" style="display: none;" aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">x</button>
<h4 class="modal-title"><b>Disclaimer</b></h4>
</div>
<div class="modal-body">
<p>
The wetlands displayed on the Wetlands Mapper are not jurisdictional. They show wetland type and extent using a biological definition
of wetlands mapped to imagery using a specific date. There is no attempt to define the limits of jurisdiction of any Federal, State,
or local government, or to account for changes in the landscape that may have occurred after the wetland data were produced. <b>For
information about regulations that may affect wetlands or development on your property, contact the U.S. Army Corps of Engineers
office nearest you: </b><a target="_blank" href="http://www.usace.army.mil/Locations.aspx">http://www.usace.army.mil/Locations.aspx</a>.
</p>
</div>
</div><!-- /.modal-content -->
</div><!-- /.modal-dialog -->
</div>


<div class="modal fade overflow-y-hidden" id="geosearchModal" style="display: none;" aria-hidden="true">
<div class="modal-dialog">
Expand Down Expand Up @@ -166,8 +186,6 @@ <h3>Before You Begin</h3><br/>
<li>Wetlands Historic Map Information*</li>
<li>Riparian polygon data*</li>
<li>Riparian Project Metadata (includes image dates and project information)*</li>
<li>Historic Wetlands*</li>
<li>Historic Wetlands Project Metadata (includes image dates and project information)*</li>
<li>Watershed Boundary Dataset (WBD) HUC8 modified** </li><br/>
</ul>
</ul>
Expand Down
4 changes: 2 additions & 2 deletions build/scripts/combined.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion build/styles/main.css

Large diffs are not rendered by default.

24 changes: 21 additions & 3 deletions src/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@
<a class="navbar-brand" target="_blank" href="https://www.fws.gov">
<img id="fwsLogo" alt="FWS logo" src="images/fwsLogo.png" style="padding: 10px 0 0 0;">
</a>
<a class="navbar-brand" target="_blank" href="https://www.fws.gov/wetlands/index.html">
<a class="navbar-brand" target="_blank" href="https://www.fws.gov/program/national-wetlands-inventory">
<div id="titles">
<div class='hidden-lg hidden-md hidden-sm' style='font-size:20px;'>NWI</div>
<div class='hidden-xs' style='font-size:20px;'>National Wetlands Inventory</div>
Expand Down Expand Up @@ -111,6 +111,26 @@
</div>
</div>

<div class="modal fade overflow-y-hidden" id="disclaimerModal" style="display: none;" aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">x</button>
<h4 class="modal-title"><b>Disclaimer</b></h4>
</div>
<div class="modal-body">
<p>
The wetlands displayed on the Wetlands Mapper are not jurisdictional. They show wetland type and extent using a biological definition
of wetlands mapped to imagery using a specific date. There is no attempt to define the limits of jurisdiction of any Federal, State,
or local government, or to account for changes in the landscape that may have occurred after the wetland data were produced. <b>For
information about regulations that may affect wetlands or development on your property, contact the U.S. Army Corps of Engineers
office nearest you: </b><a target="_blank" href="http://www.usace.army.mil/Locations.aspx">http://www.usace.army.mil/Locations.aspx</a>.
</p>
</div>
</div><!-- /.modal-content -->
</div><!-- /.modal-dialog -->
</div>


<div class="modal fade overflow-y-hidden" id="geosearchModal" style="display: none;" aria-hidden="true">
<div class="modal-dialog">
Expand Down Expand Up @@ -193,8 +213,6 @@ <h3>Before You Begin</h3><br/>
<li>Wetlands Historic Map Information*</li>
<li>Riparian polygon data*</li>
<li>Riparian Project Metadata (includes image dates and project information)*</li>
<li>Historic Wetlands*</li>
<li>Historic Wetlands Project Metadata (includes image dates and project information)*</li>
<li>Watershed Boundary Dataset (WBD) HUC8 modified** </li><br/>
</ul>
</ul>
Expand Down
106 changes: 11 additions & 95 deletions src/scripts/core.js
Original file line number Diff line number Diff line change
Expand Up @@ -355,6 +355,9 @@ require([
}.bind(this));
//end code for adding draggability to infoWindow

//$('#aboutModal').modal('show');
//$('#disclaimerTab').trigger('click');

//map click handler
on(map, "click", function(evt) {

Expand Down Expand Up @@ -384,17 +387,6 @@ require([
identifyTask = new IdentifyTask(allLayers[0].layers["Wetlands"].url);
var deferredResult = identifyTask.execute(identifyParams);

//Historic Wetland Identify task
var historicIdentifyParameters = new IdentifyParameters();
historicIdentifyParameters.returnGeometry = true;
historicIdentifyParameters.tolerance = 0;
historicIdentifyParameters.width = map.width;
historicIdentifyParameters.height = map.height;
historicIdentifyParameters.geometry = evt.mapPoint;
historicIdentifyParameters.layerOption = IdentifyParameters.LAYER_OPTION_ALL;
historicIdentifyParameters.mapExtent = map.extent;
historicIdentifyParameters.layerIds = [0,1];

setCursorByID("mainDiv", "wait");
map.setCursor("wait");

Expand Down Expand Up @@ -783,90 +775,7 @@ require([

//map.infoWindow.show(evt.mapPoint);

} else if (response.length <= 1) {

var historicIdentifyTask = new IdentifyTask(allLayers[2].layers["Historic Wetland Data"].url);
var deferredHistoric = historicIdentifyTask.execute(historicIdentifyParameters);

deferredHistoric.addCallback(function(response) {

if (response.length >= 1) {

var feature;
var attr;
var attrStatus;

for (var i = 0; i < response.length; i++) {
if (response[i].layerId == 0) {
feature = response[i].feature;
attr = feature.attributes;
} else if (response[i].layerId == 1) {
attrStatus = response[i].feature.attributes;
}

}

// Code for adding wetland highlight
var symbol = new esri.symbol.SimpleFillSymbol(esri.symbol.SimpleFillSymbol.STYLE_SOLID,
new esri.symbol.SimpleLineSymbol(esri.symbol.SimpleLineSymbol.STYLE_SOLID,
new dojo.Color([255,255,0]), 2), new dojo.Color([98,194,204,0])
);
feature.geometry.spatialReference = map.spatialReference;
var graphic = feature;
graphic.setSymbol(symbol);

map.graphics.add(graphic);

var projmeta = '';
if (attrStatus.SUPPMAPINFO == 'None') {
projmeta = " NONE";
} else {
projmeta = " <a target='_blank' href='" + attrStatus.SUPPMAPINFO + "'>click here</a>";
}

if (attrStatus.IMAGE_DATE == "<Null>" || attrStatus.IMAGE_DATE == "0" || attrStatus.IMAGE_DATE == 0) {
attrStatus.IMAGE_DATE = projmeta;
}

var template = new esri.InfoTemplate("Historic Wetland",
"<p><b>Wetland Type:</b> " + attr.WETLAND_TYPE + "<br/>" +
"<b>Acres:</b> " + Number(attr.ACRES).toFixed(2) + "<br/>" +
"<b>Project Metadata:</b>" + projmeta +
"<br/><p><a id='infoWindowLink' href='javascript:void(0)'>Zoom to wetland</a></p>");

//ties the above defined InfoTemplate to the feature result returned from a click event

feature.setInfoTemplate(template);

map.infoWindow.setFeatures([feature]);
map.infoWindow.show(evt.mapPoint, map.getInfoWindowAnchor(evt.screenPoint));

var infoWindowClose = dojo.connect(map.infoWindow, "onHide", function(evt) {
map.graphics.clear();
dojo.disconnect(map.infoWindow, infoWindowClose);
$("infoWindowLink").unbind("click");
});

setCursorByID("mainDiv", "default");
map.setCursor("default");

$("#infoWindowLink").click(function(event) {
var convertedGeom = webMercatorUtils.webMercatorToGeographic(feature.geometry);

var featExtent = convertedGeom.getExtent();

map.setExtent(featExtent, true);
});

//map.infoWindow.show(evt.mapPoint);

} else {
setCursorByID("mainDiv", "default");
map.setCursor("default");
map.infoWindow.hide();
}
});
}
}
});
}
});
Expand Down Expand Up @@ -1162,6 +1071,7 @@ require([
}
$('#aboutNav').click(function(){
showAboutModal();
$('#aboutTab').trigger('click');
});

$("#html").niceScroll();
Expand All @@ -1170,6 +1080,12 @@ require([
$("#sidebar").getNiceScroll().resize();
});

function showDisclaimerModal() {
$('#disclaimerModal').modal('show');
}

showDisclaimerModal();

maxLegendHeight = ($('#mapDiv').height()) * 0.90;
$('#legendElement').css('max-height', maxLegendHeight);
maxLegendDivHeight = (maxLegendHeight) - parseInt($('#legendHeading').css("height").replace('px',''));
Expand Down
4 changes: 2 additions & 2 deletions src/scripts/layers.js
Original file line number Diff line number Diff line change
Expand Up @@ -305,7 +305,7 @@ require([
'includeLegend' : true,
'esriLegendLabel': false
}
},*/
},
'Historic Wetland Data' : {
'url': 'https://fwsprimary.wim.usgs.gov/server/rest/services/Historic_Wetlands/MapServer',
'visibleLayers': [0,1],
Expand All @@ -323,7 +323,7 @@ require([
'includeLegend' : true,
'legendLabel': false
}
}
}*/
}
}

Expand Down
4 changes: 4 additions & 0 deletions src/styles/main.css
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,10 @@ body {
z-index: 100000000;
}

#disclaimerModal {
z-index: 100000001;
}

#aboutNav{
letter-spacing: 2px;
position: relative; top: 2px;
Expand Down

0 comments on commit 4f3cce3

Please sign in to comment.