Mercurial > gemma
view client/src/components/Map.jsx @ 485:7a8644e9e50e
client: add (unwired) password reset form
* Add password reset form to the Login view. Pressing the forgotton
link will blend it in and currently the send button will hide it again.
This is a good first place because an additional view and route would be
more work with the same functionality. It doe not yet trigger action
with the backend.
* Put password forgotten part and bottom logo in divs beside the first form
which matches the semantics better.
author | Bernhard Reiter <bernhard@intevation.de> |
---|---|
date | Fri, 24 Aug 2018 12:14:56 +0200 |
parents | 27502291e564 |
children |
line wrap: on
line source
/** * Map comonent and integration point with open layers * Currently JSX was chosen to have more programmatic control * over resulting HTML * * May change in the future * */ /*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"; import TileWMS from "ol/source/TileWMS.js"; export default { render(h) { return <div id="map" />; }, data() { return { lat: 6155376, long: 1819178, zoom: 11, projection: "EPSG:3857" }; }, mounted() { new Map({ layers: [ new TileLayer({ source: new OSM() }), new TileLayer({ source: new TileWMS({ url: "https://demo.d4d-portal.info/wms", params: { LAYERS: "d4d", VERSION: "1.1.1", TILED: true } }) }) ], target: "map", view: new View({ center: [this.long, this.lat], zoom: this.zoom, projection: this.projection }) }); } };