annotate client/src/components/Map.jsx @ 284:96860b2bbc0d usermanagement

fix: User management only for sysadmin Changed role to query.
author Thomas Junk <thomas.junk@intevation.de>
date Mon, 30 Jul 2018 17:43:59 +0200
parents 89f1aa33adcf
children 27502291e564
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
117
5e95c62a7e74 Move component. Re-add Css.
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
1 /*eslint no-unused-vars: ["error", { "args": "none" }]*/
123
92e0c636e67c Upgraded to current Version of OpenLayers
Thomas Junk <thomas.junk@intevation.de>
parents: 117
diff changeset
2 import "ol/ol.css";
92e0c636e67c Upgraded to current Version of OpenLayers
Thomas Junk <thomas.junk@intevation.de>
parents: 117
diff changeset
3 import { Map, View } from "ol";
92e0c636e67c Upgraded to current Version of OpenLayers
Thomas Junk <thomas.junk@intevation.de>
parents: 117
diff changeset
4 import TileLayer from "ol/layer/Tile";
92e0c636e67c Upgraded to current Version of OpenLayers
Thomas Junk <thomas.junk@intevation.de>
parents: 117
diff changeset
5 import OSM from "ol/source/OSM";
275
89f1aa33adcf style: corrected coding style
Thomas Junk <thomas.junk@intevation.de>
parents: 264
diff changeset
6 import TileWMS from "ol/source/TileWMS.js";
117
5e95c62a7e74 Move component. Re-add Css.
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
7
5e95c62a7e74 Move component. Re-add Css.
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
8 export default {
5e95c62a7e74 Move component. Re-add Css.
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
9 render(h) {
5e95c62a7e74 Move component. Re-add Css.
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
10 return <div id="map" />;
5e95c62a7e74 Move component. Re-add Css.
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
11 },
5e95c62a7e74 Move component. Re-add Css.
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
12 data() {
5e95c62a7e74 Move component. Re-add Css.
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
13 return {
264
78f96f168b59 Online Map: Fix projection and add TileWMS sample
Frank Koormann <frank@intevation.de>
parents: 153
diff changeset
14 lat: 6155376,
78f96f168b59 Online Map: Fix projection and add TileWMS sample
Frank Koormann <frank@intevation.de>
parents: 153
diff changeset
15 long: 1819178,
78f96f168b59 Online Map: Fix projection and add TileWMS sample
Frank Koormann <frank@intevation.de>
parents: 153
diff changeset
16 zoom: 11,
78f96f168b59 Online Map: Fix projection and add TileWMS sample
Frank Koormann <frank@intevation.de>
parents: 153
diff changeset
17 projection: "EPSG:3857"
117
5e95c62a7e74 Move component. Re-add Css.
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
18 };
5e95c62a7e74 Move component. Re-add Css.
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
19 },
5e95c62a7e74 Move component. Re-add Css.
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
20 mounted() {
123
92e0c636e67c Upgraded to current Version of OpenLayers
Thomas Junk <thomas.junk@intevation.de>
parents: 117
diff changeset
21 new Map({
117
5e95c62a7e74 Move component. Re-add Css.
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
22 layers: [
123
92e0c636e67c Upgraded to current Version of OpenLayers
Thomas Junk <thomas.junk@intevation.de>
parents: 117
diff changeset
23 new TileLayer({
92e0c636e67c Upgraded to current Version of OpenLayers
Thomas Junk <thomas.junk@intevation.de>
parents: 117
diff changeset
24 source: new OSM()
275
89f1aa33adcf style: corrected coding style
Thomas Junk <thomas.junk@intevation.de>
parents: 264
diff changeset
25 }),
264
78f96f168b59 Online Map: Fix projection and add TileWMS sample
Frank Koormann <frank@intevation.de>
parents: 153
diff changeset
26 new TileLayer({
78f96f168b59 Online Map: Fix projection and add TileWMS sample
Frank Koormann <frank@intevation.de>
parents: 153
diff changeset
27 source: new TileWMS({
275
89f1aa33adcf style: corrected coding style
Thomas Junk <thomas.junk@intevation.de>
parents: 264
diff changeset
28 url: "https://demo.d4d-portal.info/wms",
89f1aa33adcf style: corrected coding style
Thomas Junk <thomas.junk@intevation.de>
parents: 264
diff changeset
29 params: { LAYERS: "d4d", VERSION: "1.1.1", TILED: true }
264
78f96f168b59 Online Map: Fix projection and add TileWMS sample
Frank Koormann <frank@intevation.de>
parents: 153
diff changeset
30 })
117
5e95c62a7e74 Move component. Re-add Css.
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
31 })
5e95c62a7e74 Move component. Re-add Css.
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
32 ],
5e95c62a7e74 Move component. Re-add Css.
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
33 target: "map",
123
92e0c636e67c Upgraded to current Version of OpenLayers
Thomas Junk <thomas.junk@intevation.de>
parents: 117
diff changeset
34 view: new View({
117
5e95c62a7e74 Move component. Re-add Css.
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
35 center: [this.long, this.lat],
5e95c62a7e74 Move component. Re-add Css.
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
36 zoom: this.zoom,
5e95c62a7e74 Move component. Re-add Css.
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
37 projection: this.projection
5e95c62a7e74 Move component. Re-add Css.
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
38 })
5e95c62a7e74 Move component. Re-add Css.
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
39 });
5e95c62a7e74 Move component. Re-add Css.
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
40 }
5e95c62a7e74 Move component. Re-add Css.
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
41 };