Skip to content

Interactive interface for browsing global, full-resolution satellite imagery

URS notice

Mike McGann6bea92820fce
diff --git a/src/css/dataDownload.css b/src/css/dataDownload.css
index 20c962739..711b8ac37 100644
--- a/src/css/dataDownload.css
+++ b/src/css/dataDownload.css
@@ -69,6 +69,35 @@
#DataDownload_SelectionListPanel td {
border-bottom: 1px solid #303030;
padding: 5px;
+ vertical-align: top;
+}
+
+#DataDownload_Notice {
+ width: 80%;
+ margin: 0 auto;
+ border: 1px solid #ccccff;
+ border-radius: 5px;
+ background-color: #ddddff;
+ padding: 5px;
+}
+
+#DataDownload_Notice .icon {
+ width: 32px;
+ height: 32px;
+ float: left;
+}
+
+#DataDownload_Notice .text {
+ padding-left: 42px;
+ color: #000000;
+}
+
+#DataDownload_Notice .text a {
+ color: #202070;
+}
+
+#DataDownload_SelectionListPanel div.wget {
+ float: right;
}
\ No newline at end of file
diff --git a/src/images/info-icon-blue.svg b/src/images/info-icon-blue.svg
new file mode 100644
index 000000000..193ac1b08
--- /dev/null
+++ b/src/images/info-icon-blue.svg
@@ -0,0 +1,37 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
+<svg xmlns="http://www.w3.org/2000/svg"
+ viewBox="0 0 62 62"
+ width="62" height="62"
+ version="1.1">
+ <defs>
+ <linearGradient id="fieldGradient"
+ gradientUnits="userSpaceOnUse"
+ x1="42.9863" y1="7.01270"
+ x2="22.0144" y2="51.9871">
+ <stop offset="0.0" stop-color="#BCD6FE" />
+ <stop offset="1.0" stop-color="#6787D3" />
+ </linearGradient>
+ <linearGradient id="edgeGradient"
+ gradientUnits="userSpaceOnUse"
+ x1="55.4541" y1="42.7529"
+ x2="9.54710" y2="16.2485">
+ <stop offset="0.0" stop-color="#3057A7" />
+ <stop offset="1.0" stop-color="#5A7AC6" />
+ </linearGradient>
+ <radialGradient id="shadowGradient">
+ <stop offset="0.0" stop-color="#C0C0C0" />
+ <stop offset="0.88" stop-color="#C0C0C0" />
+ <stop offset="1.0" stop-color="#C0C0C0" stop-opacity="0.0" />
+ </radialGradient>
+ </defs>
+ <circle id="shadow" r="26.5" cx="32.5" cy="29.5"
+ fill="url(#shadowGradient)"
+ transform="matrix(1.0648,0.0,0.0,1.064822,-2.1,1.0864)" />
+ <circle id="field" r="25.8" cx="31" cy="31"
+ fill="url(#fieldGradient)" stroke="url(#edgeGradient)" stroke-width="2" />
+ <g id="info" fill="white">
+ <polygon points="23,25 35,25 35,44 39,44 39,48 23,48 23,44 27,44 27,28 23,28 23,25" />
+ <circle r="4" cx="31" cy="17" />
+ </g>
+</svg>
diff --git a/src/js/Worldview/DataDownload/SelectionListPanel.js b/src/js/Worldview/DataDownload/SelectionListPanel.js
index 210a519dd..febe2da7b 100644
--- a/src/js/Worldview/DataDownload/SelectionListPanel.js
+++ b/src/js/Worldview/DataDownload/SelectionListPanel.js
@@ -15,7 +15,20 @@ Worldview.DataDownload.SelectionListPanel = function(config, model) {
var REL_DATA = "http://esipfed.org/ns/fedsearch/1.1/data#";
var REL_BROWSE = "http://esipfed.org/ns/fedsearch/1.1/browse#";
+ var NOTICE =
+ "<div id='DataDownload_Notice'>" +
+ "<img class='icon' src='images/info-icon-blue.svg'>" +
+ "<p class='text'>" +
+ "An account with the EOSDIS User Registration System (URS) " +
+ "is necessary to download data. It is simple and " +
+ "free to sign up! Click to " +
+ "<a href='https://earthdata.nasa.gov/urs/register' target='urs'>" +
+ "register for an account.</a>" +
+ "</p>" +
+ "</div>";
+
var panel;
+ var selection;
var self = {};
self.show = function() {
@@ -29,13 +42,16 @@ Worldview.DataDownload.SelectionListPanel = function(config, model) {
visible: false
});
panel.setHeader("Download Links");
- panel.setBody(bodyText());
+ selection = reformatSelection();
+ panel.setBody(bodyText(selection));
panel.render(document.body);
panel.show();
panel.center();
panel.hideEvent.subscribe(function() {
setTimeout(function() { panel.destroy(); }, 25);
});
+
+ $("#DataDownload_SelectionListPanel a.wget").click(showTextURLs);
};
self.hide = function() {
@@ -108,6 +124,7 @@ Worldview.DataDownload.SelectionListPanel = function(config, model) {
});
});
+ console.log(selection);
return selection;
};
@@ -163,8 +180,12 @@ Worldview.DataDownload.SelectionListPanel = function(config, model) {
};
var bodyText = function() {
- var selection = reformatSelection();
- var elements = [];
+ var elements = [
+ NOTICE,
+ "<div class='wget'>",
+ "<a class='wget' href='#'>Text URLs (wget)</a>",
+ "</div>"
+ ];
$.each(selection, function(key, product) {
elements.push(productText(product));
});
@@ -172,6 +193,28 @@ Worldview.DataDownload.SelectionListPanel = function(config, model) {
return text;
};
+ var showTextURLs = function() {
+ var text = window.open('');
+ text.document.write("<html><body><ul>");
+ $.each(selection, function(key, product) {
+ $.each(product.list, function(index, item) {
+ $.each(item.links, function(index, link) {
+ writeLink(text.document, link);
+ });
+ });
+ });
+ text.document.write("</ul></body></html>");
+ text.document.close();
+ };
+
+ var writeLink = function(doc, link) {
+ doc.write(
+ "<li>" +
+ "<a href='" + link.href + "'>" + link.href + "</a>" +
+ "</li>"
+ );
+ };
+
return self;
};