Mercurial > gemma
comparison client/src/components/Map.jsx @ 117:5e95c62a7e74
Move component. Re-add Css.
Move components to separate folders.
Re-adding login css to appropriate component
(=undoing ae6535d44563) according to vue style.
author | Thomas Junk <thomas.junk@intevation.de> |
---|---|
date | Tue, 26 Jun 2018 17:26:34 +0200 |
parents | |
children | 92e0c636e67c |
comparison
equal
deleted
inserted
replaced
116:dad6cf39691e | 117:5e95c62a7e74 |
---|---|
1 /*eslint no-unused-vars: ["error", { "args": "none" }]*/ | |
2 import ol_Map from "ol/map"; | |
3 import ol_layer_Tile from "ol/layer/tile"; | |
4 import ol_source_OSM from "ol/source/osm"; | |
5 import ol_View from "ol/view"; | |
6 | |
7 export default { | |
8 render(h) { | |
9 return <div id="map" />; | |
10 }, | |
11 data() { | |
12 return { | |
13 lat: 52.278889, | |
14 long: 8.043056, | |
15 zoom: 12, | |
16 projection: "EPSG:4326" | |
17 }; | |
18 }, | |
19 mounted() { | |
20 console.log(this.centerX); | |
21 new ol_Map({ | |
22 layers: [ | |
23 new ol_layer_Tile({ | |
24 source: new ol_source_OSM() | |
25 }) | |
26 ], | |
27 target: "map", | |
28 view: new ol_View({ | |
29 center: [this.long, this.lat], | |
30 zoom: this.zoom, | |
31 projection: this.projection | |
32 }) | |
33 }); | |
34 } | |
35 }; |