diff --git a/DRAFT_CHANGELOG.md b/DRAFT_CHANGELOG.md index 9c88b1cdd..437112400 100644 --- a/DRAFT_CHANGELOG.md +++ b/DRAFT_CHANGELOG.md @@ -1,19 +1,17 @@ + # Extension Geoportail OpenLayers, version __VERSION__ **__DATE__** -> Release Extension Geoportail openLayers +> Release Extension Geoportail openlayers ## Summary -Correctifs sur le profil altimétriques - ## Changelog * [Added] * [Changed] - - Adaptation du style du profil alti par défaut * [Deprecated] @@ -21,8 +19,6 @@ Correctifs sur le profil altimétriques * [Fixed] - - Correctif sur les clics multiple en fin de saisie du profil altimétrique (#298) - * [Security] --- @@ -66,9 +62,7 @@ Reparation du le profil altimétrique ## Summary -* gestion des loggers : -> Exposition de la classe statique *Logger* avec les méthodes suivantes : -`Gp.Logger.disableAll()` et `Gp.Logger.enableAll()` +Mise à jour de l'extension géoportail pour iTowns avec itowns en version 2.33 ## Changelog @@ -76,18 +70,14 @@ Reparation du le profil altimétrique * [Changed] + - Utilisation d'iTowns 2.33 (#301) + * [Deprecated] * [Removed] * [Fixed] - - Possibilité de activer / desactiver les loggers des API lors de l'utilisation des API en module ES6 : - - ```js - import { Logger } from "geoportal-extensions-itowns"; - Logger.disableAll(); - * [Security] --- diff --git a/build/scripts/release/geoportal-extensions-itowns-2.3.2.tgz b/build/scripts/release/geoportal-extensions-itowns-2.3.2.tgz index 37d5de0e8..cfae89b3a 100644 Binary files a/build/scripts/release/geoportal-extensions-itowns-2.3.2.tgz and b/build/scripts/release/geoportal-extensions-itowns-2.3.2.tgz differ diff --git a/build/scripts/release/geoportal-extensions-openlayers-3.0.14.tgz b/build/scripts/release/geoportal-extensions-openlayers-3.0.14.tgz deleted file mode 100644 index d54b2e0ee..000000000 Binary files a/build/scripts/release/geoportal-extensions-openlayers-3.0.14.tgz and /dev/null differ diff --git a/build/scripts/release/geoportal-extensions-openlayers-3.0.15.tgz b/build/scripts/release/geoportal-extensions-openlayers-3.0.15.tgz deleted file mode 100644 index ea1c2fcb3..000000000 Binary files a/build/scripts/release/geoportal-extensions-openlayers-3.0.15.tgz and /dev/null differ diff --git a/build/scripts/release/geoportal-extensions-openlayers-3.0.16.tgz b/build/scripts/release/geoportal-extensions-openlayers-3.0.16.tgz new file mode 100644 index 000000000..9a0fa24fb Binary files /dev/null and b/build/scripts/release/geoportal-extensions-openlayers-3.0.16.tgz differ diff --git a/build/scripts/release/package-itowns.json b/build/scripts/release/package-itowns.json index 967b46e9e..1fe2b4e1a 100644 --- a/build/scripts/release/package-itowns.json +++ b/build/scripts/release/package-itowns.json @@ -1,44 +1,44 @@ { - "bugs" : {}, - "author" : "IGNF", "directories" : {}, + "license" : "CECILL-B", + "module" : "src/Itowns/index.js", + "date" : "11/05/2021", + "author" : "IGNF", + "files" : [ + "dist/", + "src/", + "LICENCE.md", + "README.md", + "package.json" + ], "devDependencies" : {}, + "repository" : { + "url" : "https://github.com/IGNF/geoportal-extensions.git", + "type" : "git" + }, + "dependencies" : { + "xmldom" : "^0.1.27", + "node-fetch" : "^2.6.1", + "sortablejs" : "1.8.4", + "itowns" : "2.33.0", + "three" : "0.127.0", + "proj4" : "2.7.0", + "geoportal-access-lib" : "2.1.8", + "loglevel" : "1.6.6" + }, + "main" : "dist/GpPluginItowns-src.js", + "homepage" : "https://geoservices.ign.fr/documentation/utilisation_web/extension-itowns.html", + "description" : "French Geoportal Extensions for iTowns", + "version" : "2.3.2", "bundleDependencies" : [], + "bugs" : {}, "name" : "geoportal-extensions-itowns", - "version" : "2.3.2", + "peerDependencies" : {}, "keywords" : [ "geoportail", "plugin", "javascript", "Itowns" ], - "dependencies" : { - "itowns" : "2.30.0", - "geoportal-access-lib" : "2.1.8", - "proj4" : "2.7.0", - "three" : "0.124.0", - "xmldom" : "^0.1.27", - "sortablejs" : "1.8.4", - "loglevel" : "1.6.6", - "node-fetch" : "^2.6.1" - }, - "description" : "French Geoportal Extensions for iTowns", - "scripts" : {}, - "repository" : { - "url" : "https://github.com/IGNF/geoportal-extensions.git", - "type" : "git" - }, - "files" : [ - "dist/", - "src/", - "LICENCE.md", - "README.md", - "package.json" - ], - "date" : "30/03/2021", - "module" : "src/Itowns/index.js", - "homepage" : "https://geoservices.ign.fr/documentation/utilisation_web/extension-itowns.html", - "main" : "dist/GpPluginItowns-src.js", - "license" : "CECILL-B", - "peerDependencies" : {} + "scripts" : {} } diff --git a/build/scripts/release/package-openlayers.json b/build/scripts/release/package-openlayers.json index 22143c040..a50ada86c 100644 --- a/build/scripts/release/package-openlayers.json +++ b/build/scripts/release/package-openlayers.json @@ -1,46 +1,46 @@ { - "scripts" : {}, - "name" : "geoportal-extensions-openlayers", + "module" : "src/OpenLayers/index.js", + "license" : "CECILL-B", + "files" : [ + "dist/", + "src/", + "LICENCE.md", + "README.md", + "package.json" + ], "bugs" : {}, + "scripts" : {}, + "date" : "11/05/2021", + "bundleDependencies" : [], "dependencies" : { + "loglevel" : "1.6.6", + "ol-mapbox-style" : "4.2.1", "@mapbox/mapbox-gl-style-spec" : "13.11.0", - "ol" : "5.3.0", + "eventbusjs" : "0.2.0", + "geoportal-access-lib" : "2.1.8", "node-fetch" : "^2.6.1", "xmldom" : "^0.1.27", - "geoportal-access-lib" : "2.1.8", "proj4" : "2.7.0", - "sortablejs" : "1.8.4", - "ol-mapbox-style" : "4.2.1", - "loglevel" : "1.6.6", - "eventbusjs" : "0.2.0" - }, - "devDependencies" : {}, - "license" : "CECILL-B", - "directories" : {}, - "version" : "3.0.14", - "peerDependencies" : {}, - "author" : "IGNF", - "main" : "dist/GpPluginOpenLayers-src.js", - "date" : "30/03/2021", - "bundleDependencies" : [], - "homepage" : "https://geoservices.ign.fr/documentation/utilisation_web/extension-openlayers.html", - "repository" : { - "type" : "git", - "url" : "https://github.com/IGNF/geoportal-extensions.git" + "ol" : "5.3.0", + "sortablejs" : "1.8.4" }, - "module" : "src/OpenLayers/index.js", - "description" : "French Geoportal Extensions for OpenLayers", + "name" : "geoportal-extensions-openlayers", "keywords" : [ "geoportail", "plugin", "javascript", "OpenLayers" ], - "files" : [ - "dist/", - "src/", - "LICENCE.md", - "README.md", - "package.json" - ] + "repository" : { + "type" : "git", + "url" : "https://github.com/IGNF/geoportal-extensions.git" + }, + "peerDependencies" : {}, + "version" : "3.0.16", + "devDependencies" : {}, + "main" : "dist/GpPluginOpenLayers-src.js", + "homepage" : "https://geoservices.ign.fr/documentation/utilisation_web/extension-openlayers.html", + "directories" : {}, + "description" : "French Geoportal Extensions for OpenLayers", + "author" : "IGNF" } diff --git a/doc/CHANGELOG-openlayers.md b/doc/CHANGELOG-openlayers.md index ee80320e4..7ab69d8be 100644 --- a/doc/CHANGELOG-openlayers.md +++ b/doc/CHANGELOG-openlayers.md @@ -70,6 +70,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - [Extension Geoportail OpenLayers, version 3.0.14](#extension-geoportail-openlayers-version-3014) * [Summary](#summary-18) * [Changelog](#changelog-15) +- [Extension Geoportail OpenLayers, version 3.0.16](#extension-geoportail-openlayers-version-3016) + * [Summary](#summary-19) + * [Changelog](#changelog-16) @@ -746,3 +749,30 @@ Nouveau widget de profil altimétrique et correctif sur le SearchEngine * [Security] --- +# Extension Geoportail OpenLayers, version 3.0.16 + +**11/05/2021** +> Release Extension Geoportail openLayers + +## Summary + +Correctifs sur le profil altimétriques + +## Changelog + +* [Added] + +* [Changed] + - Adaptation du style du profil alti par défaut + +* [Deprecated] + +* [Removed] + +* [Fixed] + + - Correctif sur les clics multiple en fin de saisie du profil altimétrique (#298) + +* [Security] + +--- diff --git a/package.json b/package.json index 5e79859b1..38bed690c 100644 --- a/package.json +++ b/package.json @@ -1,14 +1,14 @@ { "name": "geoportal-extensions", "description": "French Geoportal Extensions for OpenLayers, Leaflet and iTowns libraries", - "version": "2.3.5", - "date": "11/05/2021", + "version": "2.3.6", + "date": "16/06/2021", "leafletExtName": "French Geoportal Extension for Leaflet", "leafletExtVersion": "2.1.9", "olExtName": "French Geoportal Extension for OpenLayers", "olExtVersion": "3.0.16", "itownsExtName": "French Geoportal Extension for Itowns", - "itownsExtVersion": "2.3.2", + "itownsExtVersion": "2.3.3", "main": "dist/leaflet/GpPluginLeaflet.js, dist/openlayers/GpPluginOpenLayers.js, dist/itowns/GpPluginItowns.js", "module": "src/Leaflet/index.js, src/OpenLayers/index.js, src/Itowns/index.js", "directories": {}, @@ -67,7 +67,7 @@ "@mapbox/mapbox-gl-style-spec": "13.11.0", "eventbusjs": "0.2.0", "geoportal-access-lib": "2.1.8", - "itowns": "2.30.0", + "itowns": "2.33.0", "leaflet": "1.7.1", "leaflet-draw": "1.0.4", "loglevel": "^1.6.7", @@ -77,7 +77,7 @@ "proj4": "2.7.0", "proj4leaflet": "1.0.2", "sortablejs": "1.8.4", - "three": "0.124.0", + "three": "0.127.0", "whatwg-fetch": "3.0.0" }, "devDependencies": { diff --git a/samples-src/pages/itowns/LayerSwitcher/pages-itowns-layerswitcher-amd-vectorTile.html b/samples-src/pages/itowns/LayerSwitcher/pages-itowns-layerswitcher-amd-vectorTile.html index 1a315a267..e5e188169 100644 --- a/samples-src/pages/itowns/LayerSwitcher/pages-itowns-layerswitcher-amd-vectorTile.html +++ b/samples-src/pages/itowns/LayerSwitcher/pages-itowns-layerswitcher-amd-vectorTile.html @@ -54,7 +54,7 @@

Ajout d'un contrôle de gestion des couches : LayerSwitcher

layer: "ELEVATION.ELEVATIONGRIDCOVERAGE", ssl: true })); - + // Couche WMTS Geoportail globeView.addLayer(new Gp.itownsExtended.layer.GeoportalWMTS({ layer: "ORTHOIMAGERY.ORTHOPHOTOS", @@ -63,8 +63,7 @@

Ajout d'un contrôle de gestion des couches : LayerSwitcher

// Ajout couche Vecteur tuilé par itowns (fx: 2.5 => transparent) var mvtSource = new itowns.VectorTilesSource({ - style: '../../resources/data/mapbox/styles/planign/planign.json', - sprite: 'https://vectortiles.ign.fr/demonstrateur/sprite/PlanIgn', + style: '../../resources/data/mapbox/styles/planign/standard.json', zoom: { min: 2, max: 16, @@ -82,7 +81,7 @@

Ajout d'un contrôle de gestion des couches : LayerSwitcher

return false; }, noTextureParentOutsideLimit: true, - labelEnabled: true, + addLabelLayer: true, source: mvtSource }); @@ -92,10 +91,10 @@

Ajout d'un contrôle de gestion des couches : LayerSwitcher

return false; }, noTextureParentOutsideLimit: true, - labelEnabled: true, + addLabelLayer: true, source: mvtSourceEcole }); - + globeView.addLayer(mvtLayer); globeView.addLayer(mvtLayerEcole); @@ -140,4 +139,4 @@

Ajout d'un contrôle de gestion des couches : LayerSwitcher

onSuccess: createMap }); }); - {{/content}} {{/extend}} \ No newline at end of file + {{/content}} {{/extend}} diff --git a/samples-src/pages/itowns/Layers/pages-itowns-gpLayers-amd-vectorTiles.html b/samples-src/pages/itowns/Layers/pages-itowns-gpLayers-amd-vectorTiles.html index afa5c4650..e8503fcb8 100644 --- a/samples-src/pages/itowns/Layers/pages-itowns-gpLayers-amd-vectorTiles.html +++ b/samples-src/pages/itowns/Layers/pages-itowns-gpLayers-amd-vectorTiles.html @@ -58,13 +58,13 @@

Ajout d'un contrôle de gestion des couches : LayerSwitcher

var vectorTileLayer = new Gp.itownsExtended.layer.VectorTileLayer({ layer: "PLAN.IGN", id : "MVT", - url: '../../resources/itowns/planign.json', + url: 'https://wxs.ign.fr/static/vectorTiles/styles/PLAN.IGN/standard.json', zoom : { min: 0, max: 13 } }) - + globeView.addLayer(vectorTileLayer); // ajout du control @@ -101,11 +101,10 @@

Ajout d'un contrôle de gestion des couches : LayerSwitcher

} Gp.Services.getConfig({ - serverUrl : "./../../resources/AutoConf_VT.js", callbackSuffix : '', // apiKey: "{{ apikey }}", timeOut: 20000, onSuccess: createMap }); }); - {{/content}} {{/extend}} \ No newline at end of file + {{/content}} {{/extend}} diff --git a/src/Itowns/GlobeViewExtended.js b/src/Itowns/GlobeViewExtended.js index 49867b955..86c58dc28 100644 --- a/src/Itowns/GlobeViewExtended.js +++ b/src/Itowns/GlobeViewExtended.js @@ -338,16 +338,6 @@ GlobeViewExtended.prototype.setLayerOpacity = function (layerId, opacityValue) { GlobeViewExtended.prototype.setLayerVisibility = function (layerId, visible) { var layer = this.getColorLayerById(layerId); layer.visible = visible; - - // sync the vectorTiles layer visibility with its labels - if (layer.source.isVectorSource === true) { - if (layer.visible === true) { - layer.labelEnabled = true; - } else { - layer.labelEnabled = false; - } - } - this.getGlobeView().notifyChange(layer); }; diff --git a/src/OpenLayers/Controls/ElevationPath.js b/src/OpenLayers/Controls/ElevationPath.js index 46b4a1c3b..49abac345 100644 --- a/src/OpenLayers/Controls/ElevationPath.js +++ b/src/OpenLayers/Controls/ElevationPath.js @@ -1220,16 +1220,21 @@ var ElevationPath = (function (Control) { var _sampling; var _length = this._getLength(); logger.trace("length", _length); - var minSampling = this._getSketchCoords(); - var p = Math.max(3, minSampling, Math.floor(_length) / 5); // en mètre sur un pas moyen de 5m ! + var p = Math.max(50, Math.floor(_length) / 5); // en mètre sur un pas moyen de 5m ! if (p > 200) { _sampling = 200; } else { _sampling = Math.floor(p); } + var pointNumber = this._getSketchCoords().length; + if (pointNumber > 100) { + _sampling = 0; + } + } + if (_sampling > 0) { Utils.mergeParams(options, { - sampling : _sampling || 50 + sampling : _sampling }); } @@ -1477,7 +1482,7 @@ var ElevationPath = (function (Control) { if (greaterSlope) { this._addElevationPathInformationsItem("Plus forte pente : " + this._data.greaterSlope.toLocaleString() + " %"); } - }; + }; // ################################################################### // // ####################### handlers events to dom #################### // @@ -1521,7 +1526,6 @@ var ElevationPath = (function (Control) { * @private */ ElevationPath.prototype.onOpenElevationPathInfoClick = function () { - var div = this._infoContainer; // show des informations !