Skip to content

Commit

Permalink
release leaflet-2.2.7
Browse files Browse the repository at this point in the history
  • Loading branch information
azarz committed Oct 30, 2022
2 parents 3936b23 + 6c00bd1 commit 2e27ba6
Show file tree
Hide file tree
Showing 8 changed files with 117 additions and 48 deletions.
2 changes: 2 additions & 0 deletions DRAFT_CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@
* [Removed]

* [Fixed]
- Calcul d'itinéraire fonctionnel

* [Security]

Expand All @@ -58,6 +59,7 @@




# Extension Geoportail Itowns, version __VERSION__

**__DATE__**
Expand Down
Binary file not shown.
Binary file not shown.
52 changes: 26 additions & 26 deletions build/scripts/release/package-openlayers.json
Original file line number Diff line number Diff line change
@@ -1,46 +1,46 @@
{
"devDependencies" : {},
"files" : [
"dist/",
"src/",
"LICENCE.md",
"README.md",
"package.json"
],
"bundleDependencies" : [],
"scripts" : {},
"directories" : {},
"dependencies" : {
"@mapbox/mapbox-gl-style-spec" : "13.20.1",
"loglevel" : "1.6.6",
"geoportal-access-lib" : "3.1.0",
"xmldom" : "^0.1.27",
"node-fetch" : "^2.6.1",
"ol-mapbox-style" : "6.7.0",
"eventbusjs" : "0.2.0",
"proj4" : "2.7.5",
"ol" : "6.9.0",
"sortablejs" : "1.14.0"
},
"description" : "French Geoportal Extensions for OpenLayers",
"license" : "CECILL-B",
"keywords" : [
"geoportail",
"plugin",
"javascript",
"OpenLayers"
],
"license" : "CECILL-B",
"dependencies" : {
"@mapbox/mapbox-gl-style-spec" : "13.20.1",
"eventbusjs" : "0.2.0",
"ol-mapbox-style" : "6.7.0",
"proj4" : "2.7.5",
"xmldom" : "^0.1.27",
"node-fetch" : "^2.6.1",
"loglevel" : "1.6.6",
"geoportal-access-lib" : "3.2.0",
"sortablejs" : "1.14.0",
"ol" : "6.9.0"
},
"date" : "04/10/2022",
"author" : "IGNF",
"peerDependencies" : {},
"scripts" : {},
"name" : "geoportal-extensions-openlayers",
"module" : "src/OpenLayers/index.js",
"description" : "French Geoportal Extensions for OpenLayers",
"version" : "3.2.16",
"bundleDependencies" : [],
"repository" : {
"type" : "git",
"url" : "https://github.com/IGNF/geoportal-extensions.git"
"url" : "https://github.com/IGNF/geoportal-extensions.git",
"type" : "git"
},
"author" : "IGNF",
"homepage" : "https://geoservices.ign.fr/documentation/utilisation_web/extension-openlayers.html",
"bugs" : {},
"name" : "geoportal-extensions-openlayers",
"main" : "dist/GpPluginOpenLayers-src.js",
"devDependencies" : {},
"directories" : {}
"version" : "3.2.17",
"module" : "src/OpenLayers/index.js",
"bugs" : {},
"date" : "04/10/2022"
}
25 changes: 25 additions & 0 deletions doc/CHANGELOG-itowns.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- [Extension Geoportail Itowns, version 2.3.8](#extension-geoportail-itowns-version-238)
* [Summary](#summary-22)
* [Changelog](#changelog-21)
- [Extension Geoportail Itowns, version 2.3.9](#extension-geoportail-itowns-version-239)
* [Summary](#summary-23)
* [Changelog](#changelog-22)

<!-- tocstop -->

Expand Down Expand Up @@ -622,3 +625,25 @@ Mise à jour de la bibliothèque d'accès aux services Geoportail
* [Security]

---
# Extension Geoportail Itowns, version 2.3.9

**04/10/2022**
> Release Extension Geoportail itowns
## Summary

## Changelog

* [Added]

* [Changed]

* [Deprecated]

* [Removed]

* [Fixed]

* [Security]

---
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
{
"name": "geoportal-extensions",
"description": "French Geoportal Extensions for OpenLayers, Leaflet and iTowns libraries",
"version": "2.7.1",
"date": "04/10/2022",
"version": "2.7.2",
"date": "30/10/2022",
"leafletExtName": "French Geoportal Extension for Leaflet",
"leafletExtVersion": "2.2.6",
"leafletExtVersion": "2.2.7",
"olExtName": "French Geoportal Extension for OpenLayers",
"olExtVersion": "3.2.17",
"itownsExtName": "French Geoportal Extension for Itowns",
Expand Down
33 changes: 26 additions & 7 deletions src/Leaflet/Controls/Route.js
Original file line number Diff line number Diff line change
Expand Up @@ -703,21 +703,40 @@ var Route = L.Control.extend(/** @lends L.geoportalControl.Route.prototype */ {
var points = this._currentPoints;

// - point de depart
var start = points[0].getCoordinate();
var start;
if (points[0].getCoordinate) {
var startCoordinate = points[0].getCoordinate();
start = {
x : startCoordinate.lon || startCoordinate.lng,
y : startCoordinate.lat
};
}
points[0].dragging(false);
logger.log("start", start);
// - point d'arrivée
var end = points[points.length - 1].getCoordinate();
var end;
if (points[points.length - 1] && points[points.length - 1].getCoordinate) {
var endCoordinate = points[points.length - 1].getCoordinate();
end = {
x : endCoordinate.lon || endCoordinate.lng,
y : endCoordinate.lat
};
}
points[points.length - 1].dragging(false);
logger.log("end", end);
// - les étapes
var step = [];
for (var i = 1; i < points.length - 1; i++) {
var coordinate = points[i].getCoordinate();
points[i].dragging(false);
if (coordinate) {
logger.log("step", coordinate);
step.push(coordinate);
if (points[i] && points[i].getCoordinate) {
var iCoordinate = points[i].getCoordinate();
if (iCoordinate) {
var coordinate = {
x : iCoordinate.lon || iCoordinate.lng,
y : iCoordinate.lat
};
logger.log("step", coordinate);
step.push(coordinate);
}
}
}

Expand Down
47 changes: 35 additions & 12 deletions src/OpenLayers/Controls/LayerImport.js
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ var logger = Logger.getLogger("layerimport");
* @param {Object} [options.vectorStyleOptions.MapBox] - Options for MapBox layer styling
* @param {Object} [options.vectorStyleOptions.MapBox.defaultStyle] - default style to be applied to MapBox imports in case no style is defined. defaultStyle is an {@link http://openlayers.org/en/latest/apidoc/ol.style.Style.html ol.style.Style} object.
* @param {Object} [options.vectorStyleOptions.MapBox.editor] - options for tools editor
* @param {Boolean} [options.vectorStyleOptions.MapBox.display = true] - display tools editor
* @example
* var LayerImport = new ol.control.LayerImport({
* "collapsed" : false,
Expand Down Expand Up @@ -443,6 +444,12 @@ var LayerImport = (function (Control) {
};
}

if (options.vectorStyleOptions && options.vectorStyleOptions.MapBox && options.vectorStyleOptions.MapBox.hasOwnProperty("display")) {
this.options.vectorStyleOptions.MapBox.display = options.vectorStyleOptions.MapBox.display;
} else {
this.options.vectorStyleOptions.MapBox.display = true;
}

// merge layer types
if (Array.isArray(options.layerTypes)) {
var layerTypes = [];
Expand Down Expand Up @@ -1421,18 +1428,34 @@ var LayerImport = (function (Control) {
});
editor.setContext("map", map);
editor.setContext("layer", p.layer);
editor.createElement().then(function () {
// affichage du panneau des couches accessibles à l'edition
self._mapBoxPanel.style.display = "block";
// envoi d'un evenement !
// un peu en décalé...
setTimeout(function () {
map.dispatchEvent({
type : "editor:loaded",
layer : p.layer
});
}, 100);
});
editor.createElement()
.then(function () {
// affichage du panneau des couches accessibles à l'edition
if (self.options.vectorStyleOptions.MapBox.display) {
self._mapBoxPanel.style.display = "block";
}
})
.then(function () {
// envoi d'un evenement !
// un peu en décalé...
setTimeout(function () {
map.dispatchEvent({
id : editor.getID(),
type : "editor:loaded",
layer : p.layer
});
}, 100);
})
.then(function () {
// hack pour modifier le titre de la couche de fond
var elements = self._mapBoxResultsListContainer.getElementsByClassName("GPEditorMapBoxLayerTitleLabel");
for (let index = 0; index < elements.length; index++) {
const element = elements[index];
if (element.textContent === "bckgrd") {
element.textContent = "Couleur de remplissage";
}
}
});

// association entre le layer et l'editeur via l'id
p.layer.set("mapbox-editor", editor.getID());
Expand Down

0 comments on commit 2e27ba6

Please sign in to comment.