Porównaj commity

...

9 Commity

15 zmienionych plików z 164 dodań i 23 usunięć

14
package-lock.json wygenerowano
Wyświetl plik

@ -18,7 +18,7 @@
"@fortawesome/vue-fontawesome": "^0.1.10",
"@mapbox/mapbox-gl-draw": "github:manuelkasper/mapbox-gl-draw#sotlas",
"@tmcw/togeojson": "^3.2.0",
"axios": "^1.4.0",
"axios": "^1.6.3",
"buefy": "^0.8.20",
"cheap-ruler": "^2.5.1",
"core-js": "^2.6.12",
@ -3479,9 +3479,9 @@
"dev": true
},
"node_modules/axios": {
"version": "1.6.2",
"resolved": "https://registry.npmjs.org/axios/-/axios-1.6.2.tgz",
"integrity": "sha512-7i24Ri4pmDRfJTR7LDBhsOTtcm+9kjX5WiY1X3wIisx6G9So3pfMkEiU7emUBe46oceVImccTEM3k6C5dbVW8A==",
"version": "1.6.3",
"resolved": "https://registry.npmjs.org/axios/-/axios-1.6.3.tgz",
"integrity": "sha512-fWyNdeawGam70jXSVlKl+SUNVcL6j6W79CuSIPfi6HnDUmSCH6gyUys/HrqHeA/wU0Az41rRgean494d0Jb+ww==",
"dependencies": {
"follow-redirects": "^1.15.0",
"form-data": "^4.0.0",
@ -21572,9 +21572,9 @@
"dev": true
},
"axios": {
"version": "1.6.2",
"resolved": "https://registry.npmjs.org/axios/-/axios-1.6.2.tgz",
"integrity": "sha512-7i24Ri4pmDRfJTR7LDBhsOTtcm+9kjX5WiY1X3wIisx6G9So3pfMkEiU7emUBe46oceVImccTEM3k6C5dbVW8A==",
"version": "1.6.3",
"resolved": "https://registry.npmjs.org/axios/-/axios-1.6.3.tgz",
"integrity": "sha512-fWyNdeawGam70jXSVlKl+SUNVcL6j6W79CuSIPfi6HnDUmSCH6gyUys/HrqHeA/wU0Az41rRgean494d0Jb+ww==",
"requires": {
"follow-redirects": "^1.15.0",
"form-data": "^4.0.0",

Wyświetl plik

@ -20,7 +20,7 @@
"@fortawesome/vue-fontawesome": "^0.1.10",
"@mapbox/mapbox-gl-draw": "github:manuelkasper/mapbox-gl-draw#sotlas",
"@tmcw/togeojson": "^3.2.0",
"axios": "^1.4.0",
"axios": "^1.6.3",
"buefy": "^0.8.20",
"cheap-ruler": "^2.5.1",
"core-js": "^2.6.12",

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

@ -32,6 +32,10 @@
"type": "vector",
"url": "https://1.{mapServer}.map.sotl.as/data/regions.json"
},
"az": {
"type": "vector",
"url": "https://1.{mapServer}.map.sotl.as/data/az.json"
},
"openmaptiles": {
"type": "vector",
"url": "https://0.{mapServer}.map.sotl.as/data/osm-sotlas.json"
@ -324,6 +328,39 @@
"layout": {"visibility": "visible"},
"paint": {"fill-color": "rgba(103, 166, 196, 1)"}
},
{
"id": "summits_az",
"type": "fill",
"metadata": {
"sotlas-map-option": "az"
},
"source": "az",
"source-layer": "az",
"layout": {"visibility": "none"},
"minzoom": 12,
"paint": {
"fill-antialias": false,
"fill-color": "rgba(50, 255, 0, 0.4)",
"fill-opacity": {"stops": [[12, 0], [12.5, 0.5]]}
}
},
{
"id": "summits_az_border",
"type": "line",
"metadata": {
"sotlas-map-option": "az"
},
"source": "az",
"source-layer": "az",
"layout": {"visibility": "none"},
"minzoom": 12,
"paint": {
"line-color": "rgba(50, 150, 0, 1)",
"line-opacity": {"stops": [[12, 0], [12.5, 0.5]]},
"line-width": {"stops": [[12, 1], [16, 2]]},
"line-dasharray": [1,1]
}
},
{
"id": "aeroway_fill",
"type": "fill",

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 === 'openmaptiles' || 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">Activation zone boundaries are currently available for the following associations:</p><ul><li style="margin-bottom: 0.5em"><strong>HB/HB0</strong><br />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).</li><li style="margin-bottom: 0.5em"><strong>OE</strong><br />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).</li></ul><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',
@ -205,7 +205,7 @@ export default {
event.preventDefault()
this.$buefy.dialog.alert({
title: 'Hiking difficulty',
message: '<p>The hiking difficulty grading uses the <a href="https://www.sac-cas.ch/fileadmin/Ausbildung_und_Wissen/Sicher_unterwegs/Sicher_unterwegs_Wandern/2020_Berg_Alpinwanderskala_EN.pdf" target="_blank">SAC scale</a>. Colors shown are as follows:</p><ul><li><span style="color: #cccc00">Yellow</span>: T1</li><li><span style="color: #cc0000">Red</span>: T2…T3</li><li><span style="color: #3333cc">Blue</span>: T4…T6</li></ul>',
message: '<p style="margin-bottom: 0.5em">The hiking difficulty grading uses the <a href="https://www.sac-cas.ch/fileadmin/Ausbildung_und_Wissen/Sicher_unterwegs/Sicher_unterwegs_Wandern/2020_Berg_Alpinwanderskala_EN.pdf" target="_blank">SAC scale</a>. Colors shown are as follows:</p><ul><li><span style="color: #cccc00">Yellow</span>: T1</li><li><span style="color: #cc0000">Red</span>: T2…T3</li><li><span style="color: #3333cc">Blue</span>: T4…T6</li></ul>',
type: 'is-info',
hasIcon: true,
icon: 'info-circle',

Wyświetl plik

@ -25,7 +25,7 @@
<script>
import axios from 'axios'
import togeojson from '@tmcw/togeojson'
import { gpx } from '@tmcw/togeojson'
import { MglGeojsonLayer, MglMarker } from 'vue-mapbox'
import haversineDistance from 'haversine-distance'
import tracks from '../mixins/tracks.js'
@ -180,7 +180,7 @@ export default {
let dom = (new DOMParser()).parseFromString(response.data, 'text/xml')
this.geoJsonSource = {
type: 'geojson',
data: togeojson.gpx(dom)
data: gpx(dom)
}
})
},

Wyświetl plik

@ -26,6 +26,7 @@ import MapWebcams from './MapWebcams.vue'
import mapstyle from '../mixins/mapstyle.js'
import utils from '../mixins/utils.js'
import longtouch from '../mixins/longtouch.js'
import reportMapSession from '../mapsession.js'
export default {
name: 'MiniMap',
@ -171,6 +172,8 @@ export default {
this.map.dragPan.disable()
}
this.highlightCurrentSummit()
reportMapSession()
},
onMapClicked (event) {
if (event.mapboxEvent.originalEvent.hitMarker) {

Wyświetl plik

@ -33,7 +33,7 @@
</div>
</div>
<article class="routeDescr" v-html="linkifyCoordinates(props.row.htmlDescription ? props.row.htmlDescription : props.row.description)" />
<div class="author">by {{ props.row.author }}</div>
<div class="author">Posted on {{ props.row.postedDate | formatActivationDate }} by {{ props.row.author }}</div>
<div class="track-download" v-if="props.row.track">
<TrackLink :route="props.row" :summit="summit"><font-awesome-icon :icon="['far', 'file-download']" class="fa-icon" /> Download track (.gpx)</TrackLink>
</div>

13
src/mapsession.js 100644
Wyświetl plik

@ -0,0 +1,13 @@
import axios from 'axios'
let mapSessionReported = false
function reportMapSession () {
if (mapSessionReported) {
return
}
axios.post(process.env.VUE_APP_API_URL + '/mapsession', { type: 'first' })
mapSessionReported = true
}
export default reportMapSession

Wyświetl plik

@ -51,6 +51,7 @@ export default {
htmlDescription: '<p>' + this.escapeHtml(track.track_notes).replace(/\n/g, '<br />') + '</p><p><small>Track imported from <a href="https://www.sotamaps.org" target="_blank">SMP</a></small></p>',
description: track.track_notes,
author: track.callsign,
postedDate: track.posted_date,
distance,
ascent,
ascentExcludesCounterAscents: (ascent > 0),

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>
@ -44,6 +45,7 @@ import utils from '../mixins/utils.js'
import smptracks from '../mixins/smptracks.js'
import mapstyle from '../mixins/mapstyle.js'
import longtouch from '../mixins/longtouch.js'
import reportMapSession from '../mapsession.js'
import { MglMap, MglPopup, MglNavigationControl, MglGeolocateControl, MglScaleControl, MglAttributionControl } from 'vue-mapbox'
import MapFilterControl from '../components/MapFilterControl.vue'
@ -56,11 +58,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 () {
@ -245,6 +248,8 @@ export default {
}
})
this.updateRoute()
reportMapSession()
},
onMapClicked (event) {
if (this.$refs.draw.isDrawing() || event.mapboxEvent.originalEvent.hitMarker) {

Wyświetl plik

@ -6,7 +6,7 @@
<section class="section">
<div class="container">
<b-message title="Not Found" type="is-danger">
The page, summit, association or region that you requested cannot be found.
The callsign, summit, association, region or page that you requested cannot be found.
</b-message>
</div>
</section>