Merge branch 'master' of ssh://lab.theresno.cloud:1251/hackathon-fr-20/plana
commit
ba4dde0bea
@ -1,12 +1,28 @@
|
||||
import { Component } from '@angular/core';
|
||||
import { Platform } from "@ionic/angular";
|
||||
import { Map, tileLayer, marker, icon } from "leaflet";
|
||||
|
||||
import { Component } from "@angular/core";
|
||||
|
||||
@Component({
|
||||
selector: 'app-tab2',
|
||||
templateUrl: 'tab2.page.html',
|
||||
styleUrls: ['tab2.page.scss']
|
||||
selector: "app-tab2",
|
||||
templateUrl: "tab2.page.html",
|
||||
styleUrls: ["tab2.page.scss"],
|
||||
})
|
||||
export class Tab2Page {
|
||||
constructor(public plt: Platform) {}
|
||||
|
||||
ngAfterViewInit() {
|
||||
this.plt.ready().then(() => {
|
||||
this.initMap();
|
||||
});
|
||||
}
|
||||
|
||||
constructor() {}
|
||||
initMap() {
|
||||
const map = new Map("map").setView([47.986756, 7.842344], 23);
|
||||
|
||||
tileLayer("https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png", {
|
||||
attribution:
|
||||
'© <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors',
|
||||
}).addTo(map);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue