Call API to track number of map sessions (to evaluate move to MapTiler Cloud)

master
Manuel Kasper 2024-02-21 11:40:00 +01:00
rodzic dbd2b2c537
commit 36103f2d3b
2 zmienionych plików z 5 dodań i 0 usunięć

Wyświetl plik

@ -17,6 +17,7 @@
</template> </template>
<script> <script>
import axios from 'axios'
import { MglMap, MglGeolocateControl, MglNavigationControl, MglScaleControl, MglAttributionControl } from 'vue-mapbox' import { MglMap, MglGeolocateControl, MglNavigationControl, MglScaleControl, MglAttributionControl } from 'vue-mapbox'
import MapRoute from './MapRoute.vue' import MapRoute from './MapRoute.vue'
import MapPhoto from './MapPhoto.vue' import MapPhoto from './MapPhoto.vue'
@ -171,6 +172,8 @@ export default {
this.map.dragPan.disable() this.map.dragPan.disable()
} }
this.highlightCurrentSummit() this.highlightCurrentSummit()
axios.post(process.env.VUE_APP_API_URL + '/mapsession')
}, },
onMapClicked (event) { onMapClicked (event) {
if (event.mapboxEvent.originalEvent.hitMarker) { if (event.mapboxEvent.originalEvent.hitMarker) {

Wyświetl plik

@ -247,6 +247,8 @@ export default {
} }
}) })
this.updateRoute() this.updateRoute()
axios.post(process.env.VUE_APP_API_URL + '/mapsession')
}, },
onMapClicked (event) { onMapClicked (event) {
if (this.$refs.draw.isDrawing() || event.mapboxEvent.originalEvent.hitMarker) { if (this.$refs.draw.isDrawing() || event.mapboxEvent.originalEvent.hitMarker) {