Mercurial > gemma
changeset 264:78f96f168b59
Online Map: Fix projection and add TileWMS sample
author | Frank Koormann <frank@intevation.de> |
---|---|
date | Fri, 27 Jul 2018 16:29:39 +0200 |
parents | 63e17e017f09 |
children | d2fb83291c68 |
files | client/src/components/Map.jsx |
diffstat | 1 files changed, 11 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/client/src/components/Map.jsx Fri Jul 27 11:06:02 2018 +0200 +++ b/client/src/components/Map.jsx Fri Jul 27 16:29:39 2018 +0200 @@ -3,6 +3,7 @@ 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) { @@ -10,10 +11,10 @@ }, data() { return { - lat: 52.278889, - long: 8.043056, - zoom: 12, - projection: "EPSG:4326" + lat: 6155376, + long: 1819178, + zoom: 11, + projection: "EPSG:3857" }; }, mounted() { @@ -21,6 +22,12 @@ 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",