parent
c45db0ddee
commit
b2a3b35dd9
@ -1 +1,6 @@ |
||||
@import "../../node_modules/leaflet/dist/leaflet.css"; |
||||
|
||||
main { |
||||
position: absolute; |
||||
top: 0; bottom: 0; left: 0; right: 0; |
||||
} |
||||
|
@ -0,0 +1,6 @@ |
||||
"use strict"; |
||||
|
||||
export default { |
||||
default_location: [ 53.7391, -0.3344 ], |
||||
default_zoom: 13 |
||||
} |
@ -0,0 +1,24 @@ |
||||
"use strict"; |
||||
|
||||
import Leaflet from 'leaflet'; |
||||
|
||||
import Config from './Config.mjs'; |
||||
|
||||
class Map { |
||||
constructor() { |
||||
|
||||
} |
||||
|
||||
setup() { |
||||
this.map = Leaflet.map("map"); |
||||
this.map.setView(Config.default_location, Config.default_zoom); |
||||
|
||||
this.layer_openstreet = Leaflet.tileLayer("http://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png", { |
||||
id: "openstreetmap", |
||||
maxZoom: 19, |
||||
attribution: "© OSM Mapnik <a href='http://www.openstreetmap.org/copyright'>OpenStreetMap</a>" |
||||
}).addTo(this.map); |
||||
} |
||||
} |
||||
|
||||
export default Map; |
Loading…
Reference in new issue