Mercurial > gemma
changeset 693:a1c62adc9bcb
merge
author | Thomas Junk <thomas.junk@intevation.de> |
---|---|
date | Thu, 20 Sep 2018 15:13:04 +0200 |
parents | 87ea9d267c2b (current diff) d643ff60f607 (diff) |
children | 37c08d8487c3 1db1ae344087 |
files | |
diffstat | 3 files changed, 32 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/client/src/map/Maplayer.vue Thu Sep 20 15:12:49 2018 +0200 +++ b/client/src/map/Maplayer.vue Thu Sep 20 15:13:04 2018 +0200 @@ -205,7 +205,7 @@ srsName: "EPSG:3857", featureNS: "gemma", featurePrefix: "gemma", - featureTypes: ["distance_marks"], + featureTypes: ["distance_marks_geoserver"], outputFormat: "application/json" });
--- a/client/src/map/store.js Thu Sep 20 15:12:49 2018 +0200 +++ b/client/src/map/store.js Thu Sep 20 15:13:04 2018 +0200 @@ -3,7 +3,7 @@ import TileWMS from "ol/source/TileWMS.js"; import { Tile as TileLayer, Vector as VectorLayer } from "ol/layer.js"; import OSM from "ol/source/OSM"; -import { Stroke, Style, Fill, Text } from "ol/style.js"; +import { Stroke, Style, Fill, Text, Circle as CircleStyle } from "ol/style.js"; import VectorSource from "ol/source/Vector.js"; const MapStore = { @@ -92,7 +92,25 @@ { name: "Distance marks, Axis", data: new VectorLayer({ - source: new VectorSource() + source: new VectorSource(), + style: function(feature) { + return [ + new Style({ + image: new CircleStyle({ + radius: 5, + fill: new Fill({color: 'rgba(255, 0, 0, 0.1)'}), + stroke: new Stroke({color: 'blue', width: 1}) + }), + text: new Text({ + font: '10px "Open Sans", "sans-serif"', + fill: new Fill({ + color: "black" + }), + text: (feature.get("hectometre")/10).toString() + }) + }) + ]; + } }), isVisible: true }
--- a/schema/gemma.sql Thu Sep 20 15:12:49 2018 +0200 +++ b/schema/gemma.sql Thu Sep 20 15:13:04 2018 +0200 @@ -280,6 +280,17 @@ position_code char(2) NOT NULL REFERENCES position_codes ) + -- A table to help geoserver serve the distance marks as WFS 1.1.0. + -- At least geoserver-2.13.2 does not serve type geography correctly + -- and does not serve the location_code as isrs type + CREATE VIEW waterway.distance_marks_geoserver AS + SELECT location_code::VARCHAR, + geom::Geometry(POINT, 4326), + distance_mark_function, + position_code, + (location_code).hectometre + FROM waterway.distance_marks; + CREATE TABLE sections_stretches ( id varchar PRIMARY KEY, is_section boolean NOT NULL, -- maps 'function' from interface