From f5cf01d26b124548b8b4653b5af2148870de5744 Mon Sep 17 00:00:00 2001 From: pegahmoh Date: Tue, 5 Dec 2023 09:06:17 +0100 Subject: [PATCH 1/3] preparing release 1.3.2 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index c7f9f4a..a0d8923 100644 --- a/package.json +++ b/package.json @@ -7,7 +7,7 @@ "Widget", "Openlayers" ], - "version": "1.3.1", + "version": "1.3.2", "repository": { "type": "git", "url": "https://github.com/OnroerendErfgoed/zoneerder" From 610ed1d34d5fbf2ee900533649f03de2060bd5b3 Mon Sep 17 00:00:00 2001 From: Pegah Mohtadi <32901939+pegahmoh@users.noreply.github.com> Date: Tue, 5 Dec 2023 16:51:01 +0100 Subject: [PATCH 2/3] update crabpy_dojo (#186) * update craboy_dojo * Feature/184 update crabpy dojo again (#188) * use new crabpy zoom * update zone icon --------- Co-authored-by: Cedrik Vanderhaegen --- MapController.js | 12 ++++++++++++ ZoneMap.js | 18 ++++++++++-------- bower.json | 2 +- 3 files changed, 23 insertions(+), 9 deletions(-) diff --git a/MapController.js b/MapController.js index 9ed99fc..4a3ec97 100644 --- a/MapController.js +++ b/MapController.js @@ -110,6 +110,18 @@ define([ return this.geoJsonFormatter.writeGeometry(geom); }, + transformBoundingboxToMapExtent: function(boundingbox) { + var lowerleft = this.transformLatLonToPoint(boundingbox.lowerleft.lat, boundingbox.lowerleft.lon); + var upperright = this.transformLatLonToPoint(boundingbox.upperright.lat, boundingbox.upperright.lon); + return ([lowerleft.getCoordinates()[0], lowerleft.getCoordinates()[1], + upperright.getCoordinates()[0], upperright.getCoordinates()[1]]); + }, + + transformLatLonToPoint: function(lat, lon) { + var point = new ol.geom.Point([ lon, lat ]); + return (point.transform('EPSG:4326', 'EPSG:31370')); + }, + _createLayers: function(map) { /* base layers */ var baseLayers = []; diff --git a/ZoneMap.js b/ZoneMap.js index 13af6c6..20da7ed 100644 --- a/ZoneMap.js +++ b/ZoneMap.js @@ -269,6 +269,7 @@ define([ var crabNode = domConstruct.create("div"); ZoomTab.addContent(crabNode); var crabZoomer = crabpyWidget.createCrabZoomer(crabNode); + crabZoomer.startup(); var self = this; var zoomButton = domConstruct.create("a", { @@ -276,18 +277,19 @@ define([ title: "Zoom naar adres", 'class': "button tiny expand", innerHTML: "Zoom naar adres", - onclick: function (evt) { + onclick: lang.hitch(this, function (evt) { evt.preventDefault(); - var bbox = crabZoomer.getBbox(); - if (bbox) { - self.mapController.zoomToExtent(bbox); - if (self.mapController.olMap.getView().getZoom() > 15) { - self.mapController.olMap.getView().setZoom(15); + var bboxobject = crabZoomer.getBbox(); + if (bboxobject) { + var bbox = this.mapController.transformBoundingboxToMapExtent(bboxobject); + this.mapController.zoomToExtent(bbox); + if (this.mapController.olMap.getView().getZoom() > 15) { + this.mapController.olMap.getView().setZoom(15); } crabZoomer.reset(); sidebar.collapse(); } - } + }) }); ZoomTab.addContent(zoomButton); @@ -313,7 +315,7 @@ define([ } if (this.config.sidebar.draw) { - var drawTab = sidebar.createTab('Bepaal zone', 'fa-connectdevelop', 'Bepaal hier de zone.'); + var drawTab = sidebar.createTab('Bepaal zone', 'fa-pencil', 'Bepaal hier de zone.'); /* ZONE */ var zonePane = domConstruct.create('div'); diff --git a/bower.json b/bower.json index 1fd2a00..55aa23b 100644 --- a/bower.json +++ b/bower.json @@ -14,7 +14,7 @@ "dojo": "~1.12.1", "dijit": "~1.12.1", "proj4": "~2.3.15", - "crabpy_dojo": "https://github.com/OnroerendErfgoed/crabpy_dojo.git#0.2.0", + "crabpy_dojo": "https://github.com/OnroerendErfgoed/crabpy_dojo.git#1.4.3", "ol": "https://github.com/OnroerendErfgoed/ol3-amd.git#0.2.1", "font-awesome": "~4.6.3", "dgrid": "~1.1.0", From 0037188eb372360e0fd43af25bd317b2eefe660f Mon Sep 17 00:00:00 2001 From: Vanderhaegen Cedrik Date: Tue, 5 Dec 2023 17:22:26 +0100 Subject: [PATCH 3/3] update package.lock --- package-lock.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package-lock.json b/package-lock.json index c63282d..7be379c 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "zoneerder", - "version": "1.3.1", + "version": "1.3.2", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "zoneerder", - "version": "1.3.1", + "version": "1.3.2", "devDependencies": { "http-server": "^14.1.1" }