From 2363e692ec273c795c37d3e2f5f7e69658d77913 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Brunner?= Date: Thu, 2 May 2019 13:51:59 +0200 Subject: [PATCH 1/3] Add examples URL --- Makefile | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index eb578181d8ff..6d249b335623 100644 --- a/Makefile +++ b/Makefile @@ -279,8 +279,12 @@ gh-pages: .build/python-venv.timestamp --app 'Desktop application' apps/desktop.html 'The desktop example application for GeoMapFish.' \ --app 'Alternate mobile application' apps/mobile_alt.html 'An alternate mobile example application for GeoMapFish.' \ --app 'Alternate desktop application' apps/desktop_alt.html 'An alternate desktop example application for GeoMapFish.' \ - --app 'Object editing viewer' apps/oeview.html 'An example application for viewing an object.' \ - --app 'Object editing editor' apps/oeedit.html 'An example application for editing an object.' \ + --app 'Object editing viewer' \ + 'apps/oeview.html?objectediting_geomtype=MultiPolygon&objectediting_id=Test&objectediting_layer=112&objectediting_theme=ObjectEditing&objectediting_property=name&tree_groups=ObjectEditing' \ + 'An example application for viewing an object.' \ + --app 'Object editing editor' \ + 'apps/oeedit.html?objectediting_geomtype=MultiPolygon&objectediting_id=Test&objectediting_layer=112&objectediting_theme=ObjectEditing&objectediting_property=name&tree_groups=ObjectEditing' \ + 'An example application for editing an object.' \ $< $(GMF_EXAMPLES_HTML_FILES) > $@ .build/test-check-example/%.check.timestamp: test/check-example/%.html \ From 9c36bd68eed2dea836583a5a0a48560cebd895a8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Brunner?= Date: Thu, 2 May 2019 14:01:40 +0200 Subject: [PATCH 2/3] Fix the JSTS OpenLayers link --- contribs/gmf/src/objectediting/component.js | 25 +++++++++++++-------- 1 file changed, 16 insertions(+), 9 deletions(-) diff --git a/contribs/gmf/src/objectediting/component.js b/contribs/gmf/src/objectediting/component.js index 9ada9cde48da..7636ea048272 100644 --- a/contribs/gmf/src/objectediting/component.js +++ b/contribs/gmf/src/objectediting/component.js @@ -26,7 +26,14 @@ import * as olBase from 'ol/index.js'; import olCollection from 'ol/Collection.js'; import * as olEvents from 'ol/events.js'; import olFormatGeoJSON from 'ol/format/GeoJSON.js'; -import olGeomMultiPolygon from 'ol/geom/MultiPolygon.js'; +import Point from 'ol/geom/Point.js'; +import LineString from 'ol/geom/LineString.js'; +import LinearRing from 'ol/geom/LinearRing.js'; +import Polygon from 'ol/geom/Polygon.js'; +import MultiPoint from 'ol/geom/MultiPoint.js'; +import MultiLineString from 'ol/geom/MultiLineString.js'; +import MultiPolygon from 'ol/geom/MultiPolygon.js'; +import GeometryCollection from 'ol/geom/GeometryCollection.js'; import olLayerImage from 'ol/layer/Image.js'; import olLayerTile from 'ol/layer/Tile.js'; import olInteractionModify from 'ol/interaction/Modify.js'; @@ -35,12 +42,8 @@ import olStyleFill from 'ol/style/Fill.js'; import olStyleStroke from 'ol/style/Stroke.js'; import olStyleStyle from 'ol/style/Style.js'; -import {OL3Parser} from 'jsts/io'; -const jsts = { - io: { - OL3Parser, - }, -}; +import OL3Parser from 'jsts/io/OL3Parser.js'; +import 'jsts/monkey.js'; /** @@ -313,7 +316,11 @@ exports.Controller = function($scope, $timeout, gettextCatalog, * @type {!jsts.io.OL3Parser} * @private */ - this.jstsOL3Parser_ = new jsts.io.OL3Parser(); + this.jstsOL3Parser_ = new OL3Parser(undefined, { + geom: { + Point, LineString, LinearRing, Polygon, MultiPoint, MultiLineString, MultiPolygon, GeometryCollection + } + }); /** * The state of the feature determines whether the next 'save' request @@ -795,7 +802,7 @@ exports.Controller.prototype.handleModifyInteractionModifyEnd_ = function( ) { let geometry = this.feature.getGeometry(); - if (geometry instanceof olGeomMultiPolygon) { + if (geometry instanceof MultiPolygon) { const jstsGeom = this.jstsOL3Parser_.read(geometry); const jstsBuffered = jstsGeom.buffer(0); geometry = ngeoUtils.toMulti(this.jstsOL3Parser_.write(jstsBuffered)); From 32f7a9217e4d6ce0a9c0c28f91d5b4f7101c7387 Mon Sep 17 00:00:00 2001 From: Michael Kuenzli Date: Thu, 9 May 2019 15:35:26 +0200 Subject: [PATCH 3/3] Don't overwrite possibly pending ngeoMapQuerent state (#4887) --- contribs/gmf/src/query/windowComponent.js | 1 - 1 file changed, 1 deletion(-) diff --git a/contribs/gmf/src/query/windowComponent.js b/contribs/gmf/src/query/windowComponent.js index 127aea998219..9ab0217c3231 100644 --- a/contribs/gmf/src/query/windowComponent.js +++ b/contribs/gmf/src/query/windowComponent.js @@ -551,7 +551,6 @@ function(opt_lastFeature) { exports.Controller_.prototype.close = function() { this.open = false; this.clear(); - this.ngeoMapQuerent_.clear(); };