Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -162,8 +162,8 @@ <h3>What's new in version 2.1?</h3>
<span class='hidden-xs'><span class='visible-tablet-mobile' style='font-size:12px; color:white'>Page Contact Information: <a href="mailto:marsmith@usgs.gov" style='font-size:12px; color:white' target="_blank">Website Manager</a><br /></span></span>
<span class='visible-xs'><span class='visible-tablet-mobile' style='font-size:6px; color:white'>Page Contact Information: <a href="mailto:marsmith@usgs.gov" style='font-size:6px; color:white' target="_blank">Website Manager</a><br /></span></span>

<span class='hidden-xs'><span class='visible-tablet-mobile' style='font-size:12px; color:white'>Page Last Modified: Thursday, May 9, 2019</span></span>
<span class='visible-xs'><span class='visible-tablet-mobile' style='font-size:6px; color:white'>Page Last Modified: Thursday, May 9, 2019</span></span>
<span class='hidden-xs'><span class='visible-tablet-mobile' style='font-size:12px; color:white'>Page Last Modified: Monday, August 19, 2019</span></span>
<span class='visible-xs'><span class='visible-tablet-mobile' style='font-size:6px; color:white'>Page Last Modified: Monday, August 19, 2019</span></span>
</p>
</span>
</div>
Expand Down
12 changes: 9 additions & 3 deletions js/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ var stateOfClickedMarker;
var precipitation;
var wind;
var clouds;
var inIframeMode = false;

//main document ready function
$(document).ready(function () {
Expand Down Expand Up @@ -328,17 +329,20 @@ function showPieChartFunction() {
function dateQueryButtonFunction() {
var $btn = $('#dateQueryButton').button('loading');
var query = $('.datepicker').attr('value');
if (query !== moment().format('YYYY-MM-DD')) { //NOTE: see if necessary to make this more effecient
if (query !== moment().format('YYYY-MM-DD') && !inIframeMode) { //NOTE: see if necessary to make this more effecient
map.removeLayer(precipitation, wind, clouds);
$('.leaflet-control-layers').hide();
} else {
$('.leaflet-control-layers').show();
}
querySites(query, $btn);
}

function clickLegendBtn() {
$('#legend').toggle();
}
function processURLparams() {
if (URLparams.state && URLparams.lat && URLparams.lng && URLparams.zoom) {
inIframeMode = true;
loadAllSites = false;
theChosenState = URLparams.state.toUpperCase();
map.setView([URLparams.lat, URLparams.lng], URLparams.zoom)
Expand All @@ -354,7 +358,9 @@ function processURLparams() {
panToPoint = false;

$("#sitelink").html("<a href='https://ny.water.usgs.gov/maps/nowcast/' style='text-decoration: none;color:red;'>Powered by <font color='black'>NowCast Status</font>. Click here to see the full map of swimming areas.</a>");
$("#usgsfooter, #aboutModal, #legend, #topnav").remove();
$("#usgsfooter, #aboutModal, #topnav").remove();
map.removeLayer(precipitation, wind, clouds);
$('.leaflet-control').html('<button type="button" class="btn btn-primary" onclick="clickLegendBtn()">Legend</button>');
$("#body").css("padding-top", "0px");
$("html, body, #map").css({
"height": "-webkit-calc(100% - 8px)",
Expand Down
4 changes: 2 additions & 2 deletions test.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<h1><font face="arial">Check out our beaches!:</font></h1>
<h1><font face="arial">Check out our swimming areas!:</font></h1>
<br />
<iframe src="https://ny.water.usgs.gov/maps/nowcast?
<iframe src="../NowCast/?
state=PA&lat=42.15016895950386&lng
=-80.11402130126953&zoom=13"

Expand Down