Skip to content

Commit 8d88fee

Browse files
Workaround google maps development loading warning in explorer
1 parent 04aa0c2 commit 8d88fee

File tree

2 files changed

+18
-4
lines changed

2 files changed

+18
-4
lines changed

explorer/explorer-map.js

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@ async function initMap() {
1313
}
1414

1515
const archerDanielMidlandPosition = {
16-
lat: 41.42,
17-
lng: -97.29
16+
lat: 41.42,
17+
lng: -97.29
1818
}
1919

2020
map = new Map(document.getElementById("map"), {
@@ -151,11 +151,25 @@ initMap().then(async () => {
151151

152152
$('#results').empty()
153153
.append(summaryTable)
154-
//.append(infoTable.clone())
154+
// .append(infoTable.clone())
155155

156156
resetGenerationProfileGraphs()
157157
});
158158

159159
}
160160
});
161+
162+
let dismissAttempts = 0
163+
let gmapDismissWorkaround = function () {
164+
let dismissBtn = document.querySelector('#map .dismissButton')
165+
dismissAttempts += 1
166+
if (dismissBtn) {
167+
dismissBtn.click()
168+
} else if (dismissAttempts < 69) {
169+
setTimeout(gmapDismissWorkaround, 250)
170+
} else {
171+
console.warn('Failed to find gmap dismiss button after max attempts, giving up')
172+
}
173+
}
174+
setTimeout(gmapDismissWorkaround, 500)
161175
});

explorer/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ <h1 class="mui--text-title">
6969
indicates how close temps at 3000m are to unit temperature; darker blue = closer to unit temp
7070
</p>
7171
<p>
72-
You may also be interested in using the <a href="/geothermal/geophires">GEOPHIRES web interface</a>.
72+
You may also be interested in the <a href="/geothermal/geophires">GEOPHIRES web interface</a>.
7373
</p>
7474
</div>
7575
</div>

0 commit comments

Comments
 (0)