Add activation zones for OE (#25), switch to gray basemap.at map for contours, add info dialog about basemap.at for users from Austrian IP addresses. Thanks @g84ycm!

beta
Manuel Kasper 2024-02-20 09:58:14 +01:00
rodzic a4073fba02
commit d02fe4fdbf
6 zmienionych plików z 94 dodań i 10 usunięć

Plik binarny nie jest wyświetlany.

Po

Szerokość:  |  Wysokość:  |  Rozmiar: 58 KiB

Wyświetl plik

@ -10,10 +10,10 @@
"basemapat": {
"type": "raster",
"tiles": [
"https://mapsneu.wien.gv.at/basemap/bmaphidpi/normal/google3857/{z}/{y}/{x}.jpeg"
"https://mapsneu.wien.gv.at/basemap/bmapgrau/normal/google3857/{z}/{y}/{x}.png"
],
"tileSize": 256,
"maxzoom": 18,
"maxzoom": 19,
"bounds": [8.782379, 46.358770, 17.5, 49.037872],
"attribution": "Grundkarte: <a target=\"_blank\" href=\"https://basemap.at/\">basemap.at</a>"
},
@ -98,7 +98,7 @@
"minzoom": 12,
"paint": {
"fill-antialias": false,
"fill-color": "rgba(255, 255, 0, 1)",
"fill-color": "rgba(50, 255, 0, 0.4)",
"fill-opacity": {"stops": [[12, 0], [12.5, 0.5]]}
}
},
@ -113,9 +113,10 @@
"layout": {"visibility": "none"},
"minzoom": 12,
"paint": {
"line-color": "rgba(235, 196, 0, 1)",
"line-color": "rgba(50, 150, 0, 1)",
"line-opacity": {"stops": [[12, 0], [12.5, 0.5]]},
"line-width": {"stops": [[12, 1], [16, 3]]}
"line-width": {"stops": [[12, 1], [16, 2]]},
"line-dasharray": [1,1]
}
},
{

Wyświetl plik

@ -0,0 +1,80 @@
<template>
<b-modal :active.sync="active" :on-cancel="cancelInfo" :can-cancel="false">
<div class="box content">
<div class="has-text-centered">
<span class="fp at flag"></span>
</div>
<h3>basemap.at-Karte jetzt verfügbar</h3>
<p>Auf SOTLAS kann man auch die detailliertere basemap.at-Karte nutzen, inkl. Aktivierungszonen. Einfach den Kartentyp umstellen, fertig!</p>
<div class="has-text-centered is-hidden-touch">
<img class="basemapat-info" src="../assets/basemapat-info.png" />
</div>
<div class="action-buttons">
<div class="has-text-centered">
<b-button type="is-info" size="is-medium" @click="switchMap">Jetzt umstellen</b-button>
</div>
<div class="has-text-centered">
<b-button size="is-medium" @click="cancelInfo">OK, cool!</b-button>
</div>
</div>
</div>
</b-modal>
</template>
<script>
import axios from 'axios'
export default {
name: 'BasemapAtInfo',
mounted () {
if (!localStorage.getItem('basemapAtInfoShown')) {
// Check if we are in Austria
axios.get(process.env.VUE_APP_API_URL + '/my_country')
.then(response => {
if (response.data.country === 'AT') {
this.active = true
}
})
}
},
methods: {
cancelInfo () {
this.active = false
localStorage.setItem('basemapAtInfoShown', true)
},
switchMap () {
this.cancelInfo()
this.$store.commit('setMapType', 'basemapat')
}
},
data () {
return {
active: false
}
}
}
</script>
<style scoped>
>>> .modal-content {
max-width: 40rem !important;
max-height: calc(100vh - 80px);
}
.button {
margin: 0.4rem 0.5rem 0.4rem 0.5rem;
width: 100%;
max-width: 20rem;
text-align: center;
}
.action-buttons {
margin-top: 0.75rem;
}
.flag {
font-size: 3rem;
}
.basemapat-info {
max-width: 20rem;
max-height: 30vh;
margin: 0.5rem 0;
}
</style>

Wyświetl plik

@ -21,7 +21,7 @@
<b-field v-if="mapType === 'openmaptiles' || mapType === 'swisstopo_vector'" grouped>
<b-checkbox v-model="mapOptions.hillshading" size="is-small" @input="setMapOption('hillshading', $event)">Hillshading</b-checkbox>
</b-field>
<b-field v-if="mapType.startsWith('swisstopo')" grouped>
<b-field v-if="mapType.startsWith('swisstopo') || mapType === 'basemapat'" grouped>
<b-checkbox v-model="mapOptions.az" size="is-small" @input="setMapOption('az', $event)">
Activation zones
<b-icon pack="fas" icon="info-circle" size="is-small" type="is-info" @click.native="showActivationZoneInfo" />
@ -194,7 +194,7 @@ export default {
event.preventDefault()
this.$buefy.dialog.alert({
title: 'Activation zones',
message: '<p style="margin-bottom: 0.5em">The activation zones for HB/HB0 have been calculated using <a href="https://www.swisstopo.admin.ch/de/geodata/height/alti3d.html" target="_blank">swissALTI3D</a> data from swisstopo (spatial resolution 0.5 m, accuracy ± 0.3 – 3 m (1σ) depending on the region).</p><p style="font-size: 0.8em">The activator is always responsible for ensuring that the operation takes place within the activation zone.</p>',
message: '<p style="margin-bottom: 0.5em">The activation zones for HB/HB0 have been calculated using <a href="https://www.swisstopo.admin.ch/de/geodata/height/alti3d.html" target="_blank">swissALTI3D</a> data from swisstopo (spatial resolution 0.5 m, accuracy ± 0.3 – 3 m (1σ) depending on the region).</p><p style="margin-bottom: 0.5em">The activation zones for OE have been calculated using <a href="https://data.bev.gv.at/geonetwork/srv/ger/catalog.search;jsessionid=1F5F6A9D0278E6871FEDB6B87EE0936B#/metadata/eae5f98d-d605-4783-8292-8b913d163cac" target="_blank">BEV ALS DTM</a> data (spatial resolution 1 m, accuracy generally ± 0.5 m, may vary in high altitude).</p><p style="font-size: 0.8em">The activator is always responsible for ensuring that the operation takes place within the activation zone.</p>',
type: 'is-info',
hasIcon: true,
icon: 'info-circle',

Wyświetl plik

@ -9,11 +9,12 @@
<p>Code contributed by: <a href="https://github.com/m1hax">@m1hax</a>, <a href="https://github.com/summitsontheair">@summitsontheair</a>,
<a href="https://github.com/vk3arr">@vk3arr</a>,
Simon G4TJC
Simon G4TJC,
<a href="https://github.com/g84ycm">@g84ycm</a>
</p>
<p>
Summit database © 2002-2023 Summits on the Air.<br />
Summit database © 2002-2024 Summits on the Air.<br />
Summits on the Air, SOTA and the SOTA Logo are trademarks of the Programme.
</p>

Wyświetl plik

@ -33,6 +33,7 @@
<div v-if="browserNotSupported" class="browser-not-supported">Your browser does not support WebGL, which is required to render this map. <strong>iOS 17 users: There is a bug in iOS 17 that can sometimes cause this error. Restarting Safari (closing/killing it completely) resolves the issue temporarily.</strong></div>
<div v-if="zoomWarning" class="zoom-warning">Zoom in to see all filtered/spotted summits</div>
<SwisstopoInfo />
<BasemapAtInfo />
<b-loading :is-full-page="false" :active="filtering || !showMap || !mapStyle" />
</div>
</template>
@ -56,11 +57,12 @@ import MapInfoPopup from '../components/MapInfoPopup.vue'
import MapDraw from '../components/MapDraw.vue'
import MapWebcams from '../components/MapWebcams.vue'
import SwisstopoInfo from '../components/SwisstopoInfo.vue'
import BasemapAtInfo from '../components/BasemapAtInfo.vue'
export default {
name: 'Map',
components: {
MglMap, MglPopup, MglNavigationControl, MglGeolocateControl, MglScaleControl, MglAttributionControl, MapFilterControl, MapOptionsControl, MapDownloadControl, LoadingRing, SummitPopup, MapRoute, MapInfoPopup, MapDraw, MapWebcams, SwisstopoInfo
MglMap, MglPopup, MglNavigationControl, MglGeolocateControl, MglScaleControl, MglAttributionControl, MapFilterControl, MapOptionsControl, MapDownloadControl, LoadingRing, SummitPopup, MapRoute, MapInfoPopup, MapDraw, MapWebcams, SwisstopoInfo, BasemapAtInfo
},
mixins: [utils, smptracks, mapstyle, longtouch],
created () {