Reworking map html. Add error message.
lbs-gitea/maptology/master This commit looks good

This commit is contained in:
Sebastian Roehl
2017-12-18 13:57:56 +01:00
parent 7c94feea28
commit 2eee288a13
4 changed files with 25 additions and 8 deletions
@@ -50,8 +50,6 @@ export class MapComponent implements OnInit {
this.map = new L.Map('map');
this.map.setView(this.defaultLocation, this.defaultZoom);
// this.setMapMarker(this.defaultLocation);
// this.map.on('click', (e) => this.setMapMarker(e.latlng));
this.tileLayer = new L.TileLayer('https://cloud.locoslab.com/carta/restful-services/tile/{z}/{x}/{y}.png', {
attribution: 'Maptology',
@@ -60,6 +58,10 @@ export class MapComponent implements OnInit {
L.easyButton('fa-globe', this.onSidebarToggle).addTo(this.map);
// Initialize marker
// this.marker.bindTooltip('Tooltip', {sticky: true});
this.setMapMarker(this.defaultLocation);
// If there is a given shareId in the URL, fetch the location from the API and
// start to update every x seconds
if (this.currentShare) {