Mercurial > gemma
view 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 |
line wrap: on
line source
/*eslint no-unused-vars: ["error", { "args": "none" }]*/ import ol_Map from "ol/map"; import ol_layer_Tile from "ol/layer/tile"; import ol_source_OSM from "ol/source/osm"; import ol_View from "ol/view"; export default { render(h) { return <div id="map" />; }, data() { return { lat: 52.278889, long: 8.043056, zoom: 12, projection: "EPSG:4326" }; }, mounted() { console.log(this.centerX); new ol_Map({ layers: [ new ol_layer_Tile({ source: new ol_source_OSM() }) ], target: "map", view: new ol_View({ center: [this.long, this.lat], zoom: this.zoom, projection: this.projection }) }); } };