Skip to content

Commit

Permalink
feature (editor) : gestion des icônes dans l’éditeur MapBox (#261)
Browse files Browse the repository at this point in the history
* feature (editor) : gestion des icônes dans l’éditeur MapBox
  - les icônes sont issus des sprites du mapbox style
  - maj jsdoc Legend.js

* fix (build) : version dépendance 
  - force version @mapbox/mapbox-gl-style-spec 13.11.0
  - upgrade plugin "terser-webpack-plugin"
    -> bug sur la minification du bundle
    -> version > 2.0.0 (breaking change)
    -> utiliser nodejs v8.9.0 minimum

> compilation avec une version nodejs > 8.9.0
  • Loading branch information
lowzonenose authored Mar 31, 2020
1 parent c6d5142 commit bb3998f
Show file tree
Hide file tree
Showing 17 changed files with 329 additions and 97 deletions.
4 changes: 2 additions & 2 deletions DEPENDENCIES.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ last
* geoportal-access-lib

last
└── [email protected].5
└── [email protected].6

* leaflet

Expand All @@ -43,7 +43,7 @@ last

* "itowns"

└── "itowns@2.15.3"
└── "itowns@2.19.0"

* loglevel

Expand Down
11 changes: 10 additions & 1 deletion DRAFT_CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,14 @@
## Summary

* fix sur le retrait d'un widget de la carte
* fix sur les versions des dépendances (mapbox)

## Changelog

* [Added]

- gestion des icônes dans l’éditeur MapBox

* [Changed]

* [Deprecated]
Expand All @@ -22,10 +25,12 @@
* [Fixed]

- fix sur le retrait du widget "mouseposition" de la carte
- Control LocationSelector OL : inversion affichage lon/lat
- correctif sur l'inversion affichage lon/lat du widget "mouseposition"
- fix sur la version de "@mapbox/mapbox-gl-style-spec" : "13.11.0"

* [Security]


---

# Extension Geoportail Itowns, version 2.2.8
Expand All @@ -41,6 +46,8 @@

* [Changed]

- choix fixé des versions des dépendances dans le package.json

* [Deprecated]

* [Removed]
Expand Down Expand Up @@ -69,6 +76,8 @@

* [Changed]

- choix fixé des versions des dépendances dans le package.json

* [Deprecated]

* [Removed]
Expand Down
Binary file not shown.
Binary file modified build/scripts/release/geoportal-extensions-itowns-2.2.8.tgz
Binary file not shown.
Binary file modified build/scripts/release/geoportal-extensions-leaflet-2.1.5.tgz
Binary file not shown.
Binary file modified build/scripts/release/geoportal-extensions-openlayers-3.0.7.tgz
Binary file not shown.
44 changes: 22 additions & 22 deletions build/scripts/release/package-itowns.json
Original file line number Diff line number Diff line change
@@ -1,45 +1,45 @@
{
"description" : "French Geoportal Extensions for iTowns",
"homepage" : "https://geoservices.ign.fr/documentation/utilisation_web/extension-itowns.html",
"bugs" : {},
"bundleDependencies" : [],
"date" : "26/03/2020",
"author" : "IGNF",
"directories" : {},
"scripts" : {},
"version" : "2.2.8",
"module" : "src/Itowns/index.js",
"repository" : {
"type" : "git",
"url" : "https://github.com/IGNF/geoportal-extensions.git"
},
"peerDependencies" : {},
"devDependencies" : {},
"homepage" : "https://geoservices.ign.fr/documentation/utilisation_web/extension-itowns.html",
"name" : "geoportal-extensions-itowns",
"description" : "French Geoportal Extensions for iTowns",
"files" : [
"dist/",
"src/",
"LICENCE.md",
"README.md",
"package.json"
],
"bugs" : {},
"bundleDependencies" : [],
"dependencies" : {
"request" : "^2.83.0",
"proj4" : "2.5.0",
"three" : "^0.113.2",
"geoportal-access-lib" : "^2.1.6",
"loglevel" : "~1.6.1",
"sortablejs" : "1.8.4",
"three.meshline" : "~1.2.0",
"itowns" : "2.19.0",
"xmldom" : "^0.1.27"
},
"directories" : {},
"license" : "CECILL-B",
"main" : "dist/GpPluginItowns-src.js",
"author" : "IGNF",
"keywords" : [
"geoportail",
"plugin",
"javascript",
"Itowns"
],
"scripts" : {}
"main" : "dist/GpPluginItowns-src.js",
"dependencies" : {
"three" : "0.113.2",
"xmldom" : "^0.1.27",
"request" : "^2.83.0",
"three.meshline" : "1.2.0",
"sortablejs" : "1.8.4",
"proj4" : "2.5.0",
"itowns" : "2.19.0",
"loglevel" : "1.6.1",
"geoportal-access-lib" : "2.1.6"
},
"module" : "src/Itowns/index.js",
"name" : "geoportal-extensions-itowns",
"devDependencies" : {}
}
44 changes: 22 additions & 22 deletions build/scripts/release/package-leaflet.json
Original file line number Diff line number Diff line change
@@ -1,44 +1,44 @@
{
"description" : "French Geoportal Extension for Leaflet",
"module" : "src/Leaflet/index.js",
"main" : "dist/GpPluginLeaflet-src.js",
"name" : "geoportal-extensions-leaflet",
"dependencies" : {
"leaflet" : "1.5.1",
"geoportal-access-lib" : "2.1.6",
"sortablejs" : "1.8.4",
"leaflet-draw" : "1.0.4",
"proj4" : "2.6.0",
"proj4leaflet" : "1.0.2",
"loglevel" : "1.6.1"
},
"devDependencies" : {},
"bundleDependencies" : [],
"files" : [
"dist/",
"src/",
"LICENCE.md",
"README.md",
"package.json"
],
"devDependencies" : {},
"name" : "geoportal-extensions-leaflet",
"dependencies" : {
"leaflet" : "1.5.1",
"loglevel" : "~1.6.1",
"sortablejs" : "1.8.4",
"leaflet-draw" : "1.0.4",
"geoportal-access-lib" : "^2.1.6",
"proj4" : "2.5.0",
"proj4leaflet" : "~1.0.2"
},
"date" : "05/12/2019",
"directories" : {},
"keywords" : [
"geoportail",
"plugin",
"javascript",
"leaflet",
"publish"
],
"bugs" : {},
"author" : "IGNF",
"module" : "src/Leaflet/index.js",
"date" : "26/03/2020",
"peerDependencies" : {},
"homepage" : "https://geoservices.ign.fr/documentation/utilisation_web/extension-leaflet.html",
"version" : "2.1.5",
"directories" : {},
"description" : "French Geoportal Extension for Leaflet",
"bugs" : {},
"license" : "CECILL-B",
"repository" : {
"url" : "https://github.com/IGNF/geoportal-extensions.git",
"type" : "git"
},
"main" : "dist/GpPluginLeaflet-src.js",
"scripts" : {},
"bundleDependencies" : [],
"author" : "IGNF",
"version" : "2.1.5",
"license" : "CECILL-B"
"homepage" : "https://geoservices.ign.fr/documentation/utilisation_web/extension-leaflet.html"
}
53 changes: 27 additions & 26 deletions build/scripts/release/package-openlayers.json
Original file line number Diff line number Diff line change
@@ -1,45 +1,46 @@
{
"description" : "French Geoportal Extensions for OpenLayers",
"bugs" : {},
"repository" : {
"type" : "git",
"url" : "https://github.com/IGNF/geoportal-extensions.git"
},
"author" : "IGNF",
"name" : "geoportal-extensions-openlayers",
"peerDependencies" : {},
"directories" : {},
"files" : [
"dist/",
"src/",
"LICENCE.md",
"README.md",
"package.json"
],
"dependencies" : {
"@mapbox/mapbox-gl-style-spec" : "13.11.0",
"ol" : "^5.3.0",
"loglevel" : "1.6.1",
"sortablejs" : "1.8.4",
"eventbusjs" : "0.2.0",
"geoportal-access-lib" : "2.1.6",
"request" : "^2.83.0",
"xmldom" : "^0.1.27",
"ol-mapbox-style" : "4.3.0",
"proj4" : "2.6.0"
},
"module" : "src/OpenLayers/index.js",
"version" : "3.0.7",
"peerDependencies" : {},
"devDependencies" : {},
"license" : "CECILL-B",
"bundleDependencies" : [],
"keywords" : [
"geoportail",
"plugin",
"javascript",
"OpenLayers"
],
"homepage" : "https://geoservices.ign.fr/documentation/utilisation_web/extension-openlayers.html",
"directories" : {},
"dependencies" : {
"loglevel" : "~1.6.1",
"sortablejs" : "1.8.4",
"proj4" : "2.5.0",
"ol-mapbox-style" : "^4.2.1",
"geoportal-access-lib" : "^2.1.6",
"xmldom" : "^0.1.27",
"ol" : "^5.3.0",
"request" : "^2.83.0",
"eventbusjs" : "^0.2.0"
"name" : "geoportal-extensions-openlayers",
"repository" : {
"type" : "git",
"url" : "https://github.com/IGNF/geoportal-extensions.git"
},
"license" : "CECILL-B",
"version" : "3.0.7",
"bundleDependencies" : [],
"bugs" : {},
"description" : "French Geoportal Extensions for OpenLayers",
"date" : "26/03/2020",
"scripts" : {},
"date" : "24/01/2020",
"main" : "dist/GpPluginOpenLayers-src.js"
"main" : "dist/GpPluginOpenLayers-src.js",
"homepage" : "https://geoservices.ign.fr/documentation/utilisation_web/extension-openlayers.html",
"author" : "IGNF"
}
1 change: 1 addition & 0 deletions build/webpack/webpack.config.itowns.js
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,7 @@ module.exports = (env, argv) => {
/** MINIFICATION */
minimizer: [
new TerserJsWebPackPlugin({
extractComments: false,
terserOptions: {
output: {
// FIXME avec les banner !
Expand Down
1 change: 1 addition & 0 deletions build/webpack/webpack.config.leaflet.js
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,7 @@ module.exports = (env, argv) => {
/** MINIFICATION */
minimizer: [
new TerserJsWebPackPlugin({
extractComments: false,
terserOptions: {
output: {
// FIXME avec les banner !
Expand Down
1 change: 1 addition & 0 deletions build/webpack/webpack.config.openlayers.js
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,7 @@ module.exports = (env, argv) => {
/** MINIFICATION */
minimizer: [
new TerserJsWebPackPlugin({
extractComments: false,
terserOptions: {
output: {
// FIXME avec les banner !
Expand Down
1 change: 1 addition & 0 deletions build/webpack/webpack.config.openlayers.modules.js
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,7 @@ module.exports = (env, argv) => {
/** MINIFICATION */
minimizer: [
new TerserJsWebPackPlugin({
extractComments: false,
terserOptions: {
output: {
// FIXME avec les banner !
Expand Down
7 changes: 4 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -73,13 +73,13 @@
"dependencies": {
"eventbusjs": "^0.2.0",
"geoportal-access-lib": "^2.1.6",
"handlebars": "^4.7.2",
"itowns": "2.19.0",
"leaflet": "1.5.1",
"leaflet-draw": "1.0.4",
"loglevel": "~1.6.1",
"ol": "^5.3.0",
"ol-mapbox-style": "^4.2.1",
"ol-mapbox-style": "^4.3.0",
"@mapbox/mapbox-gl-style-spec": "13.11.0",
"proj4": "^2.5.0",
"proj4leaflet": "~1.0.2",
"sortablejs": "1.8.4",
Expand Down Expand Up @@ -107,6 +107,7 @@
"exports-loader": "^0.7.0",
"expose-loader": "^0.7.5",
"fs-extra": "^8.0.1",
"handlebars": "^4.7.2",
"handlebars-layouts": "^3.1.4",
"html-webpack-plugin": "^3.1.0",
"istanbul-instrumenter-loader": "^3.0.1",
Expand All @@ -126,7 +127,7 @@
"speed-measure-webpack-plugin": "^1.3.0",
"string-template": "^1.0.0",
"style-loader": "^0.23.1",
"terser-webpack-plugin": "^1.2.3",
"terser-webpack-plugin": "^2.0.0",
"uglify-es": "github:mishoo/UglifyJS2#harmony",
"uglifyjs-webpack-plugin": "^2.1.2",
"url-loader": "^1.1.2",
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
{{#extend "ol-sample-bundle-layout"}}

{{#content "head"}}
<title>Sample openlayers Themes Mapbox</title>
{{/content}}

{{#content "style"}}
<style>
</style>
{{/content}}

{{#content "body"}}
<h2>Ajout du widget d'édition des themes MapBox</h2>
<button id="displayFalse">Hidden</button>
<button id="displayTrue">Show</button>
<div id="editor">
</div>
{{/content}}

{{#content "js"}}
<script type="text/javascript">

var editor = new ol.style.Editor({
target: document.getElementById("editor"),
style: "{{ resources }}/data/mapbox/styles/enseignements.json",
events : {
"editor:themes:onclicktitle" : function (e) {
if (this.getID() === e.target.editorID) {
console.log("editor:themes:onclicktitle", this.getID(), e);
}
}
},
themes : {
themesSummary : "editor",
themes : [
{
"name" : "standard",
"url" : "{{ resources }}/data/mapbox/themes/styles/style0.json",
"selected" : true
}
]
},
tools : {
themes : true,
layers : true,
filter : true,
style :true,
legend : true
}
});

document.getElementById("displayTrue").addEventListener("click", function () {
editor.display(true);
});
document.getElementById("displayFalse").addEventListener("click", function () {
editor.display(false);
});
</script>
{{/content}}
{{/extend}}
Loading

0 comments on commit bb3998f

Please sign in to comment.