Skip to content

Commit 0ea5407

Browse files
committed
Add API key warning
1 parent f7b9efe commit 0ea5407

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

app/assets/javascripts/views/missions/main.js

+5
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,11 @@ window.addEventListener('DOMContentLoaded', function () {
1111

1212
const apiKey = ''
1313

14+
if(!apiKey) {
15+
let warning = document.querySelector("#api-warning")
16+
warning.innerText = "Please supply the API Key from the Trello card, otherwise map image tiles will not populate."
17+
}
18+
1419
// Initialize the map.
1520
const mapOptions = {
1621
minZoom: 7,

app/views/missions/show.html.erb

+1
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
add_view_stylesheet("missions/leaflet")
99
add_view_stylesheet("missions/main")
1010
%>
11+
<div id="api-warning"></div>
1112

1213
<input type="checkbox" name="checkbox1" id="checkbox1" checked> Filter One<br/>
1314
<input type="checkbox" name="checkbox1" id="checkbox2" checked> Filter Two<br/>

0 commit comments

Comments
 (0)