Commit 7acb026e authored by Andres Käver's avatar Andres Käver
Browse files

ui

parent 202da9a5
Pipeline #792 passed with stages
in 1 minute and 13 seconds
<template>
<div id="map"></div>
<div class="form-group">
<label for="sessionSelect">Sessions</label>
<select value.bind="selectedGpsSession" class="form-control" id="sessionSelect">
......@@ -10,4 +9,5 @@
</select>
</div>
<div id="map"></div>
</template>
......@@ -27,11 +27,12 @@ export class HomeIndex {
selectedGpsSession: IGpsSession | null = null;
gpsLocations: IGpsLocation[] = [];
viewportHeight = Math.max(document.documentElement.clientHeight, window.innerHeight || 0);
viewportWidth = Math.max(document.documentElement.clientWidth, window.innerWidth || 0);
constructor(private gpsSessionService: GpsSessionService, private gpsLocationService: GpsLocationService) {
}
......@@ -46,6 +47,12 @@ export class HomeIndex {
attached(): void {
log.debug("attached");
const elem = document.querySelector('#map');
if (elem){
elem.setAttribute('style','height: ' + (this.viewportHeight * .8).toString() + 'px;');
}
this.map = L.map('map').setView([59.3953607, 24.6643414], 15);
L.tileLayer(
......@@ -63,6 +70,7 @@ export class HomeIndex {
}
}
);
}
detached(): void {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment