Mercurial > gemma
view client/src/components/Map.jsx @ 158:992e17912405
feat: Improve login against real db
In order to log into our real db, we need to consume
the new JSON document consuming experies, username, roles, etc.
Token is stored securly in browser session.
Other data is stored in vue store.
author | Thomas Junk <thomas.junk@intevation.de> |
---|---|
date | Tue, 03 Jul 2018 16:18:29 +0200 |
parents | dc2a5920b731 |
children | 78f96f168b59 |
line wrap: on
line source
/*eslint no-unused-vars: ["error", { "args": "none" }]*/ import "ol/ol.css"; import { Map, View } from "ol"; import TileLayer from "ol/layer/Tile"; import OSM from "ol/source/OSM"; export default { render(h) { return <div id="map" />; }, data() { return { lat: 52.278889, long: 8.043056, zoom: 12, projection: "EPSG:4326" }; }, mounted() { new Map({ layers: [ new TileLayer({ source: new OSM() }) ], target: "map", view: new View({ center: [this.long, this.lat], zoom: this.zoom, projection: this.projection }) }); } };