From 3e8f46136190dcdf817e14baf374f8146d202557 Mon Sep 17 00:00:00 2001 From: github-actions Date: Wed, 22 Feb 2023 16:12:27 +0000 Subject: [PATCH 1/4] reset DRAFT_CHANGELOG --- DRAFT_CHANGELOG.md | 9 --------- 1 file changed, 9 deletions(-) diff --git a/DRAFT_CHANGELOG.md b/DRAFT_CHANGELOG.md index 02a070044..cfc60e76e 100644 --- a/DRAFT_CHANGELOG.md +++ b/DRAFT_CHANGELOG.md @@ -6,25 +6,16 @@ ## Summary -Maj des extensions OpenLayers : 3.2.20 - ## Changelog * [Added] - - Possibilité de charger un KML, GPX ou GeoJSON directement avec les données sans passer par une URL en utilisant l'option *layerOptions:data* - > Persistance des tracés de calcul (itineraire et iso) entre la 2D / 3D (#100) - * [Changed] - - mise à jour de la version de l'extension geoportail pour openlayers en version 3.2.20 (#100) - * [Removed] * [Fixed] - - mise à jour de la doc (#102) - * [Deprecated] * [Security] From 67f1d3a5672eb5108a778ea39c405d886c6e156a Mon Sep 17 00:00:00 2001 From: elias couppe Date: Thu, 23 Mar 2023 17:15:30 +0100 Subject: [PATCH 2/4] fix(switch): meilleur filtrage infos pop-up + ol-3.2.21 --- package.json | 2 +- src/Itowns/ItMapListeners.js | 79 ++++++++++++++++++++---------------- 2 files changed, 44 insertions(+), 37 deletions(-) diff --git a/package.json b/package.json index 32f4b8b05..b56f13ad8 100644 --- a/package.json +++ b/package.json @@ -73,7 +73,7 @@ "expose-loader": "^0.7.5", "fs-extra": "^9.0.0", "geoportal-extensions-itowns": "2.3.10", - "geoportal-extensions-openlayers": "3.2.20", + "geoportal-extensions-openlayers": "3.2.21", "handlebars": "^4.7.5", "handlebars-layouts": "^3.1.4", "html-webpack-plugin": "^4.0.4", diff --git a/src/Itowns/ItMapListeners.js b/src/Itowns/ItMapListeners.js index 8c54fd7d3..4d7d8e64a 100644 --- a/src/Itowns/ItMapListeners.js +++ b/src/Itowns/ItMapListeners.js @@ -35,15 +35,15 @@ ItMap.prototype.listen = function (eventId, action, context) { var map = this; var key = null; switch (eventId) { - case "mapFailure" : + case "mapFailure": break; - case "mapLoaded" : - case "located" : - case "geolocated" : - case "configured" : + case "mapLoaded": + case "located": + case "geolocated": + case "configured": // handled in IMap break; - case "centerChanged" : + case "centerChanged": var callBackCenterChanged = function (itEvent) { var centerChangedEvt = {}; if (!itEvent) { @@ -51,62 +51,62 @@ ItMap.prototype.listen = function (eventId, action, context) { } if (itEvent.previous) { centerChangedEvt.oldCenter = { - x : itEvent.previous.x, - y : itEvent.previous.y + x: itEvent.previous.x, + y: itEvent.previous.y }; } if (itEvent.new) { centerChangedEvt.newCenter = { - x : itEvent.new.x, - y : itEvent.new.y + x: itEvent.new.x, + y: itEvent.new.y }; } action.call(context, centerChangedEvt); }; key = map.libMap.listen(itownsExtended.GlobeViewExtended.EVENTS.CENTER_CHANGED, callBackCenterChanged); break; - case "zoomChanged" : + case "zoomChanged": var callbackZoomchange = function (itEvent) { // si le zoom n'a pas changé, on sort if (itEvent.new === itEvent.previous) { return; } action.call(context, { - oldZoom : itEvent.previous, - newZoom : itEvent.new + oldZoom: itEvent.previous, + newZoom: itEvent.new }); }; key = map.libMap.listen(itownsExtended.GlobeViewExtended.EVENTS.RANGE_CHANGED, callbackZoomchange); break; - case "azimuthChanged" : + case "azimuthChanged": var callbackAzimuthChange = function (itEvent) { if (itEvent.new.heading === itEvent.previous.heading) { return; } action.call(context, { - oldAzimuth : itEvent.previous.heading, - newAzimuth : itEvent.new.heading + oldAzimuth: itEvent.previous.heading, + newAzimuth: itEvent.new.heading }); }; key = map.libMap.listen(itownsExtended.GlobeViewExtended.EVENTS.ORIENTATION_CHANGED, callbackAzimuthChange); break; - case "tiltChanged" : + case "tiltChanged": var callbackTiltChange = function (itEvent) { if (itEvent.new.tilt === itEvent.previous.tilt) { return; } action.call(context, { - oldTilt : itEvent.previous.tilt, - newTilt : itEvent.new.tilt + oldTilt: itEvent.previous.tilt, + newTilt: itEvent.new.tilt }); }; key = map.libMap.listen(itownsExtended.GlobeViewExtended.EVENTS.ORIENTATION_CHANGED, callbackTiltChange); break; - case "projectionChanged" : + case "projectionChanged": // TODO : interet ? break; - case "layerChanged" : + case "layerChanged": var callbackLayerAdded = function (itevt) { var ladded = itevt; var layerIndex; @@ -132,8 +132,8 @@ ItMap.prototype.listen = function (eventId, action, context) { // if itColorLayer is undefined, it is an MNT : the sequence is set to -1 action.call(context, { - layerAdded : layerOpts, - position : layerIndex + layerAdded: layerOpts, + position: layerIndex }); }; key = map.libMap.listen(itownsExtended.GlobeViewExtended.EVENTS.LAYER_ADDED, callbackLayerAdded); @@ -149,7 +149,7 @@ ItMap.prototype.listen = function (eventId, action, context) { } action.call(context, { - layerRemoved : layerOpts + layerRemoved: layerOpts }); // FIXME comment faire le menage des ecouteurs internes ? setTimeout(function () { @@ -175,10 +175,10 @@ ItMap.prototype.listen = function (eventId, action, context) { var newCommonProp = map._getCommonLayerParams(newItObj); action.call(context, { - property : ItMap.LAYERPROPERTIES[k], - oldValue : oldCommonProp[ItMap.LAYERPROPERTIES[k]], - newValue : newCommonProp[ItMap.LAYERPROPERTIES[k]], - layerChanged : layerOpts + property: ItMap.LAYERPROPERTIES[k], + oldValue: oldCommonProp[ItMap.LAYERPROPERTIES[k]], + newValue: newCommonProp[ItMap.LAYERPROPERTIES[k]], + layerChanged: layerOpts }); }; @@ -192,11 +192,11 @@ ItMap.prototype.listen = function (eventId, action, context) { }; key = null; break; - case "controlChanged" : + case "controlChanged": break; - default : + default: this.logger.info("unhandled event : " + eventId); - } ; + }; if (key) { // ajout de l'evenement au tableau des événements this._registerEvent(key, eventId, action, context); @@ -267,8 +267,8 @@ ItMap.prototype._onMapClick = function (evt) { var content = self._features2html(feats); // Affichage des features. var position = { - x : evt.layerX, - y : evt.layerY + x: evt.layerX, + y: evt.layerY }; self._displayInfo(position, content.innerHTML); } @@ -300,6 +300,7 @@ ItMap.prototype._removeInfoDivs = function () { ItMap.prototype._features2html = function (features) { this.logger.trace("[ItMap] : _features2html..."); var content = document.createElement("div"); + var content2display = false; features.forEach(function (f) { var props = {}; if (f.geometry.properties) { @@ -311,12 +312,14 @@ ItMap.prototype._features2html = function (features) { if (props.hasOwnProperty("name")) { nameDiv.innerHTML = props.name; content.appendChild(nameDiv); + content2display = true; } if (props.hasOwnProperty("description")) { var descDiv = document.createElement("div"); descDiv.className = "gp-att-description-div"; descDiv.innerHTML = props["description"]; content.appendChild(descDiv); + content2display = true; } var p = null; var others = false; @@ -324,12 +327,13 @@ ItMap.prototype._features2html = function (features) { var ul = null; var li = null; for (p in props) { - if (p === "name" || p === "description" || p === "styleUrl" || p === "styleHash") { + // on ne prend que les propriété affichables (string) + if (typeof props[p] !== "string" || p === "name" || p === "description" || p === "styleUrl" || p === "styleHash") { continue; } // patch en attendant que les proprietes de style et autres attributs indesirables soient dissocies des autres proprietes dans itowns - if (p === "stroke" || p === "stroke-opacity" || p === "stroke-width" || p === "fill" || p === "fill-opacity" || p === "_idx" || p === "_meshIdx" || p === "coordTimes" || p === "style") { + if (p === "icon" || p === "stroke" || p === "stroke-opacity" || p === "stroke-width" || p === "fill" || p === "fill-opacity" || p === "_idx" || p === "_meshIdx" || p === "coordTimes" || p === "style") { continue; } @@ -338,6 +342,7 @@ ItMap.prototype._features2html = function (features) { oDiv.className = "gp-att-others-div"; ul = document.createElement("ul"); others = true; + content2display = true; } li = document.createElement("li"); var span = document.createElement("span"); @@ -352,7 +357,9 @@ ItMap.prototype._features2html = function (features) { content.appendChild(oDiv); } }, this); - + if (!content2display) { + return; + } return content; }; From 24b60bb2692e4709e83ad5de0a9f0c87e4243e05 Mon Sep 17 00:00:00 2001 From: elias couppe Date: Thu, 23 Mar 2023 19:19:41 +0100 Subject: [PATCH 3/4] =?UTF-8?q?update(changelog):=20mise=20=C3=A0=20jour?= =?UTF-8?q?=20du=20changelog?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- DRAFT_CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/DRAFT_CHANGELOG.md b/DRAFT_CHANGELOG.md index cfc60e76e..e4e58ad31 100644 --- a/DRAFT_CHANGELOG.md +++ b/DRAFT_CHANGELOG.md @@ -12,6 +12,8 @@ * [Changed] + - mise à jour ol-ext 3.2.21 + * [Removed] * [Fixed] From 7c1f96a0dd6af3bda3b9176b0d114f2c867d1b36 Mon Sep 17 00:00:00 2001 From: elias couppe Date: Thu, 23 Mar 2023 20:06:39 +0100 Subject: [PATCH 4/4] release 3.3.24 --- package.json | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/package.json b/package.json index b56f13ad8..e5bbf2289 100644 --- a/package.json +++ b/package.json @@ -1,9 +1,9 @@ { "name": "geoportal-sdk", - "version": "3.3.23", - "date": "22/02/2023", - "SDK2DVersion": "3.3.23", - "SDK3DVersion": "3.3.23", + "version": "3.3.24", + "date": "23/03/2023", + "SDK2DVersion": "3.3.24", + "SDK3DVersion": "3.3.24", "description": "French Geoportal SDK based on OpenLayers (2D) and iTowns (3D) libraries", "main": "dist/2d/GpSDK2D-src.js, dist/3d/GpSDK3d-src.js", "module": "src/SDK2D.js, src/SDK3D.js",