Skip to content

Commit

Permalink
Upgrade to Mapbox GL JS 3.6.0 and Geocoder 5.0.2.
Browse files Browse the repository at this point in the history
Hide back button on map screen when launching as an app.
  • Loading branch information
Andrew67 committed Aug 19, 2024
1 parent 35dcfab commit 0643bef
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 17 deletions.
18 changes: 9 additions & 9 deletions public/js/my.js
Original file line number Diff line number Diff line change
Expand Up @@ -543,15 +543,15 @@ ons.ready(function () {

// If user navigated to the map from the main page or a nearby search, go back
// otherwise do an "up" navigation back to main screen
document
.getElementById("mapview-back")
.addEventListener("click", function () {
if (document.referrer.includes(window.location.host)) {
window.history.back();
} else {
window.location.href = "/";
}
});
const mapViewBackButton = document.getElementById("mapview-back");
mapViewBackButton.addEventListener("click", function () {
if (document.referrer.includes(window.location.host)) {
window.history.back();
} else {
window.location.href = "/";
}
});
if (navigator.standalone) mapViewBackButton.hidden = true;

// If Web Share API is supported, insert a share button into the toolbar (shares current URL).
// See: https://developers.google.com/web/updates/2016/09/navigator-share
Expand Down
16 changes: 8 additions & 8 deletions src/pages/ng/index.astro
Original file line number Diff line number Diff line change
Expand Up @@ -63,26 +63,26 @@
referrerpolicy="no-referrer"></script>
<!-- Mapbox GL JS -->
<script
src="https://api.mapbox.com/mapbox-gl-js/v3.2.0/mapbox-gl.js"
integrity="sha512-+f5zHh0q6pj9rhdxgaL5u6H+PnKADOwJSNfQM9NcavVq4y3GnzoRqoVih4Exd//uzdqE7XqnjtQyfr0GuVId2A=="
src="https://api.mapbox.com/mapbox-gl-js/v3.6.0/mapbox-gl.js"
integrity="sha512-JVryXTxZQMHE73Zs+glJCoQv1D7lbmKrA1T5Udesjyww4gvrBlvS4qOye0407t2Izpp1a5ks8hBlF52ubdAqKQ=="
crossorigin="anonymous"
referrerpolicy="no-referrer"></script>
<link
rel="stylesheet"
href="https://api.mapbox.com/mapbox-gl-js/v3.2.0/mapbox-gl.css"
href="https://api.mapbox.com/mapbox-gl-js/v3.6.0/mapbox-gl.css"
integrity="sha512-K54V3ai9CHFBUpp+fo4ekZ89sMvBpfAVl+WSP4FcThI3DkrO2lc5Hl9utLzuuJL83OxgMq72YD9gTIYvh8jhnA=="
crossorigin="anonymous"
referrerpolicy="no-referrer"
/>
<!-- Mapbox GL Geocoder -->
<script
src="https://api.mapbox.com/mapbox-gl-js/plugins/mapbox-gl-geocoder/v5.0.0/mapbox-gl-geocoder.min.js"
integrity="sha512-cpEMeEaMvc46VN2tP20Drksme5TQGShWew2G2HbB6yFERjblVPcFxR6njsKeWup7CNIW++jD2exNYi/gEj3i4g=="
src="https://api.mapbox.com/mapbox-gl-js/plugins/mapbox-gl-geocoder/v5.0.2/mapbox-gl-geocoder.min.js"
integrity="sha512-EodE+HMwb42NbdDsMkjY+KjuPwhhFcnyuL6bUqf4laQt/i+asrhxCwFqNpdoyngkSGKOnvkZS6/oWOjPqC+qOQ=="
crossorigin="anonymous"
referrerpolicy="no-referrer"></script>
<link
rel="stylesheet"
href="https://api.mapbox.com/mapbox-gl-js/plugins/mapbox-gl-geocoder/v5.0.0/mapbox-gl-geocoder.css"
href="https://api.mapbox.com/mapbox-gl-js/plugins/mapbox-gl-geocoder/v5.0.2/mapbox-gl-geocoder.css"
integrity="sha512-q4tUTr+1WMlXl24kBXZNEOKYVN6XaSkWYtnahG0qsGq+9ZJdavRK8T9EYP8B5HenuAHB0feOzicXPNz0Rkiw4A=="
crossorigin="anonymous"
referrerpolicy="no-referrer"
Expand Down Expand Up @@ -452,15 +452,15 @@
data-href="https://docs.mapbox.com/mapbox-gl-js/"
>
<span class="list-item__title">Mapbox GL JS</span>
<span class="list-item__subtitle">v3.2.0</span>
<span class="list-item__subtitle">v3.6.0</span>
</ons-list-item>
<ons-list-item
tappable
modifier="chevron"
data-href="https://github.com/mapbox/mapbox-gl-geocoder/"
>
<span class="list-item__title">Mapbox GL Geocoder</span>
<span class="list-item__subtitle">v5.0.0</span>
<span class="list-item__subtitle">v5.0.2</span>
</ons-list-item>
</ons-list>
</ons-page>
Expand Down

0 comments on commit 0643bef

Please sign in to comment.