changeset 267:7f030ec3472d

Merged
author Sascha Wilde <wilde@intevation.de>
date Mon, 30 Jul 2018 11:08:17 +0200
parents a2f7049daf7f (diff) 13ad969a9138 (current diff)
children 72062ca52746 d1b0d964af09 4d37c8646123
files
diffstat 2 files changed, 58 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/README.md	Fri Jul 27 19:03:56 2018 +0200
+++ b/README.md	Mon Jul 30 11:08:17 2018 +0200
@@ -1,3 +1,50 @@
+# Quick Start
+
+## Build
+
+- To build all components of gemma, simply type `make` on the top
+  level directory of the repro.
+
+- To only (re)build the back end you can use `make gemma`.
+
+- To only build the SPA-Client you can use `make client`.
+
+
+## Setup Database
+
+- You will need a PostgreSQL cluster with PostGIS.
+
+- To install the **gemma** schema and roles use the script
+  `./schema/install-db.sh`.
+
+- `./schema/install-db.sh --help` shows you available options.
+  Per default the script will create a database named "gemma" and all
+  necessary roles in the postgres default cluster (listening on port
+  5432).
+
+- The script mus be run as a user with PostgreSQL super user rights.
+  By convention this is the "postgres" on most systems.
+
+- Standard case: as user "postgres", in the top level directory of the
+  repo run:
+
+## Running gemma
+
+- In the top level directory of the repo run:
+  `./cmd/gemma/gemma -s session.data -w ./web`
+
+- To listen on a specific port and interface:
+  ```
+  ./cmd/gemma/gemma -s session.data -w ./web \
+                    --host 192.168.46.72 -p 8088
+  ```
+
+- `./cmd/gemma/gemma -h` gives you an overview of more available
+  options.
+
+
+# Manual setup
+
 ## Backend
 
 In Go.
--- a/client/src/components/Map.jsx	Fri Jul 27 19:03:56 2018 +0200
+++ b/client/src/components/Map.jsx	Mon Jul 30 11:08:17 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",