|
|
|
@ -1,6 +1,8 @@
@@ -1,6 +1,8 @@
|
|
|
|
|
"use strict"; |
|
|
|
|
|
|
|
|
|
import Leaflet from 'leaflet'; |
|
|
|
|
// Import leaflet, but some plugins require it to have the variable name 'L' :-/
|
|
|
|
|
import L from 'leaflet'; |
|
|
|
|
import 'leaflet-fullscreen'; |
|
|
|
|
|
|
|
|
|
import Config from './Config.mjs'; |
|
|
|
|
|
|
|
|
@ -10,10 +12,12 @@ class Map {
@@ -10,10 +12,12 @@ class Map {
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
setup() { |
|
|
|
|
this.map = Leaflet.map("map"); |
|
|
|
|
this.map = L.map("map", { |
|
|
|
|
fullscreenControl: true |
|
|
|
|
}); |
|
|
|
|
this.map.setView(Config.default_location, Config.default_zoom); |
|
|
|
|
|
|
|
|
|
this.layer_openstreet = Leaflet.tileLayer("http://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png", { |
|
|
|
|
this.layer_openstreet = L.tileLayer("http://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png", { |
|
|
|
|
id: "openstreetmap", |
|
|
|
|
maxZoom: 19, |
|
|
|
|
attribution: "© <a href='https://www.openstreetmap.org/copyright'>OpenStreetMap contributors</a>" |
|
|
|
|