Skip to content

Commit

Permalink
Format syntax
Browse files Browse the repository at this point in the history
  • Loading branch information
Domantas Petrauskas committed Mar 31, 2023
1 parent 56cdcd1 commit ad5dbda
Showing 1 changed file with 12 additions and 7 deletions.
19 changes: 12 additions & 7 deletions ARManual/.vuepress/components/QTH.vue
Original file line number Diff line number Diff line change
Expand Up @@ -56,12 +56,12 @@ export default {
this.map.on('load', () => {
this.map.addSource('mapbox-dem', {
'type': 'raster-dem',
'url': 'mapbox://mapbox.terrain-rgb',
'tileSize': 512,
'maxzoom': 14
type: 'raster-dem',
url: 'mapbox://mapbox.terrain-rgb',
tileSize: 512,
maxzoom: 14,
});
this.map.setTerrain({ 'source': 'mapbox-dem', 'exaggeration': 1.5 });
this.map.setTerrain({ source: 'mapbox-dem', exaggeration: 1.5 });
this.drawMaidenheadField();
this.drawMaidenheadSquare();
Expand All @@ -70,15 +70,20 @@ export default {
this.map.on('click', (event) => {
const latitude = parseFloat(event.lngLat.lat.toFixed(3));
const longitude = parseFloat(event.lngLat.lng.toFixed(3));
const elevation = this.map.queryTerrainElevation(event.lngLat, { exaggerated: false }).toFixed(1);
const elevation = this.map
.queryTerrainElevation(event.lngLat, { exaggerated: false })
.toFixed(1);
const googleMapsNavigationUrl = `https://www.google.com/maps/dir/?api=1&destination=${latitude},${longitude}`;
const popupHTML = `<div class="map-info">
<div class="map-info-row" v-if="map.lyff">
<div class="map-info-header">Koordinatės</div>
<div class="map-info-data"><a href="${googleMapsNavigationUrl}">${latitude}, ${longitude}</a></div>
<div class="map-info-header">QTH</div>
<div class="map-info-data">${this.calculateMaidenhead(latitude, longitude)}</div>
<div class="map-info-data">${this.calculateMaidenhead(
latitude,
longitude
)}</div>
<div class="map-info-header">Aukštis virš jūros lygio</div>
<div class="map-info-data">${elevation} m</div>
</div>
Expand Down

0 comments on commit ad5dbda

Please sign in to comment.