diff --git a/.gitignore b/.gitignore
index 973e358ff..f3372089d 100644
--- a/.gitignore
+++ b/.gitignore
@@ -47,6 +47,7 @@ nb-configuration.xml
/target/
/tests/
/test_rendering/node_modules/
+/types/
# add other directories to ignore
/samples-old/
diff --git a/.npmignore b/.npmignore
index bb41eca09..8bdf1542d 100644
--- a/.npmignore
+++ b/.npmignore
@@ -3,6 +3,7 @@
/jsdoc
/test
/test_rendering
+/types
/samples*
/samples-src
/coverage
diff --git a/DRAFT_CHANGELOG.md b/DRAFT_CHANGELOG.md
index b41c0cb0f..1ae62fd2a 100644
--- a/DRAFT_CHANGELOG.md
+++ b/DRAFT_CHANGELOG.md
@@ -1,11 +1,6 @@
-
-
-
-
-
# Extension Geoportail OpenLayers, version __VERSION__
**__DATE__**
@@ -17,6 +12,8 @@
* [Added]
+ - Ajout des "@types declaration" pour publication
+
* [Changed]
* [Deprecated]
@@ -25,13 +22,14 @@
* [Fixed]
+ - Ajout des evenements (map) : "render:success" / "render:failure" pour l'application du rendu des styles MapBox
+ - Ajout de l'evenement (map) : "editor:loaded" pour le chargement de l'editeur de style
+
* [Security]
---
-
-
# Extension Geoportail Leaflet, version __VERSION__
**__DATE__**
@@ -43,6 +41,8 @@
* [Added]
+ - Ajout des "@types declaration" pour publication
+
* [Changed]
* [Deprecated]
@@ -50,16 +50,12 @@
* [Removed]
* [Fixed]
- - Calcul d'itinéraire fonctionnel
* [Security]
---
-
-
-
# Extension Geoportail Itowns, version __VERSION__
**__DATE__**
@@ -71,6 +67,8 @@
* [Added]
+ - Ajout des "@types declaration ts" pour publication
+
* [Changed]
* [Deprecated]
diff --git a/build.sh b/build.sh
old mode 100755
new mode 100644
index e8641c658..042866abd
--- a/build.sh
+++ b/build.sh
@@ -45,14 +45,14 @@ function clean() {
##########
# leaflet
function leaflet() {
- printTo "####### LEAFLET !"
+ printTo "####### LEAFLET !"
doCmd "npm run build:leaflet"
}
##########
# ol
function ol() {
- printTo "####### OL !"
+ printTo "####### OL !"
doCmd "npm run build:ol"
}
@@ -71,25 +71,25 @@ do
case $opts in
o)
printTo "#################################"
- printTo "###### OpenLayers bundle ! ######"
+ printTo "###### OpenLayers bundle ! ######"
clean "openlayers"
ol
;;
l)
printTo "#################################"
- printTo "####### Leaflet bundle ! ########"
+ printTo "####### Leaflet bundle ! ########"
clean "leaflet"
leaflet
;;
i)
printTo "#############################"
- printTo "###### Itowns bundle ! ######"
+ printTo "###### Itowns bundle ! ######"
clean "itowns"
itowns
;;
a)
printTo "#################################"
- printTo "########## ALL bundle ! #########"
+ printTo "########## ALL bundle ! #########"
clean "openlayers"
ol
clean "leaflet"
diff --git a/build/scripts/release/build-pack.sh b/build/scripts/release/build-pack.sh
index b34b30f84..6b7c6096c 100755
--- a/build/scripts/release/build-pack.sh
+++ b/build/scripts/release/build-pack.sh
@@ -63,6 +63,9 @@ build () {
printTo "> bin..."
doCmd "npm run build:${run_lib_target}"
+ # construction des types declaration ts
+ doCmd "npm run generate-types:${run_lib_target}"
+
# binaires
printTo "> dist/..."
doCmd "mkdir -p ./${main_directory}/dist/"
@@ -75,6 +78,11 @@ build () {
doCmd "cp -r ../../../src/Common/ ./${main_directory}/src/."
doCmd "cp -r ../../../src/${src_directory}/ ./${main_directory}/src/."
+ # declaration types
+ printTo "> types/..."
+ doCmd "cp -r ../../../dist/${name}/Common/* ./${main_directory}/src/Common/."
+ doCmd "cp -r ../../../dist/${name}/${src_directory}/* ./${main_directory}/src/${src_directory}/."
+
# flag de compilation
doCmd 'find ./${main_directory}/src/ -type f -name "*.js" -exec sed -i "s/__FLAG_PLUGIN_CSS__/false/g" {} +'
@@ -164,8 +172,8 @@ while true; do
echo "Il faut au prealable construire les binaires :"
echo " > npm run build"
echo ""
- echo "Attention, la date et la version sont extraites du package.json principal."
- echo "Par contre, les dependances ne sont pas gérées par le script..."
+ echo "/!\ Attention, la date et la version sont extraites du package.json principal."
+ echo "Les dependances ne sont pas gérées par le script..."
echo ""
echo "Usage :"
echo " `basename $0` - construction du package TGZ à publier dans NPM"
@@ -176,7 +184,7 @@ while true; do
echo " -a build : All."
echo ""
echo "Par defaut, le repertoire n'est pas supprimé."
- echo "Le package validé, on se place dans le répertoire pour la publication :"
+ echo "(!) Le package validé, on se place dans le répertoire pour la publication :"
echo " > npm login"
echo " > npm publish"
exit 0
diff --git a/build/scripts/release/geoportal-extensions-itowns-2.3.9.tgz b/build/scripts/release/geoportal-extensions-itowns-2.3.9.tgz
new file mode 100644
index 000000000..9fd8bf096
Binary files /dev/null and b/build/scripts/release/geoportal-extensions-itowns-2.3.9.tgz differ
diff --git a/build/scripts/release/geoportal-extensions-leaflet-2.2.7.tgz b/build/scripts/release/geoportal-extensions-leaflet-2.2.7.tgz
new file mode 100644
index 000000000..3cdf65ce2
Binary files /dev/null and b/build/scripts/release/geoportal-extensions-leaflet-2.2.7.tgz differ
diff --git a/build/scripts/release/geoportal-extensions-openlayers-3.2.17.tgz b/build/scripts/release/geoportal-extensions-openlayers-3.2.17.tgz
index 0111e1f26..290d35709 100644
Binary files a/build/scripts/release/geoportal-extensions-openlayers-3.2.17.tgz and b/build/scripts/release/geoportal-extensions-openlayers-3.2.17.tgz differ
diff --git a/build/scripts/release/geoportal-extensions-openlayers-3.2.18.tgz b/build/scripts/release/geoportal-extensions-openlayers-3.2.18.tgz
new file mode 100644
index 000000000..70dcafbd1
Binary files /dev/null and b/build/scripts/release/geoportal-extensions-openlayers-3.2.18.tgz differ
diff --git a/build/scripts/release/package-itowns.json b/build/scripts/release/package-itowns.json
index e3f21516b..b8de5ab05 100644
--- a/build/scripts/release/package-itowns.json
+++ b/build/scripts/release/package-itowns.json
@@ -5,22 +5,22 @@
"javascript",
"Itowns"
],
- "main" : "dist/GpPluginItowns-src.js",
- "directories" : {},
- "description" : "French Geoportal Extensions for iTowns",
- "dependencies" : {
- "sortablejs" : "1.14.0",
- "loglevel" : "1.6.7",
- "geoportal-access-lib" : "3.2.0",
- "xmldom" : "^0.1.27",
- "node-fetch" : "^2.6.1",
- "three" : "0.137.5",
- "proj4" : "2.7.5",
- "itowns" : "2.38.2"
- },
"name" : "geoportal-extensions-itowns",
- "author" : "IGNF",
"peerDependencies" : {},
+ "bugs" : {},
+ "description" : "French Geoportal Extensions for iTowns",
+ "date" : "30/10/2022",
+ "license" : "CECILL-B",
+ "bundleDependencies" : [],
+ "repository" : {
+ "url" : "https://github.com/IGNF/geoportal-extensions.git",
+ "type" : "git"
+ },
+ "main" : "dist/GpPluginItowns-src.js",
+ "homepage" : "https://geoservices.ign.fr/documentation/utilisation_web/extension-itowns.html",
+ "scripts" : {},
+ "module" : "src/Itowns/index.js",
+ "types" : "src/Itowns/index.d.ts",
"files" : [
"dist/",
"src/",
@@ -28,17 +28,18 @@
"README.md",
"package.json"
],
- "license" : "CECILL-B",
- "scripts" : {},
- "module" : "src/Itowns/index.js",
- "bundleDependencies" : [],
- "date" : "04/10/2022",
- "homepage" : "https://geoservices.ign.fr/documentation/utilisation_web/extension-itowns.html",
- "repository" : {
- "url" : "https://github.com/IGNF/geoportal-extensions.git",
- "type" : "git"
+ "dependencies" : {
+ "xmldom" : "^0.1.27",
+ "proj4" : "2.7.5",
+ "loglevel" : "1.6.7",
+ "node-fetch" : "^2.6.1",
+ "itowns" : "2.38.2",
+ "geoportal-access-lib" : "3.2.0",
+ "sortablejs" : "1.14.0",
+ "three" : "0.137.5"
},
+ "version" : "2.3.9",
+ "directories" : {},
"devDependencies" : {},
- "bugs" : {},
- "version" : "2.3.8"
+ "author" : "IGNF"
}
diff --git a/build/scripts/release/package-leaflet.json b/build/scripts/release/package-leaflet.json
index af3b2be13..5274e522f 100644
--- a/build/scripts/release/package-leaflet.json
+++ b/build/scripts/release/package-leaflet.json
@@ -1,7 +1,10 @@
{
- "scripts" : {},
- "date" : "04/10/2022",
+ "bundleDependencies" : [],
+ "peerDependencies" : {},
+ "devDependencies" : {},
+ "homepage" : "https://geoservices.ign.fr/documentation/utilisation_web/extension-leaflet.html",
"bugs" : {},
+ "module" : "src/Leaflet/index.js",
"keywords" : [
"geoportail",
"plugin",
@@ -9,22 +12,7 @@
"leaflet",
"publish"
],
- "description" : "French Geoportal Extension for Leaflet",
- "version" : "2.2.5",
- "main" : "dist/GpPluginLeaflet-src.js",
- "peerDependencies" : {},
- "dependencies" : {
- "sortablejs" : "1.8.4",
- "geoportal-access-lib" : "3.2.0",
- "leaflet-draw" : "1.0.4",
- "loglevel" : "1.6.6",
- "node-fetch" : "^2.6.1",
- "proj4leaflet" : "1.0.2",
- "xmldom" : "^0.1.27",
- "leaflet" : "1.7.1",
- "proj4" : "2.7.5"
- },
- "module" : "src/Leaflet/index.js",
+ "directories" : {},
"files" : [
"dist/",
"src/",
@@ -32,14 +20,27 @@
"README.md",
"package.json"
],
- "homepage" : "https://geoservices.ign.fr/documentation/utilisation_web/extension-leaflet.html",
+ "types" : "src/Leaflet/index.d.ts",
+ "version" : "2.2.7",
+ "description" : "French Geoportal Extension for Leaflet",
+ "license" : "CECILL-B",
"repository" : {
- "type" : "git",
- "url" : "https://github.com/IGNF/geoportal-extensions.git"
+ "url" : "https://github.com/IGNF/geoportal-extensions.git",
+ "type" : "git"
},
- "devDependencies" : {},
- "directories" : {},
- "bundleDependencies" : [],
"name" : "geoportal-extensions-leaflet",
- "license" : "CECILL-B"
+ "date" : "30/10/2022",
+ "dependencies" : {
+ "geoportal-access-lib" : "3.2.0",
+ "leaflet" : "1.7.1",
+ "proj4" : "2.7.5",
+ "loglevel" : "1.6.6",
+ "sortablejs" : "1.8.4",
+ "xmldom" : "^0.1.27",
+ "node-fetch" : "^2.6.1",
+ "proj4leaflet" : "1.0.2",
+ "leaflet-draw" : "1.0.4"
+ },
+ "scripts" : {},
+ "main" : "dist/GpPluginLeaflet-src.js"
}
diff --git a/build/scripts/release/package-openlayers.json b/build/scripts/release/package-openlayers.json
index 36f20a378..51c4cfd9c 100644
--- a/build/scripts/release/package-openlayers.json
+++ b/build/scripts/release/package-openlayers.json
@@ -1,29 +1,18 @@
{
- "devDependencies" : {},
- "files" : [
- "dist/",
- "src/",
- "LICENCE.md",
- "README.md",
- "package.json"
- ],
- "bundleDependencies" : [],
+ "module" : "src/OpenLayers/index.js",
+ "peerDependencies" : {},
+ "date" : "18/11/2022",
"scripts" : {},
+ "types" : "src/OpenLayers/index.d.ts",
+ "devDependencies" : {},
"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",
+ "bugs" : {},
+ "name" : "geoportal-extensions-openlayers",
"license" : "CECILL-B",
+ "repository" : {
+ "url" : "https://github.com/IGNF/geoportal-extensions.git",
+ "type" : "git"
+ },
"keywords" : [
"geoportail",
"plugin",
@@ -31,16 +20,28 @@
"OpenLayers"
],
"author" : "IGNF",
- "peerDependencies" : {},
- "repository" : {
- "url" : "https://github.com/IGNF/geoportal-extensions.git",
- "type" : "git"
+ "main" : "dist/GpPluginOpenLayers-src.js",
+ "description" : "French Geoportal Extensions for OpenLayers",
+ "bundleDependencies" : [],
+ "dependencies" : {
+ "xmldom" : "^0.1.27",
+ "sortablejs" : "1.14.0",
+ "ol-mapbox-style" : "6.7.0",
+ "@mapbox/mapbox-gl-style-spec" : "13.20.1",
+ "eventbusjs" : "0.2.0",
+ "proj4" : "2.7.5",
+ "node-fetch" : "^2.6.1",
+ "ol" : "6.9.0",
+ "loglevel" : "1.6.6",
+ "geoportal-access-lib" : "3.2.0"
},
"homepage" : "https://geoservices.ign.fr/documentation/utilisation_web/extension-openlayers.html",
- "name" : "geoportal-extensions-openlayers",
- "main" : "dist/GpPluginOpenLayers-src.js",
- "version" : "3.2.17",
- "module" : "src/OpenLayers/index.js",
- "bugs" : {},
- "date" : "04/10/2022"
+ "files" : [
+ "dist/",
+ "src/",
+ "LICENCE.md",
+ "README.md",
+ "package.json"
+ ],
+ "version" : "3.2.18"
}
diff --git a/build/types/tsconfig-itowns.json b/build/types/tsconfig-itowns.json
new file mode 100644
index 000000000..9d0d6ebf1
--- /dev/null
+++ b/build/types/tsconfig-itowns.json
@@ -0,0 +1,28 @@
+{
+ // Change this to match your project
+ "include": ["../../src/Itowns/**/*.js", "../../src/Common/**/*.js"],
+ "compilerOptions": {
+ "target": "ES5",
+ "module": "es2015",
+ // Tells TypeScript to read JS files, as
+ // normally they are ignored as source files
+ "allowJs": true,
+ "checkJs": false,
+ "esModuleInterop": true,
+ "skipLibCheck": true,
+ // Generate d.ts files
+ "declaration": true,
+ // This compiler run should
+ // only output d.ts files
+ "emitDeclarationOnly": true,
+ // Types should go into this directory.
+ // Removing this would place the .d.ts files
+ // next to the .js files
+ "outDir": "../../dist/itowns/",
+ // "outFile": "../../dist/itowns/index.d.ts",
+ // go to js file when using IDE functions like
+ // "Go to Definition" in VSCode
+ "declarationMap": true,
+ "strict": true
+ }
+ }
\ No newline at end of file
diff --git a/build/types/tsconfig-leaflet.json b/build/types/tsconfig-leaflet.json
new file mode 100644
index 000000000..4d834f325
--- /dev/null
+++ b/build/types/tsconfig-leaflet.json
@@ -0,0 +1,28 @@
+{
+ // Change this to match your project
+ "include": ["../../src/Leaflet/**/*.js", "../../src/Common/**/*.js"],
+ "compilerOptions": {
+ "target": "ES5",
+ "module": "es2015",
+ // Tells TypeScript to read JS files, as
+ // normally they are ignored as source files
+ "allowJs": true,
+ "checkJs": false,
+ "esModuleInterop": true,
+ "skipLibCheck": true,
+ // Generate d.ts files
+ "declaration": true,
+ // This compiler run should
+ // only output d.ts files
+ "emitDeclarationOnly": true,
+ // Types should go into this directory.
+ // Removing this would place the .d.ts files
+ // next to the .js files
+ "outDir": "../../dist/leaflet/",
+ // "outFile": "../../dist/leaflet/index.d.ts",
+ // go to js file when using IDE functions like
+ // "Go to Definition" in VSCode
+ "declarationMap": true,
+ "strict": true
+ }
+ }
\ No newline at end of file
diff --git a/build/types/tsconfig-openlayers.json b/build/types/tsconfig-openlayers.json
new file mode 100644
index 000000000..7b5b8bbaf
--- /dev/null
+++ b/build/types/tsconfig-openlayers.json
@@ -0,0 +1,28 @@
+{
+ // Change this to match your project
+ "include": ["../../src/OpenLayers/**/*.js", "../../src/Common/**/*.js"],
+ "compilerOptions": {
+ "target": "ES5",
+ "module": "es2015",
+ // Tells TypeScript to read JS files, as
+ // normally they are ignored as source files
+ "allowJs": true,
+ "checkJs": false,
+ "esModuleInterop": true,
+ "skipLibCheck": true,
+ // Generate d.ts files
+ "declaration": true,
+ // This compiler run should
+ // only output d.ts files
+ "emitDeclarationOnly": true,
+ // Types should go into this directory.
+ // Removing this would place the .d.ts files
+ // next to the .js files
+ "outDir": "../../dist/openlayers/",
+ // "outFile": "../../dist/openlayers/index.d.ts",
+ // go to js file when using IDE functions like
+ // "Go to Definition" in VSCode
+ "declarationMap": true,
+ "strict": true
+ }
+ }
\ No newline at end of file
diff --git a/doc/CHANGELOG-leaflet.md b/doc/CHANGELOG-leaflet.md
index 4d3893f94..fa3e862cf 100644
--- a/doc/CHANGELOG-leaflet.md
+++ b/doc/CHANGELOG-leaflet.md
@@ -78,6 +78,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- [Extension Geoportail Leaflet, version 2.2.5](#extension-geoportail-leaflet-version-225)
* [Summary](#summary-22)
* [Changelog](#changelog-19)
+- [Extension Geoportail Leaflet, version 2.2.7](#extension-geoportail-leaflet-version-227)
+ * [Summary](#summary-23)
+ * [Changelog](#changelog-20)
@@ -696,3 +699,26 @@ Utilisation du Geocodage v2
* [Security]
---
+# Extension Geoportail Leaflet, version 2.2.7
+
+**30/10/2022**
+> Release Extension Geoportail leaflet
+
+## Summary
+
+## Changelog
+
+* [Added]
+
+* [Changed]
+
+* [Deprecated]
+
+* [Removed]
+
+* [Fixed]
+ - Calcul d'itinéraire fonctionnel
+
+* [Security]
+
+---
diff --git a/package.json b/package.json
index e7ade54e1..fd5727aa2 100644
--- a/package.json
+++ b/package.json
@@ -2,14 +2,15 @@
"name": "geoportal-extensions",
"description": "French Geoportal Extensions for OpenLayers, Leaflet and iTowns libraries",
"version": "2.7.2",
- "date": "30/10/2022",
+ "date": "18/11/2022",
"leafletExtName": "French Geoportal Extension for Leaflet",
"leafletExtVersion": "2.2.7",
"olExtName": "French Geoportal Extension for OpenLayers",
- "olExtVersion": "3.2.17",
+ "olExtVersion": "3.2.18",
"itownsExtName": "French Geoportal Extension for Itowns",
"itownsExtVersion": "2.3.9",
"main": "dist/leaflet/GpPluginLeaflet.js, dist/openlayers/GpPluginOpenLayers.js, dist/itowns/GpPluginItowns.js",
+ "types": "dist/leaflet/index.d.ts, dist/openlayers/index.d.ts, dist/itowns/index.d.ts",
"module": "src/Leaflet/index.js, src/OpenLayers/index.js, src/Itowns/index.js",
"directories": {},
"scripts": {
@@ -23,6 +24,12 @@
"sample:itowns:serve": "webpack-dev-server --config build/webpack/webpack.config.itowns --mode=development --https --open-page samples/index-itowns-map.html --content-base . --output-public-path '/dist/itowns/' --port 9001 --open",
"sample:leaflet:serve": "webpack-dev-server --config build/webpack/webpack.config.leaflet --mode=development --https --open-page samples/index-leaflet-map.html --content-base . --output-public-path '/dist/leaflet/' --port 9001 --open",
"sample:ol:serve": "webpack-dev-server --config build/webpack/webpack.config.openlayers --mode=development --https --open-page samples/index-openlayers-map.html --content-base . --output-public-path '/dist/openlayers/' --port 9001 --open",
+ "generate-types:ol": "npx tsc -p build/types/tsconfig-openlayers.json",
+ "generate-types:leaflet": "npx tsc -p build/types/tsconfig-leaflet.json",
+ "generate-types:itowns": "npx tsc -p build/types/tsconfig-itowns.json",
+ "generate-jsdoc:ol": "jsdoc -c build/jsdoc/jsdoc-openlayers.json",
+ "generate-jsdoc:leaflet": "jsdoc -c build/jsdoc/jsdoc-leaflet.json",
+ "generate-jsdoc:itowns": "jsdoc -c build/jsdoc/jsdoc-itowns.json",
"doc": "npm run doc:serve",
"doc:serve": "npm run doc:ol:serve",
"doc:itowns:serve": "webpack-dev-server --hot --config build/webpack/webpack.config.itowns --content-base jsdoc/itowns --port 9001 --open",
@@ -78,6 +85,7 @@
"proj4leaflet": "1.0.2",
"sortablejs": "1.14.0",
"three": "0.137.5",
+ "typescript": "^4.5.5",
"whatwg-fetch": "3.0.0"
},
"devDependencies": {
diff --git a/samples-src/pages/leaflet/Layers/pages-leaflet-wmts-bundle-L93.html b/samples-src/pages/leaflet/Layers/pages-leaflet-wmts-bundle-L93.html
index e06ef98ed..eee22ef2f 100644
--- a/samples-src/pages/leaflet/Layers/pages-leaflet-wmts-bundle-L93.html
+++ b/samples-src/pages/leaflet/Layers/pages-leaflet-wmts-bundle-L93.html
@@ -25,7 +25,9 @@
Ajout d'une couche WMTS
window.onload = function () {
var wmts = L.geoportalLayer.WMTS({
- layer : "ORTHOIMAGERY.ORTHOPHOTOS.BDORTHO.L93"
+ layer : "CADASTRALPARCELS.PARCELS.L93"
+ }, {
+ format: "image/png"
});
var map = L.map("map", {
diff --git a/samples-src/pages/openlayers/LayerImport/pages-ol-layerimport-bundle-mapbox-event-fail-source.html b/samples-src/pages/openlayers/LayerImport/pages-ol-layerimport-bundle-mapbox-event-fail-source.html
new file mode 100644
index 000000000..a764c97d0
--- /dev/null
+++ b/samples-src/pages/openlayers/LayerImport/pages-ol-layerimport-bundle-mapbox-event-fail-source.html
@@ -0,0 +1,93 @@
+{{#extend "ol-sample-bundle-layout"}}
+
+{{#content "head"}}
+ Sample openlayers LayerImport
+{{/content}}
+
+{{#content "style"}}
+
+{{/content}}
+
+{{#content "body"}}
+ Ajout du widget d'import de couches sur un service MapBox
+ Gestion des exceptions de chargement des styles
+ Niveau de zoom : ?
+
+
+
+ Ouvrir la console pour visualiser l'exception : "Il n'existe pas de styles pour la source demandée !?"
+
+{{/content}}
+
+{{#content "js"}}
+
+{{/content}}
+{{/extend}}
diff --git a/samples-src/pages/openlayers/LayerImport/pages-ol-layerimport-bundle-mapbox-event-fail-sprites.html b/samples-src/pages/openlayers/LayerImport/pages-ol-layerimport-bundle-mapbox-event-fail-sprites.html
new file mode 100644
index 000000000..96acc667e
--- /dev/null
+++ b/samples-src/pages/openlayers/LayerImport/pages-ol-layerimport-bundle-mapbox-event-fail-sprites.html
@@ -0,0 +1,92 @@
+{{#extend "ol-sample-bundle-layout"}}
+
+{{#content "head"}}
+ Sample openlayers LayerImport
+{{/content}}
+
+{{#content "style"}}
+
+{{/content}}
+
+{{#content "body"}}
+ Ajout du widget d'import de couches sur un service MapBox
+ Gestion des exceptions de chargement des styles
+ Niveau de zoom : ?
+
+
+
+ Ouvrir la console pour visualiser l'exception : "Problem fetching sprite from toto.json: Not Found"
+{{/content}}
+
+{{#content "js"}}
+
+{{/content}}
+{{/extend}}
diff --git a/samples-src/pages/openlayers/LayerImport/pages-ol-layerimport-bundle-mapbox-event-fail-syntax.html b/samples-src/pages/openlayers/LayerImport/pages-ol-layerimport-bundle-mapbox-event-fail-syntax.html
new file mode 100644
index 000000000..b29473480
--- /dev/null
+++ b/samples-src/pages/openlayers/LayerImport/pages-ol-layerimport-bundle-mapbox-event-fail-syntax.html
@@ -0,0 +1,92 @@
+{{#extend "ol-sample-bundle-layout"}}
+
+{{#content "head"}}
+ Sample openlayers LayerImport
+{{/content}}
+
+{{#content "style"}}
+
+{{/content}}
+
+{{#content "body"}}
+ Ajout du widget d'import de couches sur un service MapBox
+ Gestion des exceptions de chargement des styles
+ Niveau de zoom : ?
+
+
+
+ Ouvrir la console pour visualiser l'exception : "glStyle version 8 required."
+{{/content}}
+
+{{#content "js"}}
+
+{{/content}}
+{{/extend}}
diff --git a/samples-src/pages/openlayers/LayerImport/pages-ol-layerimport-bundle-mapbox-planign-1.html b/samples-src/pages/openlayers/LayerImport/pages-ol-layerimport-bundle-mapbox-planign-1.html
index 02b2a5ad4..ecf68d605 100644
--- a/samples-src/pages/openlayers/LayerImport/pages-ol-layerimport-bundle-mapbox-planign-1.html
+++ b/samples-src/pages/openlayers/LayerImport/pages-ol-layerimport-bundle-mapbox-planign-1.html
@@ -69,6 +69,15 @@ Ajout du widget d'import de couches sur un service MapBox de type TileJSON
var zoom = map.getView().getZoom();
zoomContainer.innerHTML = zoom;
});
+ map.on("editor:loaded", function (e) {
+ console.info(e);
+ })
+ map.on("render:failure", function (e) {
+ console.error("Exception capturée (render):", e);
+ })
+ map.on("render:success", function (e) {
+ console.info(e);
+ })
};
diff --git a/samples-src/resources/data/mapbox/styles/bati_failed_source.json b/samples-src/resources/data/mapbox/styles/bati_failed_source.json
new file mode 100644
index 000000000..e12650de5
--- /dev/null
+++ b/samples-src/resources/data/mapbox/styles/bati_failed_source.json
@@ -0,0 +1,919 @@
+{
+ "version": 8,
+ "name": "BDTOPO",
+ "glyphs": "https://wxs.ign.fr/static/vectorTiles/fonts/{fontstack}/{range}.pbf",
+ "metadata": {"maputnik:renderer": "ol"},
+ "sources": {
+ "toto": {
+ "type": "vector",
+ "tiles": [
+ "https://wxs.ign.fr/latuile/geoportail/tms/1.0.0/BDTOPO/{z}/{x}/{y}.pbf"
+ ],
+ "scheme": "tms",
+ "url":"https://wxs.ign.fr/latuile/geoportail/tms/1.0.0/BDTOPO/metadata.json"
+ }
+ },
+ "transition": {
+ "duration": 300,
+ "delay": 0
+ },
+ "layers": [
+ {
+ "id": "ligne_orographique",
+ "type": "line",
+ "source": "bdtopo",
+ "source-layer": "ligne_orographique",
+ "paint": {
+ "line-color": "#ffa500",
+ "line-width": 2
+ },
+ "minzoom": 14
+ },
+ {
+ "id": "reservoir_surf",
+ "type": "fill",
+ "source": "bdtopo",
+ "source-layer": "reservoir",
+ "paint": {"fill-color": "#1bbfd1"},
+ "minzoom": 14
+ },
+ {
+ "id": "reservoir_limites",
+ "type": "line",
+ "source": "bdtopo",
+ "source-layer": "reservoir",
+ "paint": {"line-color": "#666666"},
+ "minzoom": 14
+ },
+ {
+ "id": "construction_surfacique_surf",
+ "type": "fill",
+ "source": "bdtopo",
+ "source-layer": "construction_surfacique",
+ "paint": {"fill-color": "#1bbfd1"},
+ "minzoom": 14
+ },
+ {
+ "id": "construction_surfacique_limites",
+ "type": "line",
+ "source": "bdtopo",
+ "source-layer": "construction_surfacique",
+ "paint": {"line-color": "#666666"},
+ "minzoom": 14
+ },
+ {
+ "id": "construction_lineaire",
+ "type": "line",
+ "source": "bdtopo",
+ "source-layer": "construction_lineaire",
+ "paint": {
+ "line-color": "#9012f6",
+ "line-width": 2
+ },
+ "layout": {"line-join": "bevel"},
+ "minzoom": 14
+ },
+ {
+ "id": "batiment_residentiel_surf",
+ "type": "fill",
+ "source": "bdtopo",
+ "source-layer": "batiment",
+ "minzoom": 14,
+ "filter": [
+ "==",
+ "usage_1",
+ "Résidentiel"
+ ],
+ "paint": {
+ "fill-color": "#ff6dee"
+ }
+ },
+ {
+ "id": "batiment_residentiel_limites",
+ "type": "line",
+ "source": "bdtopo",
+ "source-layer": "batiment",
+ "minzoom": 14,
+ "filter": [
+ "==",
+ "usage_1",
+ "Résidentiel"
+ ],
+ "paint": {
+ "line-color": "#c421dd"
+ }
+ },
+ {
+ "id": "batiment_annexe_surf",
+ "type": "fill",
+ "source": "bdtopo",
+ "source-layer": "batiment",
+ "minzoom": 14,
+ "filter": [
+ "==",
+ "usage_1",
+ "Annexe"
+ ],
+ "paint": {
+ "fill-color": "#4dc1eb"
+ }
+ },
+ {
+ "id": "batiment_annexe_limites",
+ "type": "line",
+ "source": "bdtopo",
+ "source-layer": "batiment",
+ "minzoom": 14,
+ "filter": [
+ "==",
+ "usage_1",
+ "Annexe"
+ ],
+ "paint": {
+ "line-color": "#3f42e7"
+ }
+ },
+ {
+ "id": "batiment_agricole_surf",
+ "type": "fill",
+ "source": "bdtopo",
+ "source-layer": "batiment",
+ "minzoom": 14,
+ "filter": [
+ "==",
+ "usage_1",
+ "Agricole"
+ ],
+ "paint": {
+ "fill-color": "#12e759"
+ }
+ },
+ {
+ "id": "batiment_agricole_limites",
+ "type": "line",
+ "source": "bdtopo",
+ "source-layer": "batiment",
+ "minzoom": 14,
+ "filter": [
+ "==",
+ "usage_1",
+ "Agricole"
+ ],
+ "paint": {
+ "line-color": "#028e17"
+ }
+ },
+ {
+ "id": "batiment_commercial_et_services_surf",
+ "type": "fill",
+ "source": "bdtopo",
+ "source-layer": "batiment",
+ "minzoom": 14,
+ "filter": [
+ "==",
+ "usage_1",
+ "Commercial et services"
+ ],
+ "paint": {
+ "fill-color": "#bcbcbc"
+ }
+ },
+ {
+ "id": "batiment_commercial_et_services_limites",
+ "type": "line",
+ "source": "bdtopo",
+ "source-layer": "batiment",
+ "minzoom": 14,
+ "filter": [
+ "==",
+ "usage_1",
+ "Commercial et services"
+ ],
+ "paint": {
+ "line-color": "#000000"
+ }
+ },
+ {
+ "id": "batiment_industriel_surf",
+ "type": "fill",
+ "source": "bdtopo",
+ "source-layer": "batiment",
+ "minzoom": 14,
+ "filter": [
+ "==",
+ "usage_1",
+ "Industriel"
+ ],
+ "paint": {
+ "fill-color": "#c03a78"
+ }
+ },
+ {
+ "id": "batiment_industriel_limites",
+ "type": "line",
+ "source": "bdtopo",
+ "source-layer": "batiment",
+ "minzoom": 14,
+ "filter": [
+ "==",
+ "usage_1",
+ "Industriel"
+ ],
+ "paint": {
+ "line-color": "#6c2727"
+ }
+ },
+ {
+ "id": "batiment_sportif_surf",
+ "type": "fill",
+ "source": "bdtopo",
+ "source-layer": "batiment",
+ "minzoom": 14,
+ "filter": [
+ "==",
+ "usage_1",
+ "Sportif"
+ ],
+ "paint": {
+ "fill-color": "#f3e544"
+ }
+ },
+ {
+ "id": "batiment_sportif_limites",
+ "type": "line",
+ "source": "bdtopo",
+ "source-layer": "batiment",
+ "minzoom": 14,
+ "filter": [
+ "==",
+ "usage_1",
+ "Sportif"
+ ],
+ "paint": {
+ "line-color": "#b59402"
+ }
+ },
+ {
+ "id": "batiment_religieux_surf",
+ "type": "fill",
+ "source": "bdtopo",
+ "source-layer": "batiment",
+ "minzoom": 14,
+ "filter": [
+ "==",
+ "usage_1",
+ "Religieux"
+ ],
+ "paint": {
+ "fill-color": "#c03a78"
+ }
+ },
+ {
+ "id": "batiment_religieux_limites",
+ "type": "line",
+ "source": "bdtopo",
+ "source-layer": "batiment",
+ "minzoom": 14,
+ "filter": [
+ "==",
+ "usage_1",
+ "Religieux"
+ ],
+ "paint": {
+ "line-color": "#6c2727"
+ }
+ },
+ {
+ "id": "batiment_indifferencie_surf",
+ "type": "fill",
+ "source": "bdtopo",
+ "source-layer": "batiment",
+ "minzoom": 14,
+ "filter": [
+ "==",
+ "usage_1",
+ "Indifférencié"
+ ],
+ "paint": {
+ "fill-color": "#c03a78"
+ }
+ },
+ {
+ "id": "batiment_indifferencie_limites",
+ "type": "line",
+ "source": "bdtopo",
+ "source-layer": "batiment",
+ "minzoom": 14,
+ "filter": [
+ "==",
+ "usage_1",
+ "Indifférencié"
+ ],
+ "paint": {
+ "line-color": "#6c2727"
+ }
+ },
+ {
+ "id": "cimetiere_limites",
+ "type": "line",
+ "source": "bdtopo",
+ "source-layer": "cimetiere",
+ "minzoom": 14,
+ "paint": {
+ "line-color": "#505050"
+ }
+ },
+ {
+ "id": "cimetiere_surf",
+ "type": "fill",
+ "source": "bdtopo",
+ "source-layer": "cimetiere",
+ "minzoom": 14,
+ "paint": {
+ "fill-pattern": "cimetiere"
+ }
+ },
+ {
+ "id": "construction_ponctuelle",
+ "type": "symbol",
+ "source": "bdtopo",
+ "source-layer": "construction_ponctuelle",
+ "minzoom": 14,
+ "layout": {
+ "icon-image": "construction_ponctuelle",
+ "icon-size": 1
+ }
+ },
+
+ {
+ "id": "piste_d_aerodrome_surf",
+ "type": "fill",
+ "source": "bdtopo",
+ "source-layer": "piste_d_aerodrome",
+ "minzoom": 14,
+ "paint": {
+ "fill-color": "#cbcbcb"
+ }
+ },
+ {
+ "id": "piste_d_aerodrome_limites",
+ "type": "line",
+ "source": "bdtopo",
+ "source-layer": "piste_d_aerodrome",
+ "minzoom": 14,
+ "paint": {
+ "line-color": "#000000",
+ "line-width": 1
+ }
+ },
+ {
+ "id": "equipement_de_transport",
+ "type": "line",
+ "source": "bdtopo",
+ "source-layer": "equipement_de_transport",
+ "minzoom": 15,
+ "paint": {
+ "line-color": "#000000",
+ "line-width": 1
+ }
+ },
+ {
+ "id": "aerogare",
+ "type": "fill",
+ "source": "bdtopo",
+ "source-layer": "equipement_de_transport",
+ "minzoom": 15,
+ "filter": [
+ "==",
+ "nature",
+ "Aérogare"
+ ],
+ "paint": {
+ "fill-color": "#e53d24"
+ }
+ },
+ {
+ "id": "aire_de_repos_ou_de_service",
+ "type": "fill",
+ "source": "bdtopo",
+ "source-layer": "equipement_de_transport",
+ "minzoom": 15,
+ "filter": [
+ "==",
+ "nature",
+ "Aire de repos ou de service"
+ ],
+ "paint": {
+ "fill-color": "#5499e3"
+ }
+ },
+ {
+ "id": "aire_de_triage",
+ "type": "fill",
+ "source": "bdtopo",
+ "source-layer": "equipement_de_transport",
+ "minzoom": 15,
+ "filter": [
+ "==",
+ "nature",
+ "Aire de triage"
+ ],
+ "paint": {
+ "fill-color": "#839994"
+ }
+ },
+ {
+ "id": "arret_de_voyageur",
+ "type": "fill",
+ "source": "bdtopo",
+ "source-layer": "equipement_de_transport",
+ "minzoom": 15,
+ "filter": [
+ "==",
+ "nature",
+ "Arrêt voyageurs"
+ ],
+ "paint": {
+ "fill-color": "#5428d9"
+ }
+ },
+ {
+ "id": "autre_equipement",
+ "type": "fill",
+ "source": "bdtopo",
+ "source-layer": "equipement_de_transport",
+ "minzoom": 15,
+ "filter": [
+ "==",
+ "nature",
+ "Autre équipement"
+ ],
+ "paint": {
+ "fill-color": "#ca5324"
+ }
+ },
+ {
+ "id": "carrefour",
+ "type": "fill",
+ "source": "bdtopo",
+ "source-layer": "equipement_de_transport",
+ "minzoom": 15,
+ "filter": [
+ "==",
+ "nature",
+ "Carrefour"
+ ],
+ "paint": {
+ "fill-color": "#1dc04e"
+ }
+ },
+ {
+ "id": "gare_fret_uniquement",
+ "type": "fill",
+ "source": "bdtopo",
+ "source-layer": "equipement_de_transport",
+ "minzoom": 15,
+ "filter": [
+ "==",
+ "nature",
+ "Gare fret uniquement"
+ ],
+ "paint": {
+ "fill-color": "#d29f6d"
+ }
+ },
+ {
+ "id": "gare_routiere",
+ "type": "fill",
+ "source": "bdtopo",
+ "source-layer": "equipement_de_transport",
+ "minzoom": 15,
+ "filter": [
+ "==",
+ "nature",
+ "Gare routière"
+ ],
+ "paint": {
+ "fill-color": "#df0f0f"
+ }
+ },
+ {
+ "id": "gare_voyageurs_et_fret",
+ "type": "fill",
+ "source": "bdtopo",
+ "source-layer": "equipement_de_transport",
+ "minzoom": 15,
+ "filter": [
+ "==",
+ "nature",
+ "Gare voyageurs et fret"
+ ],
+ "paint": {
+ "fill-color": "#2943ea"
+ }
+ },
+ {
+ "id": "gare_voyageurs_uniquement",
+ "type": "fill",
+ "source": "bdtopo",
+ "source-layer": "equipement_de_transport",
+ "minzoom": 15,
+ "filter": [
+ "==",
+ "nature",
+ "Gare voyageurs uniquement"
+ ],
+ "paint": {
+ "fill-color": "#712a9c"
+ }
+ },
+ {
+ "id": "parking",
+ "type": "fill",
+ "source": "bdtopo",
+ "source-layer": "equipement_de_transport",
+ "minzoom": 15,
+ "filter": [
+ "==",
+ "nature",
+ "Parking"
+ ],
+ "paint": {
+ "fill-color": "#901d92"
+ }
+ },
+ {
+ "id": "peage",
+ "type": "fill",
+ "source": "bdtopo",
+ "source-layer": "equipement_de_transport",
+ "minzoom": 15,
+ "filter": [
+ "==",
+ "nature",
+ "Péage"
+ ],
+ "paint": {
+ "fill-color": "#6da0de"
+ }
+ },
+ {
+ "id": "gare_maritime",
+ "type": "fill",
+ "source": "bdtopo",
+ "source-layer": "equipement_de_transport",
+ "minzoom": 15,
+ "filter": [
+ "==",
+ "nature",
+ "Gare maritime"
+ ],
+ "paint": {
+ "fill-color": "#233fdd"
+ }
+ },
+ {
+ "id": "port",
+ "type": "fill",
+ "source": "bdtopo",
+ "source-layer": "equipement_de_transport",
+ "minzoom": 15,
+ "filter": [
+ "==",
+ "nature",
+ "Port"
+ ],
+ "paint": {
+ "fill-color": "#367ada"
+ }
+ },
+ {
+ "id": "station_de_metro",
+ "type": "fill",
+ "source": "bdtopo",
+ "source-layer": "equipement_de_transport",
+ "minzoom": 15,
+ "filter": [
+ "==",
+ "nature",
+ "Station de métro"
+ ],
+ "paint": {
+ "fill-color": "#66c4d0"
+ }
+ },
+ {
+ "id": "station_de_tramway",
+ "type": "fill",
+ "source": "bdtopo",
+ "source-layer": "equipement_de_transport",
+ "minzoom": 15,
+ "filter": [
+ "==",
+ "nature",
+ "Station de tramway"
+ ],
+ "paint": {
+ "fill-color": "#b072a9"
+ }
+ },
+ {
+ "id": "tour_de_controle_aerien",
+ "type": "fill",
+ "source": "bdtopo",
+ "source-layer": "equipement_de_transport",
+ "minzoom": 15,
+ "filter": [
+ "==",
+ "nature",
+ "Tour de contrôle aérien"
+ ],
+ "paint": {
+ "fill-color": "#aadd0f"
+ }
+ },
+ {
+ "id": "gare_telepherique",
+ "type": "fill",
+ "source": "bdtopo",
+ "source-layer": "equipement_de_transport",
+ "minzoom": 15,
+ "filter": [
+ "==",
+ "nature",
+ "Gare téléphérique"
+ ],
+ "paint": {
+ "fill-color": "#c49c61"
+ }
+ },
+ {
+ "id": "aerodrome_limites",
+ "type": "line",
+ "source": "bdtopo",
+ "source-layer": "aerodrome",
+ "minzoom": 13,
+ "paint": {
+ "line-color": "#000000",
+ "line-width": 1
+ }
+ },
+ {
+ "id": "altiport",
+ "type": "fill",
+ "source": "bdtopo",
+ "source-layer": "aerodrome",
+ "minzoom": 13,
+ "filter": [
+ "==",
+ "nature",
+ "Altiport"
+ ],
+ "paint": {
+ "fill-color": "#70d7bf"
+ }
+ },
+ {
+ "id": "aerodrome_surf",
+ "type": "fill",
+ "source": "bdtopo",
+ "source-layer": "aerodrome",
+ "minzoom": 13,
+ "filter": [
+ "==",
+ "nature",
+ "Aérodrome"
+ ],
+ "paint": {
+ "fill-color": "#e7c8cd"
+ }
+ },
+ {
+ "id": "heliport_surf",
+ "type": "fill",
+ "source": "bdtopo",
+ "source-layer": "aerodrome",
+ "minzoom": 13,
+ "filter": [
+ "==",
+ "nature",
+ "Héliport"
+ ],
+ "paint": {
+ "fill-color": "#ff9b79"
+ }
+ },
+ {
+ "id": "transport_par_cable_dash",
+ "type": "line",
+ "source": "bdtopo",
+ "source-layer": "transport_par_cable",
+ "minzoom": 1,
+ "paint": {
+ "line-color": "rgba(0, 0, 0, 1)",
+ "line-dasharray": [0.1, 0.8],
+ "line-width": 15
+ }
+ },
+ {
+ "id": "transport_par_cable_line",
+ "type": "line",
+ "source": "bdtopo",
+ "source-layer": "transport_par_cable",
+ "minzoom": 1,
+ "paint": {
+ "line-color": "rgba(0, 0, 0, 1)",
+ "line-width": 2.5
+ }
+ },
+ {
+ "id": "ligne_electrique",
+ "type": "line",
+ "source": "bdtopo",
+ "minzoom": 12,
+ "paint": {"line-color": "#cc00cc"},
+ "layout": {"visibility": "visible"},
+ "source-layer": "ligne_electrique"
+ },
+ {
+ "id": "erp",
+ "type": "symbol",
+ "source": "bdtopo",
+ "source-layer": "erp",
+ "minzoom": 19,
+ "layout": {
+ "icon-image": "erp",
+ "icon-size": 1.5
+ }
+ },
+ {
+ "id": "pylone",
+ "type": "symbol",
+ "source": "bdtopo",
+ "source-layer": "pylone",
+ "minzoom": 14,
+ "layout": {
+ "icon-image": "pylone",
+ "icon-size": 1
+ }
+ },
+ {
+ "id": "terrain_de_sport_surf",
+ "type": "fill",
+ "source": "bdtopo",
+ "source-layer": "terrain_de_sport",
+ "paint": {"fill-color": "#7dff9e"},
+ "minzoom": 14
+ },
+ {
+ "id": "terrain_de_sport_limites",
+ "type": "line",
+ "source": "bdtopo",
+ "source-layer": "terrain_de_sport",
+ "minzoom": 14,
+ "paint": {
+ "line-color": "#0e9652",
+ "line-width": 1
+ }
+ },
+ {
+ "id": "region_limites",
+ "type": "line",
+ "paint": {
+ "line-color": "rgba(0, 0, 0, 1)",
+ "line-width": 2
+ },
+ "source": "bdtopo",
+ "source-layer": "region",
+ "layout": {"line-join": "bevel"}
+ },
+ {
+ "id": "departement_limites",
+ "type": "line",
+ "source": "bdtopo",
+ "source-layer": "departement",
+ "minzoom": 2,
+ "maxzoom": 12,
+ "paint": {
+ "line-width": 0.75,
+ "line-color": "#000000"
+ }
+ },
+ {
+ "id": "epci_limites",
+ "type": "line",
+ "source": "bdtopo",
+ "source-layer": "epci",
+ "paint": {
+ "line-width": 1.8,
+ "line-color": "#1f78b4"
+ },
+ "minzoom": 10,
+ "maxzoom": 13
+ },
+ {
+ "id": "arrondissement_limites",
+ "type": "line",
+ "source": "bdtopo",
+ "source-layer": "arrondissement",
+ "paint": {
+ "line-color": "#666666",
+ "line-dasharray": [18, 6],
+ "line-width": 0.75
+ },
+ "minzoom": 11,
+ "layout": {"line-join": "bevel"}
+ },
+ {
+ "id": "commune_limites",
+ "type": "line",
+ "source": "bdtopo",
+ "source-layer": "commune",
+ "paint": {
+ "line-color": "#999999",
+ "line-dasharray": [2, 4, 6, 4],
+ "line-width": 0.75
+ },
+ "minzoom": 11,
+ "layout": {"line-join": "bevel"}
+ },{
+ "id": "region_labels",
+ "type": "symbol",
+ "source": "bdtopo",
+ "source-layer": "region",
+ "layout": {
+ "text-field": "{nom_officiel}",
+ "text-size": 20,
+ "text-font": ["Ubuntu Regular"]
+ },
+ "minzoom": 1,
+ "maxzoom": 7
+ },
+ {
+ "id": "departement_labels",
+ "type": "symbol",
+ "source": "bdtopo",
+ "source-layer": "departement",
+ "layout": {
+ "text-field": "{nom_officiel}",
+ "text-font": ["Ubuntu Regular"],
+ "text-size": 20
+ },
+ "maxzoom": 10,
+ "minzoom": 7
+ },
+ {
+ "id": "epci_labels",
+ "type": "symbol",
+ "source": "bdtopo",
+ "source-layer": "epci",
+ "layout": {
+ "text-field": "{nom_officiel}",
+ "text-font": ["Ubuntu Bold Italic"],
+ "text-size": 16,
+ "text-allow-overlap": false,
+ "text-ignore-placement": false,
+ "icon-text-fit": "none"
+ },
+ "paint": {
+ "text-color": "#1f78b4",
+ "text-halo-color": "rgba(255, 255, 255, 1)",
+ "text-halo-width": 5
+ },
+ "minzoom": 10,
+ "maxzoom": 13
+ },
+ {
+ "id": "arrondissement_labels",
+ "type": "symbol",
+ "source": "bdtopo",
+ "source-layer": "arrondissement",
+ "minzoom": 15,
+ "layout": {
+ "text-field": "{nom_officiel}",
+ "text-font": ["Ubuntu Italic"]
+ },
+ "paint": {
+ "text-color": "rgba(0, 0, 0, 1)",
+ "text-halo-width": 1,
+ "text-halo-color": "rgba(255, 255, 255, 1)"
+ }
+ },
+ {
+ "id": "commune_labels",
+ "type": "symbol",
+ "source": "bdtopo",
+ "source-layer": "commune",
+ "minzoom": 12,
+ "layout": {
+ "text-field": "{nom_officiel}",
+ "text-font": ["Ubuntu Regular"]
+ },
+ "paint": {
+ "text-color": "rgba(0, 0, 0, 1)",
+ "text-halo-width": 5,
+ "text-halo-color": "rgba(255, 255, 255, 1)"
+ }
+ }
+ ]
+}
diff --git a/samples-src/resources/data/mapbox/styles/bati_failed_sprites.json b/samples-src/resources/data/mapbox/styles/bati_failed_sprites.json
new file mode 100644
index 000000000..2edd43649
--- /dev/null
+++ b/samples-src/resources/data/mapbox/styles/bati_failed_sprites.json
@@ -0,0 +1,920 @@
+{
+ "version": 8,
+ "name": "BDTOPO",
+ "glyphs": "https://wxs.ign.fr/static/vectorTiles/fonts/{fontstack}/{range}.pbf",
+ "sprite": "toto",
+ "metadata": {"maputnik:renderer": "ol"},
+ "sources": {
+ "bdtopo": {
+ "type": "vector",
+ "tiles": [
+ "https://wxs.ign.fr/latuile/geoportail/tms/1.0.0/BDTOPO/{z}/{x}/{y}.pbf"
+ ],
+ "scheme": "tms",
+ "url":"https://wxs.ign.fr/latuile/geoportail/tms/1.0.0/BDTOPO/metadata.json"
+ }
+ },
+ "transition": {
+ "duration": 300,
+ "delay": 0
+ },
+ "layers": [
+ {
+ "id": "ligne_orographique",
+ "type": "line",
+ "source": "bdtopo",
+ "source-layer": "ligne_orographique",
+ "paint": {
+ "line-color": "#ffa500",
+ "line-width": 2
+ },
+ "minzoom": 14
+ },
+ {
+ "id": "reservoir_surf",
+ "type": "fill",
+ "source": "bdtopo",
+ "source-layer": "reservoir",
+ "paint": {"fill-color": "#1bbfd1"},
+ "minzoom": 14
+ },
+ {
+ "id": "reservoir_limites",
+ "type": "line",
+ "source": "bdtopo",
+ "source-layer": "reservoir",
+ "paint": {"line-color": "#666666"},
+ "minzoom": 14
+ },
+ {
+ "id": "construction_surfacique_surf",
+ "type": "fill",
+ "source": "bdtopo",
+ "source-layer": "construction_surfacique",
+ "paint": {"fill-color": "#1bbfd1"},
+ "minzoom": 14
+ },
+ {
+ "id": "construction_surfacique_limites",
+ "type": "line",
+ "source": "bdtopo",
+ "source-layer": "construction_surfacique",
+ "paint": {"line-color": "#666666"},
+ "minzoom": 14
+ },
+ {
+ "id": "construction_lineaire",
+ "type": "line",
+ "source": "bdtopo",
+ "source-layer": "construction_lineaire",
+ "paint": {
+ "line-color": "#9012f6",
+ "line-width": 2
+ },
+ "layout": {"line-join": "bevel"},
+ "minzoom": 14
+ },
+ {
+ "id": "batiment_residentiel_surf",
+ "type": "fill",
+ "source": "bdtopo",
+ "source-layer": "batiment",
+ "minzoom": 14,
+ "filter": [
+ "==",
+ "usage_1",
+ "Résidentiel"
+ ],
+ "paint": {
+ "fill-color": "#ff6dee"
+ }
+ },
+ {
+ "id": "batiment_residentiel_limites",
+ "type": "line",
+ "source": "bdtopo",
+ "source-layer": "batiment",
+ "minzoom": 14,
+ "filter": [
+ "==",
+ "usage_1",
+ "Résidentiel"
+ ],
+ "paint": {
+ "line-color": "#c421dd"
+ }
+ },
+ {
+ "id": "batiment_annexe_surf",
+ "type": "fill",
+ "source": "bdtopo",
+ "source-layer": "batiment",
+ "minzoom": 14,
+ "filter": [
+ "==",
+ "usage_1",
+ "Annexe"
+ ],
+ "paint": {
+ "fill-color": "#4dc1eb"
+ }
+ },
+ {
+ "id": "batiment_annexe_limites",
+ "type": "line",
+ "source": "bdtopo",
+ "source-layer": "batiment",
+ "minzoom": 14,
+ "filter": [
+ "==",
+ "usage_1",
+ "Annexe"
+ ],
+ "paint": {
+ "line-color": "#3f42e7"
+ }
+ },
+ {
+ "id": "batiment_agricole_surf",
+ "type": "fill",
+ "source": "bdtopo",
+ "source-layer": "batiment",
+ "minzoom": 14,
+ "filter": [
+ "==",
+ "usage_1",
+ "Agricole"
+ ],
+ "paint": {
+ "fill-color": "#12e759"
+ }
+ },
+ {
+ "id": "batiment_agricole_limites",
+ "type": "line",
+ "source": "bdtopo",
+ "source-layer": "batiment",
+ "minzoom": 14,
+ "filter": [
+ "==",
+ "usage_1",
+ "Agricole"
+ ],
+ "paint": {
+ "line-color": "#028e17"
+ }
+ },
+ {
+ "id": "batiment_commercial_et_services_surf",
+ "type": "fill",
+ "source": "bdtopo",
+ "source-layer": "batiment",
+ "minzoom": 14,
+ "filter": [
+ "==",
+ "usage_1",
+ "Commercial et services"
+ ],
+ "paint": {
+ "fill-color": "#bcbcbc"
+ }
+ },
+ {
+ "id": "batiment_commercial_et_services_limites",
+ "type": "line",
+ "source": "bdtopo",
+ "source-layer": "batiment",
+ "minzoom": 14,
+ "filter": [
+ "==",
+ "usage_1",
+ "Commercial et services"
+ ],
+ "paint": {
+ "line-color": "#000000"
+ }
+ },
+ {
+ "id": "batiment_industriel_surf",
+ "type": "fill",
+ "source": "bdtopo",
+ "source-layer": "batiment",
+ "minzoom": 14,
+ "filter": [
+ "==",
+ "usage_1",
+ "Industriel"
+ ],
+ "paint": {
+ "fill-color": "#c03a78"
+ }
+ },
+ {
+ "id": "batiment_industriel_limites",
+ "type": "line",
+ "source": "bdtopo",
+ "source-layer": "batiment",
+ "minzoom": 14,
+ "filter": [
+ "==",
+ "usage_1",
+ "Industriel"
+ ],
+ "paint": {
+ "line-color": "#6c2727"
+ }
+ },
+ {
+ "id": "batiment_sportif_surf",
+ "type": "fill",
+ "source": "bdtopo",
+ "source-layer": "batiment",
+ "minzoom": 14,
+ "filter": [
+ "==",
+ "usage_1",
+ "Sportif"
+ ],
+ "paint": {
+ "fill-color": "#f3e544"
+ }
+ },
+ {
+ "id": "batiment_sportif_limites",
+ "type": "line",
+ "source": "bdtopo",
+ "source-layer": "batiment",
+ "minzoom": 14,
+ "filter": [
+ "==",
+ "usage_1",
+ "Sportif"
+ ],
+ "paint": {
+ "line-color": "#b59402"
+ }
+ },
+ {
+ "id": "batiment_religieux_surf",
+ "type": "fill",
+ "source": "bdtopo",
+ "source-layer": "batiment",
+ "minzoom": 14,
+ "filter": [
+ "==",
+ "usage_1",
+ "Religieux"
+ ],
+ "paint": {
+ "fill-color": "#c03a78"
+ }
+ },
+ {
+ "id": "batiment_religieux_limites",
+ "type": "line",
+ "source": "bdtopo",
+ "source-layer": "batiment",
+ "minzoom": 14,
+ "filter": [
+ "==",
+ "usage_1",
+ "Religieux"
+ ],
+ "paint": {
+ "line-color": "#6c2727"
+ }
+ },
+ {
+ "id": "batiment_indifferencie_surf",
+ "type": "fill",
+ "source": "bdtopo",
+ "source-layer": "batiment",
+ "minzoom": 14,
+ "filter": [
+ "==",
+ "usage_1",
+ "Indifférencié"
+ ],
+ "paint": {
+ "fill-color": "#c03a78"
+ }
+ },
+ {
+ "id": "batiment_indifferencie_limites",
+ "type": "line",
+ "source": "bdtopo",
+ "source-layer": "batiment",
+ "minzoom": 14,
+ "filter": [
+ "==",
+ "usage_1",
+ "Indifférencié"
+ ],
+ "paint": {
+ "line-color": "#6c2727"
+ }
+ },
+ {
+ "id": "cimetiere_limites",
+ "type": "line",
+ "source": "bdtopo",
+ "source-layer": "cimetiere",
+ "minzoom": 14,
+ "paint": {
+ "line-color": "#505050"
+ }
+ },
+ {
+ "id": "cimetiere_surf",
+ "type": "fill",
+ "source": "bdtopo",
+ "source-layer": "cimetiere",
+ "minzoom": 14,
+ "paint": {
+ "fill-pattern": "cimetiere"
+ }
+ },
+ {
+ "id": "construction_ponctuelle",
+ "type": "symbol",
+ "source": "bdtopo",
+ "source-layer": "construction_ponctuelle",
+ "minzoom": 14,
+ "layout": {
+ "icon-image": "construction_ponctuelle",
+ "icon-size": 1
+ }
+ },
+
+ {
+ "id": "piste_d_aerodrome_surf",
+ "type": "fill",
+ "source": "bdtopo",
+ "source-layer": "piste_d_aerodrome",
+ "minzoom": 14,
+ "paint": {
+ "fill-color": "#cbcbcb"
+ }
+ },
+ {
+ "id": "piste_d_aerodrome_limites",
+ "type": "line",
+ "source": "bdtopo",
+ "source-layer": "piste_d_aerodrome",
+ "minzoom": 14,
+ "paint": {
+ "line-color": "#000000",
+ "line-width": 1
+ }
+ },
+ {
+ "id": "equipement_de_transport",
+ "type": "line",
+ "source": "bdtopo",
+ "source-layer": "equipement_de_transport",
+ "minzoom": 15,
+ "paint": {
+ "line-color": "#000000",
+ "line-width": 1
+ }
+ },
+ {
+ "id": "aerogare",
+ "type": "fill",
+ "source": "bdtopo",
+ "source-layer": "equipement_de_transport",
+ "minzoom": 15,
+ "filter": [
+ "==",
+ "nature",
+ "Aérogare"
+ ],
+ "paint": {
+ "fill-color": "#e53d24"
+ }
+ },
+ {
+ "id": "aire_de_repos_ou_de_service",
+ "type": "fill",
+ "source": "bdtopo",
+ "source-layer": "equipement_de_transport",
+ "minzoom": 15,
+ "filter": [
+ "==",
+ "nature",
+ "Aire de repos ou de service"
+ ],
+ "paint": {
+ "fill-color": "#5499e3"
+ }
+ },
+ {
+ "id": "aire_de_triage",
+ "type": "fill",
+ "source": "bdtopo",
+ "source-layer": "equipement_de_transport",
+ "minzoom": 15,
+ "filter": [
+ "==",
+ "nature",
+ "Aire de triage"
+ ],
+ "paint": {
+ "fill-color": "#839994"
+ }
+ },
+ {
+ "id": "arret_de_voyageur",
+ "type": "fill",
+ "source": "bdtopo",
+ "source-layer": "equipement_de_transport",
+ "minzoom": 15,
+ "filter": [
+ "==",
+ "nature",
+ "Arrêt voyageurs"
+ ],
+ "paint": {
+ "fill-color": "#5428d9"
+ }
+ },
+ {
+ "id": "autre_equipement",
+ "type": "fill",
+ "source": "bdtopo",
+ "source-layer": "equipement_de_transport",
+ "minzoom": 15,
+ "filter": [
+ "==",
+ "nature",
+ "Autre équipement"
+ ],
+ "paint": {
+ "fill-color": "#ca5324"
+ }
+ },
+ {
+ "id": "carrefour",
+ "type": "fill",
+ "source": "bdtopo",
+ "source-layer": "equipement_de_transport",
+ "minzoom": 15,
+ "filter": [
+ "==",
+ "nature",
+ "Carrefour"
+ ],
+ "paint": {
+ "fill-color": "#1dc04e"
+ }
+ },
+ {
+ "id": "gare_fret_uniquement",
+ "type": "fill",
+ "source": "bdtopo",
+ "source-layer": "equipement_de_transport",
+ "minzoom": 15,
+ "filter": [
+ "==",
+ "nature",
+ "Gare fret uniquement"
+ ],
+ "paint": {
+ "fill-color": "#d29f6d"
+ }
+ },
+ {
+ "id": "gare_routiere",
+ "type": "fill",
+ "source": "bdtopo",
+ "source-layer": "equipement_de_transport",
+ "minzoom": 15,
+ "filter": [
+ "==",
+ "nature",
+ "Gare routière"
+ ],
+ "paint": {
+ "fill-color": "#df0f0f"
+ }
+ },
+ {
+ "id": "gare_voyageurs_et_fret",
+ "type": "fill",
+ "source": "bdtopo",
+ "source-layer": "equipement_de_transport",
+ "minzoom": 15,
+ "filter": [
+ "==",
+ "nature",
+ "Gare voyageurs et fret"
+ ],
+ "paint": {
+ "fill-color": "#2943ea"
+ }
+ },
+ {
+ "id": "gare_voyageurs_uniquement",
+ "type": "fill",
+ "source": "bdtopo",
+ "source-layer": "equipement_de_transport",
+ "minzoom": 15,
+ "filter": [
+ "==",
+ "nature",
+ "Gare voyageurs uniquement"
+ ],
+ "paint": {
+ "fill-color": "#712a9c"
+ }
+ },
+ {
+ "id": "parking",
+ "type": "fill",
+ "source": "bdtopo",
+ "source-layer": "equipement_de_transport",
+ "minzoom": 15,
+ "filter": [
+ "==",
+ "nature",
+ "Parking"
+ ],
+ "paint": {
+ "fill-color": "#901d92"
+ }
+ },
+ {
+ "id": "peage",
+ "type": "fill",
+ "source": "bdtopo",
+ "source-layer": "equipement_de_transport",
+ "minzoom": 15,
+ "filter": [
+ "==",
+ "nature",
+ "Péage"
+ ],
+ "paint": {
+ "fill-color": "#6da0de"
+ }
+ },
+ {
+ "id": "gare_maritime",
+ "type": "fill",
+ "source": "bdtopo",
+ "source-layer": "equipement_de_transport",
+ "minzoom": 15,
+ "filter": [
+ "==",
+ "nature",
+ "Gare maritime"
+ ],
+ "paint": {
+ "fill-color": "#233fdd"
+ }
+ },
+ {
+ "id": "port",
+ "type": "fill",
+ "source": "bdtopo",
+ "source-layer": "equipement_de_transport",
+ "minzoom": 15,
+ "filter": [
+ "==",
+ "nature",
+ "Port"
+ ],
+ "paint": {
+ "fill-color": "#367ada"
+ }
+ },
+ {
+ "id": "station_de_metro",
+ "type": "fill",
+ "source": "bdtopo",
+ "source-layer": "equipement_de_transport",
+ "minzoom": 15,
+ "filter": [
+ "==",
+ "nature",
+ "Station de métro"
+ ],
+ "paint": {
+ "fill-color": "#66c4d0"
+ }
+ },
+ {
+ "id": "station_de_tramway",
+ "type": "fill",
+ "source": "bdtopo",
+ "source-layer": "equipement_de_transport",
+ "minzoom": 15,
+ "filter": [
+ "==",
+ "nature",
+ "Station de tramway"
+ ],
+ "paint": {
+ "fill-color": "#b072a9"
+ }
+ },
+ {
+ "id": "tour_de_controle_aerien",
+ "type": "fill",
+ "source": "bdtopo",
+ "source-layer": "equipement_de_transport",
+ "minzoom": 15,
+ "filter": [
+ "==",
+ "nature",
+ "Tour de contrôle aérien"
+ ],
+ "paint": {
+ "fill-color": "#aadd0f"
+ }
+ },
+ {
+ "id": "gare_telepherique",
+ "type": "fill",
+ "source": "bdtopo",
+ "source-layer": "equipement_de_transport",
+ "minzoom": 15,
+ "filter": [
+ "==",
+ "nature",
+ "Gare téléphérique"
+ ],
+ "paint": {
+ "fill-color": "#c49c61"
+ }
+ },
+ {
+ "id": "aerodrome_limites",
+ "type": "line",
+ "source": "bdtopo",
+ "source-layer": "aerodrome",
+ "minzoom": 13,
+ "paint": {
+ "line-color": "#000000",
+ "line-width": 1
+ }
+ },
+ {
+ "id": "altiport",
+ "type": "fill",
+ "source": "bdtopo",
+ "source-layer": "aerodrome",
+ "minzoom": 13,
+ "filter": [
+ "==",
+ "nature",
+ "Altiport"
+ ],
+ "paint": {
+ "fill-color": "#70d7bf"
+ }
+ },
+ {
+ "id": "aerodrome_surf",
+ "type": "fill",
+ "source": "bdtopo",
+ "source-layer": "aerodrome",
+ "minzoom": 13,
+ "filter": [
+ "==",
+ "nature",
+ "Aérodrome"
+ ],
+ "paint": {
+ "fill-color": "#e7c8cd"
+ }
+ },
+ {
+ "id": "heliport_surf",
+ "type": "fill",
+ "source": "bdtopo",
+ "source-layer": "aerodrome",
+ "minzoom": 13,
+ "filter": [
+ "==",
+ "nature",
+ "Héliport"
+ ],
+ "paint": {
+ "fill-color": "#ff9b79"
+ }
+ },
+ {
+ "id": "transport_par_cable_dash",
+ "type": "line",
+ "source": "bdtopo",
+ "source-layer": "transport_par_cable",
+ "minzoom": 1,
+ "paint": {
+ "line-color": "rgba(0, 0, 0, 1)",
+ "line-dasharray": [0.1, 0.8],
+ "line-width": 15
+ }
+ },
+ {
+ "id": "transport_par_cable_line",
+ "type": "line",
+ "source": "bdtopo",
+ "source-layer": "transport_par_cable",
+ "minzoom": 1,
+ "paint": {
+ "line-color": "rgba(0, 0, 0, 1)",
+ "line-width": 2.5
+ }
+ },
+ {
+ "id": "ligne_electrique",
+ "type": "line",
+ "source": "bdtopo",
+ "minzoom": 12,
+ "paint": {"line-color": "#cc00cc"},
+ "layout": {"visibility": "visible"},
+ "source-layer": "ligne_electrique"
+ },
+ {
+ "id": "erp",
+ "type": "symbol",
+ "source": "bdtopo",
+ "source-layer": "erp",
+ "minzoom": 19,
+ "layout": {
+ "icon-image": "erp",
+ "icon-size": 1.5
+ }
+ },
+ {
+ "id": "pylone",
+ "type": "symbol",
+ "source": "bdtopo",
+ "source-layer": "pylone",
+ "minzoom": 14,
+ "layout": {
+ "icon-image": "pylone",
+ "icon-size": 1
+ }
+ },
+ {
+ "id": "terrain_de_sport_surf",
+ "type": "fill",
+ "source": "bdtopo",
+ "source-layer": "terrain_de_sport",
+ "paint": {"fill-color": "#7dff9e"},
+ "minzoom": 14
+ },
+ {
+ "id": "terrain_de_sport_limites",
+ "type": "line",
+ "source": "bdtopo",
+ "source-layer": "terrain_de_sport",
+ "minzoom": 14,
+ "paint": {
+ "line-color": "#0e9652",
+ "line-width": 1
+ }
+ },
+ {
+ "id": "region_limites",
+ "type": "line",
+ "paint": {
+ "line-color": "rgba(0, 0, 0, 1)",
+ "line-width": 2
+ },
+ "source": "bdtopo",
+ "source-layer": "region",
+ "layout": {"line-join": "bevel"}
+ },
+ {
+ "id": "departement_limites",
+ "type": "line",
+ "source": "bdtopo",
+ "source-layer": "departement",
+ "minzoom": 2,
+ "maxzoom": 12,
+ "paint": {
+ "line-width": 0.75,
+ "line-color": "#000000"
+ }
+ },
+ {
+ "id": "epci_limites",
+ "type": "line",
+ "source": "bdtopo",
+ "source-layer": "epci",
+ "paint": {
+ "line-width": 1.8,
+ "line-color": "#1f78b4"
+ },
+ "minzoom": 10,
+ "maxzoom": 13
+ },
+ {
+ "id": "arrondissement_limites",
+ "type": "line",
+ "source": "bdtopo",
+ "source-layer": "arrondissement",
+ "paint": {
+ "line-color": "#666666",
+ "line-dasharray": [18, 6],
+ "line-width": 0.75
+ },
+ "minzoom": 11,
+ "layout": {"line-join": "bevel"}
+ },
+ {
+ "id": "commune_limites",
+ "type": "line",
+ "source": "bdtopo",
+ "source-layer": "commune",
+ "paint": {
+ "line-color": "#999999",
+ "line-dasharray": [2, 4, 6, 4],
+ "line-width": 0.75
+ },
+ "minzoom": 11,
+ "layout": {"line-join": "bevel"}
+ },{
+ "id": "region_labels",
+ "type": "symbol",
+ "source": "bdtopo",
+ "source-layer": "region",
+ "layout": {
+ "text-field": "{nom_officiel}",
+ "text-size": 20,
+ "text-font": ["Ubuntu Regular"]
+ },
+ "minzoom": 1,
+ "maxzoom": 7
+ },
+ {
+ "id": "departement_labels",
+ "type": "symbol",
+ "source": "bdtopo",
+ "source-layer": "departement",
+ "layout": {
+ "text-field": "{nom_officiel}",
+ "text-font": ["Ubuntu Regular"],
+ "text-size": 20
+ },
+ "maxzoom": 10,
+ "minzoom": 7
+ },
+ {
+ "id": "epci_labels",
+ "type": "symbol",
+ "source": "bdtopo",
+ "source-layer": "epci",
+ "layout": {
+ "text-field": "{nom_officiel}",
+ "text-font": ["Ubuntu Bold Italic"],
+ "text-size": 16,
+ "text-allow-overlap": false,
+ "text-ignore-placement": false,
+ "icon-text-fit": "none"
+ },
+ "paint": {
+ "text-color": "#1f78b4",
+ "text-halo-color": "rgba(255, 255, 255, 1)",
+ "text-halo-width": 5
+ },
+ "minzoom": 10,
+ "maxzoom": 13
+ },
+ {
+ "id": "arrondissement_labels",
+ "type": "symbol",
+ "source": "bdtopo",
+ "source-layer": "arrondissement",
+ "minzoom": 15,
+ "layout": {
+ "text-field": "{nom_officiel}",
+ "text-font": ["Ubuntu Italic"]
+ },
+ "paint": {
+ "text-color": "rgba(0, 0, 0, 1)",
+ "text-halo-width": 1,
+ "text-halo-color": "rgba(255, 255, 255, 1)"
+ }
+ },
+ {
+ "id": "commune_labels",
+ "type": "symbol",
+ "source": "bdtopo",
+ "source-layer": "commune",
+ "minzoom": 12,
+ "layout": {
+ "text-field": "{nom_officiel}",
+ "text-font": ["Ubuntu Regular"]
+ },
+ "paint": {
+ "text-color": "rgba(0, 0, 0, 1)",
+ "text-halo-width": 5,
+ "text-halo-color": "rgba(255, 255, 255, 1)"
+ }
+ }
+ ]
+}
diff --git a/samples-src/resources/data/mapbox/styles/bati_failed_syntaxe.json b/samples-src/resources/data/mapbox/styles/bati_failed_syntaxe.json
new file mode 100644
index 000000000..dcbdbbf70
--- /dev/null
+++ b/samples-src/resources/data/mapbox/styles/bati_failed_syntaxe.json
@@ -0,0 +1,919 @@
+{
+ "version": 7,
+ "name": "BDTOPO",
+ "glyphs": "https://wxs.ign.fr/static/vectorTiles/fonts/{fontstack}/{range}.pbf",
+ "metadata": {"maputnik:renderer": "ol"},
+ "sources": {
+ "bdtopo": {
+ "type": "vector",
+ "tiles": [
+ "https://wxs.ign.fr/latuile/geoportail/tms/1.0.0/BDTOPO/{z}/{x}/{y}.pbf"
+ ],
+ "scheme": "tms",
+ "url":"https://wxs.ign.fr/latuile/geoportail/tms/1.0.0/BDTOPO/metadata.json"
+ }
+ },
+ "transition": {
+ "duration": 300,
+ "delay": 0
+ },
+ "layers": [
+ {
+ "id": "ligne_orographique",
+ "type": "line",
+ "source": "bdtopo",
+ "source-layer": "ligne_orographique",
+ "paint": {
+ "line-color": "#ffa500",
+ "line-width": 2
+ },
+ "minzoom": 14
+ },
+ {
+ "id": "reservoir_surf",
+ "type": "fill",
+ "source": "bdtopo",
+ "source-layer": "reservoir",
+ "paint": {"fill-color": "#1bbfd1"},
+ "minzoom": 14
+ },
+ {
+ "id": "reservoir_limites",
+ "type": "line",
+ "source": "bdtopo",
+ "source-layer": "reservoir",
+ "paint": {"line-color": "#666666"},
+ "minzoom": 14
+ },
+ {
+ "id": "construction_surfacique_surf",
+ "type": "fill",
+ "source": "bdtopo",
+ "source-layer": "construction_surfacique",
+ "paint": {"fill-color": "#1bbfd1"},
+ "minzoom": 14
+ },
+ {
+ "id": "construction_surfacique_limites",
+ "type": "line",
+ "source": "bdtopo",
+ "source-layer": "construction_surfacique",
+ "paint": {"line-color": "#666666"},
+ "minzoom": 14
+ },
+ {
+ "id": "construction_lineaire",
+ "type": "line",
+ "source": "bdtopo",
+ "source-layer": "construction_lineaire",
+ "paint": {
+ "line-color": "#9012f6",
+ "line-width": 2
+ },
+ "layout": {"line-join": "bevel"},
+ "minzoom": 14
+ },
+ {
+ "id": "batiment_residentiel_surf",
+ "type": "fill",
+ "source": "bdtopo",
+ "source-layer": "batiment",
+ "minzoom": 14,
+ "filter": [
+ "==",
+ "usage_1",
+ "Résidentiel"
+ ],
+ "paint": {
+ "fill-color": "#ff6dee"
+ }
+ },
+ {
+ "id": "batiment_residentiel_limites",
+ "type": "line",
+ "source": "bdtopo",
+ "source-layer": "batiment",
+ "minzoom": 14,
+ "filter": [
+ "==",
+ "usage_1",
+ "Résidentiel"
+ ],
+ "paint": {
+ "line-color": "#c421dd"
+ }
+ },
+ {
+ "id": "batiment_annexe_surf",
+ "type": "fill",
+ "source": "bdtopo",
+ "source-layer": "batiment",
+ "minzoom": 14,
+ "filter": [
+ "==",
+ "usage_1",
+ "Annexe"
+ ],
+ "paint": {
+ "fill-color": "#4dc1eb"
+ }
+ },
+ {
+ "id": "batiment_annexe_limites",
+ "type": "line",
+ "source": "bdtopo",
+ "source-layer": "batiment",
+ "minzoom": 14,
+ "filter": [
+ "==",
+ "usage_1",
+ "Annexe"
+ ],
+ "paint": {
+ "line-color": "#3f42e7"
+ }
+ },
+ {
+ "id": "batiment_agricole_surf",
+ "type": "fill",
+ "source": "bdtopo",
+ "source-layer": "batiment",
+ "minzoom": 14,
+ "filter": [
+ "==",
+ "usage_1",
+ "Agricole"
+ ],
+ "paint": {
+ "fill-color": "#12e759"
+ }
+ },
+ {
+ "id": "batiment_agricole_limites",
+ "type": "line",
+ "source": "bdtopo",
+ "source-layer": "batiment",
+ "minzoom": 14,
+ "filter": [
+ "==",
+ "usage_1",
+ "Agricole"
+ ],
+ "paint": {
+ "line-color": "#028e17"
+ }
+ },
+ {
+ "id": "batiment_commercial_et_services_surf",
+ "type": "fill",
+ "source": "bdtopo",
+ "source-layer": "batiment",
+ "minzoom": 14,
+ "filter": [
+ "==",
+ "usage_1",
+ "Commercial et services"
+ ],
+ "paint": {
+ "fill-color": "#bcbcbc"
+ }
+ },
+ {
+ "id": "batiment_commercial_et_services_limites",
+ "type": "line",
+ "source": "bdtopo",
+ "source-layer": "batiment",
+ "minzoom": 14,
+ "filter": [
+ "==",
+ "usage_1",
+ "Commercial et services"
+ ],
+ "paint": {
+ "line-color": "#000000"
+ }
+ },
+ {
+ "id": "batiment_industriel_surf",
+ "type": "fill",
+ "source": "bdtopo",
+ "source-layer": "batiment",
+ "minzoom": 14,
+ "filter": [
+ "==",
+ "usage_1",
+ "Industriel"
+ ],
+ "paint": {
+ "fill-color": "#c03a78"
+ }
+ },
+ {
+ "id": "batiment_industriel_limites",
+ "type": "line",
+ "source": "bdtopo",
+ "source-layer": "batiment",
+ "minzoom": 14,
+ "filter": [
+ "==",
+ "usage_1",
+ "Industriel"
+ ],
+ "paint": {
+ "line-color": "#6c2727"
+ }
+ },
+ {
+ "id": "batiment_sportif_surf",
+ "type": "fill",
+ "source": "bdtopo",
+ "source-layer": "batiment",
+ "minzoom": 14,
+ "filter": [
+ "==",
+ "usage_1",
+ "Sportif"
+ ],
+ "paint": {
+ "fill-color": "#f3e544"
+ }
+ },
+ {
+ "id": "batiment_sportif_limites",
+ "type": "line",
+ "source": "bdtopo",
+ "source-layer": "batiment",
+ "minzoom": 14,
+ "filter": [
+ "==",
+ "usage_1",
+ "Sportif"
+ ],
+ "paint": {
+ "line-color": "#b59402"
+ }
+ },
+ {
+ "id": "batiment_religieux_surf",
+ "type": "fill",
+ "source": "bdtopo",
+ "source-layer": "batiment",
+ "minzoom": 14,
+ "filter": [
+ "==",
+ "usage_1",
+ "Religieux"
+ ],
+ "paint": {
+ "fill-color": "#c03a78"
+ }
+ },
+ {
+ "id": "batiment_religieux_limites",
+ "type": "line",
+ "source": "bdtopo",
+ "source-layer": "batiment",
+ "minzoom": 14,
+ "filter": [
+ "==",
+ "usage_1",
+ "Religieux"
+ ],
+ "paint": {
+ "line-color": "#6c2727"
+ }
+ },
+ {
+ "id": "batiment_indifferencie_surf",
+ "type": "fill",
+ "source": "bdtopo",
+ "source-layer": "batiment",
+ "minzoom": 14,
+ "filter": [
+ "==",
+ "usage_1",
+ "Indifférencié"
+ ],
+ "paint": {
+ "fill-color": "#c03a78"
+ }
+ },
+ {
+ "id": "batiment_indifferencie_limites",
+ "type": "line",
+ "source": "bdtopo",
+ "source-layer": "batiment",
+ "minzoom": 14,
+ "filter": [
+ "==",
+ "usage_1",
+ "Indifférencié"
+ ],
+ "paint": {
+ "line-color": "#6c2727"
+ }
+ },
+ {
+ "id": "cimetiere_limites",
+ "type": "line",
+ "source": "bdtopo",
+ "source-layer": "cimetiere",
+ "minzoom": 14,
+ "paint": {
+ "line-color": "#505050"
+ }
+ },
+ {
+ "id": "cimetiere_surf",
+ "type": "fill",
+ "source": "bdtopo",
+ "source-layer": "cimetiere",
+ "minzoom": 14,
+ "paint": {
+ "fill-pattern": "cimetiere"
+ }
+ },
+ {
+ "id": "construction_ponctuelle",
+ "type": "symbol",
+ "source": "bdtopo",
+ "source-layer": "construction_ponctuelle",
+ "minzoom": 14,
+ "layout": {
+ "icon-image": "construction_ponctuelle",
+ "icon-size": 1
+ }
+ },
+
+ {
+ "id": "piste_d_aerodrome_surf",
+ "type": "fill",
+ "source": "bdtopo",
+ "source-layer": "piste_d_aerodrome",
+ "minzoom": 14,
+ "paint": {
+ "fill-color": "#cbcbcb"
+ }
+ },
+ {
+ "id": "piste_d_aerodrome_limites",
+ "type": "line",
+ "source": "bdtopo",
+ "source-layer": "piste_d_aerodrome",
+ "minzoom": 14,
+ "paint": {
+ "line-color": "#000000",
+ "line-width": 1
+ }
+ },
+ {
+ "id": "equipement_de_transport",
+ "type": "line",
+ "source": "bdtopo",
+ "source-layer": "equipement_de_transport",
+ "minzoom": 15,
+ "paint": {
+ "line-color": "#000000",
+ "line-width": 1
+ }
+ },
+ {
+ "id": "aerogare",
+ "type": "fill",
+ "source": "bdtopo",
+ "source-layer": "equipement_de_transport",
+ "minzoom": 15,
+ "filter": [
+ "==",
+ "nature",
+ "Aérogare"
+ ],
+ "paint": {
+ "fill-color": "#e53d24"
+ }
+ },
+ {
+ "id": "aire_de_repos_ou_de_service",
+ "type": "fill",
+ "source": "bdtopo",
+ "source-layer": "equipement_de_transport",
+ "minzoom": 15,
+ "filter": [
+ "==",
+ "nature",
+ "Aire de repos ou de service"
+ ],
+ "paint": {
+ "fill-color": "#5499e3"
+ }
+ },
+ {
+ "id": "aire_de_triage",
+ "type": "fill",
+ "source": "bdtopo",
+ "source-layer": "equipement_de_transport",
+ "minzoom": 15,
+ "filter": [
+ "==",
+ "nature",
+ "Aire de triage"
+ ],
+ "paint": {
+ "fill-color": "#839994"
+ }
+ },
+ {
+ "id": "arret_de_voyageur",
+ "type": "fill",
+ "source": "bdtopo",
+ "source-layer": "equipement_de_transport",
+ "minzoom": 15,
+ "filter": [
+ "==",
+ "nature",
+ "Arrêt voyageurs"
+ ],
+ "paint": {
+ "fill-color": "#5428d9"
+ }
+ },
+ {
+ "id": "autre_equipement",
+ "type": "fill",
+ "source": "bdtopo",
+ "source-layer": "equipement_de_transport",
+ "minzoom": 15,
+ "filter": [
+ "==",
+ "nature",
+ "Autre équipement"
+ ],
+ "paint": {
+ "fill-color": "#ca5324"
+ }
+ },
+ {
+ "id": "carrefour",
+ "type": "fill",
+ "source": "bdtopo",
+ "source-layer": "equipement_de_transport",
+ "minzoom": 15,
+ "filter": [
+ "==",
+ "nature",
+ "Carrefour"
+ ],
+ "paint": {
+ "fill-color": "#1dc04e"
+ }
+ },
+ {
+ "id": "gare_fret_uniquement",
+ "type": "fill",
+ "source": "bdtopo",
+ "source-layer": "equipement_de_transport",
+ "minzoom": 15,
+ "filter": [
+ "==",
+ "nature",
+ "Gare fret uniquement"
+ ],
+ "paint": {
+ "fill-color": "#d29f6d"
+ }
+ },
+ {
+ "id": "gare_routiere",
+ "type": "fill",
+ "source": "bdtopo",
+ "source-layer": "equipement_de_transport",
+ "minzoom": 15,
+ "filter": [
+ "==",
+ "nature",
+ "Gare routière"
+ ],
+ "paint": {
+ "fill-color": "#df0f0f"
+ }
+ },
+ {
+ "id": "gare_voyageurs_et_fret",
+ "type": "fill",
+ "source": "bdtopo",
+ "source-layer": "equipement_de_transport",
+ "minzoom": 15,
+ "filter": [
+ "==",
+ "nature",
+ "Gare voyageurs et fret"
+ ],
+ "paint": {
+ "fill-color": "#2943ea"
+ }
+ },
+ {
+ "id": "gare_voyageurs_uniquement",
+ "type": "fill",
+ "source": "bdtopo",
+ "source-layer": "equipement_de_transport",
+ "minzoom": 15,
+ "filter": [
+ "==",
+ "nature",
+ "Gare voyageurs uniquement"
+ ],
+ "paint": {
+ "fill-color": "#712a9c"
+ }
+ },
+ {
+ "id": "parking",
+ "type": "fill",
+ "source": "bdtopo",
+ "source-layer": "equipement_de_transport",
+ "minzoom": 15,
+ "filter": [
+ "==",
+ "nature",
+ "Parking"
+ ],
+ "paint": {
+ "fill-color": "#901d92"
+ }
+ },
+ {
+ "id": "peage",
+ "type": "fill",
+ "source": "bdtopo",
+ "source-layer": "equipement_de_transport",
+ "minzoom": 15,
+ "filter": [
+ "==",
+ "nature",
+ "Péage"
+ ],
+ "paint": {
+ "fill-color": "#6da0de"
+ }
+ },
+ {
+ "id": "gare_maritime",
+ "type": "fill",
+ "source": "bdtopo",
+ "source-layer": "equipement_de_transport",
+ "minzoom": 15,
+ "filter": [
+ "==",
+ "nature",
+ "Gare maritime"
+ ],
+ "paint": {
+ "fill-color": "#233fdd"
+ }
+ },
+ {
+ "id": "port",
+ "type": "fill",
+ "source": "bdtopo",
+ "source-layer": "equipement_de_transport",
+ "minzoom": 15,
+ "filter": [
+ "==",
+ "nature",
+ "Port"
+ ],
+ "paint": {
+ "fill-color": "#367ada"
+ }
+ },
+ {
+ "id": "station_de_metro",
+ "type": "fill",
+ "source": "bdtopo",
+ "source-layer": "equipement_de_transport",
+ "minzoom": 15,
+ "filter": [
+ "==",
+ "nature",
+ "Station de métro"
+ ],
+ "paint": {
+ "fill-color": "#66c4d0"
+ }
+ },
+ {
+ "id": "station_de_tramway",
+ "type": "fill",
+ "source": "bdtopo",
+ "source-layer": "equipement_de_transport",
+ "minzoom": 15,
+ "filter": [
+ "==",
+ "nature",
+ "Station de tramway"
+ ],
+ "paint": {
+ "fill-color": "#b072a9"
+ }
+ },
+ {
+ "id": "tour_de_controle_aerien",
+ "type": "fill",
+ "source": "bdtopo",
+ "source-layer": "equipement_de_transport",
+ "minzoom": 15,
+ "filter": [
+ "==",
+ "nature",
+ "Tour de contrôle aérien"
+ ],
+ "paint": {
+ "fill-color": "#aadd0f"
+ }
+ },
+ {
+ "id": "gare_telepherique",
+ "type": "fill",
+ "source": "bdtopo",
+ "source-layer": "equipement_de_transport",
+ "minzoom": 15,
+ "filter": [
+ "==",
+ "nature",
+ "Gare téléphérique"
+ ],
+ "paint": {
+ "fill-color": "#c49c61"
+ }
+ },
+ {
+ "id": "aerodrome_limites",
+ "type": "line",
+ "source": "bdtopo",
+ "source-layer": "aerodrome",
+ "minzoom": 13,
+ "paint": {
+ "line-color": "#000000",
+ "line-width": 1
+ }
+ },
+ {
+ "id": "altiport",
+ "type": "fill",
+ "source": "bdtopo",
+ "source-layer": "aerodrome",
+ "minzoom": 13,
+ "filter": [
+ "==",
+ "nature",
+ "Altiport"
+ ],
+ "paint": {
+ "fill-color": "#70d7bf"
+ }
+ },
+ {
+ "id": "aerodrome_surf",
+ "type": "fill",
+ "source": "bdtopo",
+ "source-layer": "aerodrome",
+ "minzoom": 13,
+ "filter": [
+ "==",
+ "nature",
+ "Aérodrome"
+ ],
+ "paint": {
+ "fill-color": "#e7c8cd"
+ }
+ },
+ {
+ "id": "heliport_surf",
+ "type": "fill",
+ "source": "bdtopo",
+ "source-layer": "aerodrome",
+ "minzoom": 13,
+ "filter": [
+ "==",
+ "nature",
+ "Héliport"
+ ],
+ "paint": {
+ "fill-color": "#ff9b79"
+ }
+ },
+ {
+ "id": "transport_par_cable_dash",
+ "type": "line",
+ "source": "bdtopo",
+ "source-layer": "transport_par_cable",
+ "minzoom": 1,
+ "paint": {
+ "line-color": "rgba(0, 0, 0, 1)",
+ "line-dasharray": [0.1, 0.8],
+ "line-width": 15
+ }
+ },
+ {
+ "id": "transport_par_cable_line",
+ "type": "line",
+ "source": "bdtopo",
+ "source-layer": "transport_par_cable",
+ "minzoom": 1,
+ "paint": {
+ "line-color": "rgba(0, 0, 0, 1)",
+ "line-width": 2.5
+ }
+ },
+ {
+ "id": "ligne_electrique",
+ "type": "line",
+ "source": "bdtopo",
+ "minzoom": 12,
+ "paint": {"line-color": "#cc00cc"},
+ "layout": {"visibility": "visible"},
+ "source-layer": "ligne_electrique"
+ },
+ {
+ "id": "erp",
+ "type": "symbol",
+ "source": "bdtopo",
+ "source-layer": "erp",
+ "minzoom": 19,
+ "layout": {
+ "icon-image": "erp",
+ "icon-size": 1.5
+ }
+ },
+ {
+ "id": "pylone",
+ "type": "symbol",
+ "source": "bdtopo",
+ "source-layer": "pylone",
+ "minzoom": 14,
+ "layout": {
+ "icon-image": "pylone",
+ "icon-size": 1
+ }
+ },
+ {
+ "id": "terrain_de_sport_surf",
+ "type": "fill",
+ "source": "bdtopo",
+ "source-layer": "terrain_de_sport",
+ "paint": {"fill-color": "#7dff9e"},
+ "minzoom": 14
+ },
+ {
+ "id": "terrain_de_sport_limites",
+ "type": "line",
+ "source": "bdtopo",
+ "source-layer": "terrain_de_sport",
+ "minzoom": 14,
+ "paint": {
+ "line-color": "#0e9652",
+ "line-width": 1
+ }
+ },
+ {
+ "id": "region_limites",
+ "type": "line",
+ "paint": {
+ "line-color": "rgba(0, 0, 0, 1)",
+ "line-width": 2
+ },
+ "source": "bdtopo",
+ "source-layer": "region",
+ "layout": {"line-join": "bevel"}
+ },
+ {
+ "id": "departement_limites",
+ "type": "line",
+ "source": "bdtopo",
+ "source-layer": "departement",
+ "minzoom": 2,
+ "maxzoom": 12,
+ "paint": {
+ "line-width": 0.75,
+ "line-color": "#000000"
+ }
+ },
+ {
+ "id": "epci_limites",
+ "type": "line",
+ "source": "bdtopo",
+ "source-layer": "epci",
+ "paint": {
+ "line-width": 1.8,
+ "line-color": "#1f78b4"
+ },
+ "minzoom": 10,
+ "maxzoom": 13
+ },
+ {
+ "id": "arrondissement_limites",
+ "type": "line",
+ "source": "bdtopo",
+ "source-layer": "arrondissement",
+ "paint": {
+ "line-color": "#666666",
+ "line-dasharray": [18, 6],
+ "line-width": 0.75
+ },
+ "minzoom": 11,
+ "layout": {"line-join": "bevel"}
+ },
+ {
+ "id": "commune_limites",
+ "type": "line",
+ "source": "bdtopo",
+ "source-layer": "commune",
+ "paint": {
+ "line-color": "#999999",
+ "line-dasharray": [2, 4, 6, 4],
+ "line-width": 0.75
+ },
+ "minzoom": 11,
+ "layout": {"line-join": "bevel"}
+ },{
+ "id": "region_labels",
+ "type": "symbol",
+ "source": "bdtopo",
+ "source-layer": "region",
+ "layout": {
+ "text-field": "{nom_officiel}",
+ "text-size": 20,
+ "text-font": ["Ubuntu Regular"]
+ },
+ "minzoom": 1,
+ "maxzoom": 7
+ },
+ {
+ "id": "departement_labels",
+ "type": "symbol",
+ "source": "bdtopo",
+ "source-layer": "departement",
+ "layout": {
+ "text-field": "{nom_officiel}",
+ "text-font": ["Ubuntu Regular"],
+ "text-size": 20
+ },
+ "maxzoom": 10,
+ "minzoom": 7
+ },
+ {
+ "id": "epci_labels",
+ "type": "symbol",
+ "source": "bdtopo",
+ "source-layer": "epci",
+ "layout": {
+ "text-field": "{nom_officiel}",
+ "text-font": ["Ubuntu Bold Italic"],
+ "text-size": 16,
+ "text-allow-overlap": false,
+ "text-ignore-placement": false,
+ "icon-text-fit": "none"
+ },
+ "paint": {
+ "text-color": "#1f78b4",
+ "text-halo-color": "rgba(255, 255, 255, 1)",
+ "text-halo-width": 5
+ },
+ "minzoom": 10,
+ "maxzoom": 13
+ },
+ {
+ "id": "arrondissement_labels",
+ "type": "symbol",
+ "source": "bdtopo",
+ "source-layer": "arrondissement",
+ "minzoom": 15,
+ "layout": {
+ "text-field": "{nom_officiel}",
+ "text-font": ["Ubuntu Italic"]
+ },
+ "paint": {
+ "text-color": "rgba(0, 0, 0, 1)",
+ "text-halo-width": 1,
+ "text-halo-color": "rgba(255, 255, 255, 1)"
+ }
+ },
+ {
+ "id": "commune_labels",
+ "type": "symbol",
+ "source": "bdtopo",
+ "source-layer": "commune",
+ "minzoom": 12,
+ "layout": {
+ "text-field": "{nom_officiel}",
+ "text-font": ["Ubuntu Regular"]
+ },
+ "paint": {
+ "text-color": "rgba(0, 0, 0, 1)",
+ "text-halo-width": 5,
+ "text-halo-color": "rgba(255, 255, 255, 1)"
+ }
+ }
+ ]
+}
diff --git a/samples-src/resources/data/mapbox/styles/bati_sans_sprites.json b/samples-src/resources/data/mapbox/styles/bati_sans_sprites.json
new file mode 100644
index 000000000..d623b66bd
--- /dev/null
+++ b/samples-src/resources/data/mapbox/styles/bati_sans_sprites.json
@@ -0,0 +1,920 @@
+{
+ "version": 8,
+ "name": "BDTOPO",
+ "glyphs": "https://wxs.ign.fr/static/vectorTiles/fonts/{fontstack}/{range}.pbf",
+ "sprite": "",
+ "metadata": {"maputnik:renderer": "ol"},
+ "sources": {
+ "bdtopo": {
+ "type": "vector",
+ "tiles": [
+ "https://wxs.ign.fr/latuile/geoportail/tms/1.0.0/BDTOPO/{z}/{x}/{y}.pbf"
+ ],
+ "scheme": "tms",
+ "url":"https://wxs.ign.fr/latuile/geoportail/tms/1.0.0/BDTOPO/metadata.json"
+ }
+ },
+ "transition": {
+ "duration": 300,
+ "delay": 0
+ },
+ "layers": [
+ {
+ "id": "ligne_orographique",
+ "type": "line",
+ "source": "bdtopo",
+ "source-layer": "ligne_orographique",
+ "paint": {
+ "line-color": "#ffa500",
+ "line-width": 2
+ },
+ "minzoom": 14
+ },
+ {
+ "id": "reservoir_surf",
+ "type": "fill",
+ "source": "bdtopo",
+ "source-layer": "reservoir",
+ "paint": {"fill-color": "#1bbfd1"},
+ "minzoom": 14
+ },
+ {
+ "id": "reservoir_limites",
+ "type": "line",
+ "source": "bdtopo",
+ "source-layer": "reservoir",
+ "paint": {"line-color": "#666666"},
+ "minzoom": 14
+ },
+ {
+ "id": "construction_surfacique_surf",
+ "type": "fill",
+ "source": "bdtopo",
+ "source-layer": "construction_surfacique",
+ "paint": {"fill-color": "#1bbfd1"},
+ "minzoom": 14
+ },
+ {
+ "id": "construction_surfacique_limites",
+ "type": "line",
+ "source": "bdtopo",
+ "source-layer": "construction_surfacique",
+ "paint": {"line-color": "#666666"},
+ "minzoom": 14
+ },
+ {
+ "id": "construction_lineaire",
+ "type": "line",
+ "source": "bdtopo",
+ "source-layer": "construction_lineaire",
+ "paint": {
+ "line-color": "#9012f6",
+ "line-width": 2
+ },
+ "layout": {"line-join": "bevel"},
+ "minzoom": 14
+ },
+ {
+ "id": "batiment_residentiel_surf",
+ "type": "fill",
+ "source": "bdtopo",
+ "source-layer": "batiment",
+ "minzoom": 14,
+ "filter": [
+ "==",
+ "usage_1",
+ "Résidentiel"
+ ],
+ "paint": {
+ "fill-color": "#ff6dee"
+ }
+ },
+ {
+ "id": "batiment_residentiel_limites",
+ "type": "line",
+ "source": "bdtopo",
+ "source-layer": "batiment",
+ "minzoom": 14,
+ "filter": [
+ "==",
+ "usage_1",
+ "Résidentiel"
+ ],
+ "paint": {
+ "line-color": "#c421dd"
+ }
+ },
+ {
+ "id": "batiment_annexe_surf",
+ "type": "fill",
+ "source": "bdtopo",
+ "source-layer": "batiment",
+ "minzoom": 14,
+ "filter": [
+ "==",
+ "usage_1",
+ "Annexe"
+ ],
+ "paint": {
+ "fill-color": "#4dc1eb"
+ }
+ },
+ {
+ "id": "batiment_annexe_limites",
+ "type": "line",
+ "source": "bdtopo",
+ "source-layer": "batiment",
+ "minzoom": 14,
+ "filter": [
+ "==",
+ "usage_1",
+ "Annexe"
+ ],
+ "paint": {
+ "line-color": "#3f42e7"
+ }
+ },
+ {
+ "id": "batiment_agricole_surf",
+ "type": "fill",
+ "source": "bdtopo",
+ "source-layer": "batiment",
+ "minzoom": 14,
+ "filter": [
+ "==",
+ "usage_1",
+ "Agricole"
+ ],
+ "paint": {
+ "fill-color": "#12e759"
+ }
+ },
+ {
+ "id": "batiment_agricole_limites",
+ "type": "line",
+ "source": "bdtopo",
+ "source-layer": "batiment",
+ "minzoom": 14,
+ "filter": [
+ "==",
+ "usage_1",
+ "Agricole"
+ ],
+ "paint": {
+ "line-color": "#028e17"
+ }
+ },
+ {
+ "id": "batiment_commercial_et_services_surf",
+ "type": "fill",
+ "source": "bdtopo",
+ "source-layer": "batiment",
+ "minzoom": 14,
+ "filter": [
+ "==",
+ "usage_1",
+ "Commercial et services"
+ ],
+ "paint": {
+ "fill-color": "#bcbcbc"
+ }
+ },
+ {
+ "id": "batiment_commercial_et_services_limites",
+ "type": "line",
+ "source": "bdtopo",
+ "source-layer": "batiment",
+ "minzoom": 14,
+ "filter": [
+ "==",
+ "usage_1",
+ "Commercial et services"
+ ],
+ "paint": {
+ "line-color": "#000000"
+ }
+ },
+ {
+ "id": "batiment_industriel_surf",
+ "type": "fill",
+ "source": "bdtopo",
+ "source-layer": "batiment",
+ "minzoom": 14,
+ "filter": [
+ "==",
+ "usage_1",
+ "Industriel"
+ ],
+ "paint": {
+ "fill-color": "#c03a78"
+ }
+ },
+ {
+ "id": "batiment_industriel_limites",
+ "type": "line",
+ "source": "bdtopo",
+ "source-layer": "batiment",
+ "minzoom": 14,
+ "filter": [
+ "==",
+ "usage_1",
+ "Industriel"
+ ],
+ "paint": {
+ "line-color": "#6c2727"
+ }
+ },
+ {
+ "id": "batiment_sportif_surf",
+ "type": "fill",
+ "source": "bdtopo",
+ "source-layer": "batiment",
+ "minzoom": 14,
+ "filter": [
+ "==",
+ "usage_1",
+ "Sportif"
+ ],
+ "paint": {
+ "fill-color": "#f3e544"
+ }
+ },
+ {
+ "id": "batiment_sportif_limites",
+ "type": "line",
+ "source": "bdtopo",
+ "source-layer": "batiment",
+ "minzoom": 14,
+ "filter": [
+ "==",
+ "usage_1",
+ "Sportif"
+ ],
+ "paint": {
+ "line-color": "#b59402"
+ }
+ },
+ {
+ "id": "batiment_religieux_surf",
+ "type": "fill",
+ "source": "bdtopo",
+ "source-layer": "batiment",
+ "minzoom": 14,
+ "filter": [
+ "==",
+ "usage_1",
+ "Religieux"
+ ],
+ "paint": {
+ "fill-color": "#c03a78"
+ }
+ },
+ {
+ "id": "batiment_religieux_limites",
+ "type": "line",
+ "source": "bdtopo",
+ "source-layer": "batiment",
+ "minzoom": 14,
+ "filter": [
+ "==",
+ "usage_1",
+ "Religieux"
+ ],
+ "paint": {
+ "line-color": "#6c2727"
+ }
+ },
+ {
+ "id": "batiment_indifferencie_surf",
+ "type": "fill",
+ "source": "bdtopo",
+ "source-layer": "batiment",
+ "minzoom": 14,
+ "filter": [
+ "==",
+ "usage_1",
+ "Indifférencié"
+ ],
+ "paint": {
+ "fill-color": "#c03a78"
+ }
+ },
+ {
+ "id": "batiment_indifferencie_limites",
+ "type": "line",
+ "source": "bdtopo",
+ "source-layer": "batiment",
+ "minzoom": 14,
+ "filter": [
+ "==",
+ "usage_1",
+ "Indifférencié"
+ ],
+ "paint": {
+ "line-color": "#6c2727"
+ }
+ },
+ {
+ "id": "cimetiere_limites",
+ "type": "line",
+ "source": "bdtopo",
+ "source-layer": "cimetiere",
+ "minzoom": 14,
+ "paint": {
+ "line-color": "#505050"
+ }
+ },
+ {
+ "id": "cimetiere_surf",
+ "type": "fill",
+ "source": "bdtopo",
+ "source-layer": "cimetiere",
+ "minzoom": 14,
+ "paint": {
+ "fill-pattern": "cimetiere"
+ }
+ },
+ {
+ "id": "construction_ponctuelle",
+ "type": "symbol",
+ "source": "bdtopo",
+ "source-layer": "construction_ponctuelle",
+ "minzoom": 14,
+ "layout": {
+ "icon-image": "construction_ponctuelle",
+ "icon-size": 1
+ }
+ },
+
+ {
+ "id": "piste_d_aerodrome_surf",
+ "type": "fill",
+ "source": "bdtopo",
+ "source-layer": "piste_d_aerodrome",
+ "minzoom": 14,
+ "paint": {
+ "fill-color": "#cbcbcb"
+ }
+ },
+ {
+ "id": "piste_d_aerodrome_limites",
+ "type": "line",
+ "source": "bdtopo",
+ "source-layer": "piste_d_aerodrome",
+ "minzoom": 14,
+ "paint": {
+ "line-color": "#000000",
+ "line-width": 1
+ }
+ },
+ {
+ "id": "equipement_de_transport",
+ "type": "line",
+ "source": "bdtopo",
+ "source-layer": "equipement_de_transport",
+ "minzoom": 15,
+ "paint": {
+ "line-color": "#000000",
+ "line-width": 1
+ }
+ },
+ {
+ "id": "aerogare",
+ "type": "fill",
+ "source": "bdtopo",
+ "source-layer": "equipement_de_transport",
+ "minzoom": 15,
+ "filter": [
+ "==",
+ "nature",
+ "Aérogare"
+ ],
+ "paint": {
+ "fill-color": "#e53d24"
+ }
+ },
+ {
+ "id": "aire_de_repos_ou_de_service",
+ "type": "fill",
+ "source": "bdtopo",
+ "source-layer": "equipement_de_transport",
+ "minzoom": 15,
+ "filter": [
+ "==",
+ "nature",
+ "Aire de repos ou de service"
+ ],
+ "paint": {
+ "fill-color": "#5499e3"
+ }
+ },
+ {
+ "id": "aire_de_triage",
+ "type": "fill",
+ "source": "bdtopo",
+ "source-layer": "equipement_de_transport",
+ "minzoom": 15,
+ "filter": [
+ "==",
+ "nature",
+ "Aire de triage"
+ ],
+ "paint": {
+ "fill-color": "#839994"
+ }
+ },
+ {
+ "id": "arret_de_voyageur",
+ "type": "fill",
+ "source": "bdtopo",
+ "source-layer": "equipement_de_transport",
+ "minzoom": 15,
+ "filter": [
+ "==",
+ "nature",
+ "Arrêt voyageurs"
+ ],
+ "paint": {
+ "fill-color": "#5428d9"
+ }
+ },
+ {
+ "id": "autre_equipement",
+ "type": "fill",
+ "source": "bdtopo",
+ "source-layer": "equipement_de_transport",
+ "minzoom": 15,
+ "filter": [
+ "==",
+ "nature",
+ "Autre équipement"
+ ],
+ "paint": {
+ "fill-color": "#ca5324"
+ }
+ },
+ {
+ "id": "carrefour",
+ "type": "fill",
+ "source": "bdtopo",
+ "source-layer": "equipement_de_transport",
+ "minzoom": 15,
+ "filter": [
+ "==",
+ "nature",
+ "Carrefour"
+ ],
+ "paint": {
+ "fill-color": "#1dc04e"
+ }
+ },
+ {
+ "id": "gare_fret_uniquement",
+ "type": "fill",
+ "source": "bdtopo",
+ "source-layer": "equipement_de_transport",
+ "minzoom": 15,
+ "filter": [
+ "==",
+ "nature",
+ "Gare fret uniquement"
+ ],
+ "paint": {
+ "fill-color": "#d29f6d"
+ }
+ },
+ {
+ "id": "gare_routiere",
+ "type": "fill",
+ "source": "bdtopo",
+ "source-layer": "equipement_de_transport",
+ "minzoom": 15,
+ "filter": [
+ "==",
+ "nature",
+ "Gare routière"
+ ],
+ "paint": {
+ "fill-color": "#df0f0f"
+ }
+ },
+ {
+ "id": "gare_voyageurs_et_fret",
+ "type": "fill",
+ "source": "bdtopo",
+ "source-layer": "equipement_de_transport",
+ "minzoom": 15,
+ "filter": [
+ "==",
+ "nature",
+ "Gare voyageurs et fret"
+ ],
+ "paint": {
+ "fill-color": "#2943ea"
+ }
+ },
+ {
+ "id": "gare_voyageurs_uniquement",
+ "type": "fill",
+ "source": "bdtopo",
+ "source-layer": "equipement_de_transport",
+ "minzoom": 15,
+ "filter": [
+ "==",
+ "nature",
+ "Gare voyageurs uniquement"
+ ],
+ "paint": {
+ "fill-color": "#712a9c"
+ }
+ },
+ {
+ "id": "parking",
+ "type": "fill",
+ "source": "bdtopo",
+ "source-layer": "equipement_de_transport",
+ "minzoom": 15,
+ "filter": [
+ "==",
+ "nature",
+ "Parking"
+ ],
+ "paint": {
+ "fill-color": "#901d92"
+ }
+ },
+ {
+ "id": "peage",
+ "type": "fill",
+ "source": "bdtopo",
+ "source-layer": "equipement_de_transport",
+ "minzoom": 15,
+ "filter": [
+ "==",
+ "nature",
+ "Péage"
+ ],
+ "paint": {
+ "fill-color": "#6da0de"
+ }
+ },
+ {
+ "id": "gare_maritime",
+ "type": "fill",
+ "source": "bdtopo",
+ "source-layer": "equipement_de_transport",
+ "minzoom": 15,
+ "filter": [
+ "==",
+ "nature",
+ "Gare maritime"
+ ],
+ "paint": {
+ "fill-color": "#233fdd"
+ }
+ },
+ {
+ "id": "port",
+ "type": "fill",
+ "source": "bdtopo",
+ "source-layer": "equipement_de_transport",
+ "minzoom": 15,
+ "filter": [
+ "==",
+ "nature",
+ "Port"
+ ],
+ "paint": {
+ "fill-color": "#367ada"
+ }
+ },
+ {
+ "id": "station_de_metro",
+ "type": "fill",
+ "source": "bdtopo",
+ "source-layer": "equipement_de_transport",
+ "minzoom": 15,
+ "filter": [
+ "==",
+ "nature",
+ "Station de métro"
+ ],
+ "paint": {
+ "fill-color": "#66c4d0"
+ }
+ },
+ {
+ "id": "station_de_tramway",
+ "type": "fill",
+ "source": "bdtopo",
+ "source-layer": "equipement_de_transport",
+ "minzoom": 15,
+ "filter": [
+ "==",
+ "nature",
+ "Station de tramway"
+ ],
+ "paint": {
+ "fill-color": "#b072a9"
+ }
+ },
+ {
+ "id": "tour_de_controle_aerien",
+ "type": "fill",
+ "source": "bdtopo",
+ "source-layer": "equipement_de_transport",
+ "minzoom": 15,
+ "filter": [
+ "==",
+ "nature",
+ "Tour de contrôle aérien"
+ ],
+ "paint": {
+ "fill-color": "#aadd0f"
+ }
+ },
+ {
+ "id": "gare_telepherique",
+ "type": "fill",
+ "source": "bdtopo",
+ "source-layer": "equipement_de_transport",
+ "minzoom": 15,
+ "filter": [
+ "==",
+ "nature",
+ "Gare téléphérique"
+ ],
+ "paint": {
+ "fill-color": "#c49c61"
+ }
+ },
+ {
+ "id": "aerodrome_limites",
+ "type": "line",
+ "source": "bdtopo",
+ "source-layer": "aerodrome",
+ "minzoom": 13,
+ "paint": {
+ "line-color": "#000000",
+ "line-width": 1
+ }
+ },
+ {
+ "id": "altiport",
+ "type": "fill",
+ "source": "bdtopo",
+ "source-layer": "aerodrome",
+ "minzoom": 13,
+ "filter": [
+ "==",
+ "nature",
+ "Altiport"
+ ],
+ "paint": {
+ "fill-color": "#70d7bf"
+ }
+ },
+ {
+ "id": "aerodrome_surf",
+ "type": "fill",
+ "source": "bdtopo",
+ "source-layer": "aerodrome",
+ "minzoom": 13,
+ "filter": [
+ "==",
+ "nature",
+ "Aérodrome"
+ ],
+ "paint": {
+ "fill-color": "#e7c8cd"
+ }
+ },
+ {
+ "id": "heliport_surf",
+ "type": "fill",
+ "source": "bdtopo",
+ "source-layer": "aerodrome",
+ "minzoom": 13,
+ "filter": [
+ "==",
+ "nature",
+ "Héliport"
+ ],
+ "paint": {
+ "fill-color": "#ff9b79"
+ }
+ },
+ {
+ "id": "transport_par_cable_dash",
+ "type": "line",
+ "source": "bdtopo",
+ "source-layer": "transport_par_cable",
+ "minzoom": 1,
+ "paint": {
+ "line-color": "rgba(0, 0, 0, 1)",
+ "line-dasharray": [0.1, 0.8],
+ "line-width": 15
+ }
+ },
+ {
+ "id": "transport_par_cable_line",
+ "type": "line",
+ "source": "bdtopo",
+ "source-layer": "transport_par_cable",
+ "minzoom": 1,
+ "paint": {
+ "line-color": "rgba(0, 0, 0, 1)",
+ "line-width": 2.5
+ }
+ },
+ {
+ "id": "ligne_electrique",
+ "type": "line",
+ "source": "bdtopo",
+ "minzoom": 12,
+ "paint": {"line-color": "#cc00cc"},
+ "layout": {"visibility": "visible"},
+ "source-layer": "ligne_electrique"
+ },
+ {
+ "id": "erp",
+ "type": "symbol",
+ "source": "bdtopo",
+ "source-layer": "erp",
+ "minzoom": 19,
+ "layout": {
+ "icon-image": "erp",
+ "icon-size": 1.5
+ }
+ },
+ {
+ "id": "pylone",
+ "type": "symbol",
+ "source": "bdtopo",
+ "source-layer": "pylone",
+ "minzoom": 14,
+ "layout": {
+ "icon-image": "pylone",
+ "icon-size": 1
+ }
+ },
+ {
+ "id": "terrain_de_sport_surf",
+ "type": "fill",
+ "source": "bdtopo",
+ "source-layer": "terrain_de_sport",
+ "paint": {"fill-color": "#7dff9e"},
+ "minzoom": 14
+ },
+ {
+ "id": "terrain_de_sport_limites",
+ "type": "line",
+ "source": "bdtopo",
+ "source-layer": "terrain_de_sport",
+ "minzoom": 14,
+ "paint": {
+ "line-color": "#0e9652",
+ "line-width": 1
+ }
+ },
+ {
+ "id": "region_limites",
+ "type": "line",
+ "paint": {
+ "line-color": "rgba(0, 0, 0, 1)",
+ "line-width": 2
+ },
+ "source": "bdtopo",
+ "source-layer": "region",
+ "layout": {"line-join": "bevel"}
+ },
+ {
+ "id": "departement_limites",
+ "type": "line",
+ "source": "bdtopo",
+ "source-layer": "departement",
+ "minzoom": 2,
+ "maxzoom": 12,
+ "paint": {
+ "line-width": 0.75,
+ "line-color": "#000000"
+ }
+ },
+ {
+ "id": "epci_limites",
+ "type": "line",
+ "source": "bdtopo",
+ "source-layer": "epci",
+ "paint": {
+ "line-width": 1.8,
+ "line-color": "#1f78b4"
+ },
+ "minzoom": 10,
+ "maxzoom": 13
+ },
+ {
+ "id": "arrondissement_limites",
+ "type": "line",
+ "source": "bdtopo",
+ "source-layer": "arrondissement",
+ "paint": {
+ "line-color": "#666666",
+ "line-dasharray": [18, 6],
+ "line-width": 0.75
+ },
+ "minzoom": 11,
+ "layout": {"line-join": "bevel"}
+ },
+ {
+ "id": "commune_limites",
+ "type": "line",
+ "source": "bdtopo",
+ "source-layer": "commune",
+ "paint": {
+ "line-color": "#999999",
+ "line-dasharray": [2, 4, 6, 4],
+ "line-width": 0.75
+ },
+ "minzoom": 11,
+ "layout": {"line-join": "bevel"}
+ },{
+ "id": "region_labels",
+ "type": "symbol",
+ "source": "bdtopo",
+ "source-layer": "region",
+ "layout": {
+ "text-field": "{nom_officiel}",
+ "text-size": 20,
+ "text-font": ["Ubuntu Regular"]
+ },
+ "minzoom": 1,
+ "maxzoom": 7
+ },
+ {
+ "id": "departement_labels",
+ "type": "symbol",
+ "source": "bdtopo",
+ "source-layer": "departement",
+ "layout": {
+ "text-field": "{nom_officiel}",
+ "text-font": ["Ubuntu Regular"],
+ "text-size": 20
+ },
+ "maxzoom": 10,
+ "minzoom": 7
+ },
+ {
+ "id": "epci_labels",
+ "type": "symbol",
+ "source": "bdtopo",
+ "source-layer": "epci",
+ "layout": {
+ "text-field": "{nom_officiel}",
+ "text-font": ["Ubuntu Bold Italic"],
+ "text-size": 16,
+ "text-allow-overlap": false,
+ "text-ignore-placement": false,
+ "icon-text-fit": "none"
+ },
+ "paint": {
+ "text-color": "#1f78b4",
+ "text-halo-color": "rgba(255, 255, 255, 1)",
+ "text-halo-width": 5
+ },
+ "minzoom": 10,
+ "maxzoom": 13
+ },
+ {
+ "id": "arrondissement_labels",
+ "type": "symbol",
+ "source": "bdtopo",
+ "source-layer": "arrondissement",
+ "minzoom": 15,
+ "layout": {
+ "text-field": "{nom_officiel}",
+ "text-font": ["Ubuntu Italic"]
+ },
+ "paint": {
+ "text-color": "rgba(0, 0, 0, 1)",
+ "text-halo-width": 1,
+ "text-halo-color": "rgba(255, 255, 255, 1)"
+ }
+ },
+ {
+ "id": "commune_labels",
+ "type": "symbol",
+ "source": "bdtopo",
+ "source-layer": "commune",
+ "minzoom": 12,
+ "layout": {
+ "text-field": "{nom_officiel}",
+ "text-font": ["Ubuntu Regular"]
+ },
+ "paint": {
+ "text-color": "rgba(0, 0, 0, 1)",
+ "text-halo-width": 5,
+ "text-halo-color": "rgba(255, 255, 255, 1)"
+ }
+ }
+ ]
+}
diff --git a/samples-src/resources/proxy/proxy.php b/samples-src/resources/proxy/proxy.php
old mode 100755
new mode 100644
diff --git a/src/Common/Controls/Editor/.gitkeep b/src/Common/Controls/Editor/.gitkeep
deleted file mode 100644
index e69de29bb..000000000
diff --git a/src/Common/Controls/ProfileElevationPathDOM.js b/src/Common/Controls/ProfileElevationPathDOM.js
index 460931ee6..7a42651fd 100644
--- a/src/Common/Controls/ProfileElevationPathDOM.js
+++ b/src/Common/Controls/ProfileElevationPathDOM.js
@@ -1,10 +1,18 @@
/* globals AmCharts, d3 */
+
+/**
+ * @module ProfileElevationPathDOM
+ * @alias [private] ProfileElevationPathDOM
+ * @description
+ * create DOM element
+ */
var ProfileElevationPathDOM = {
/**
* Gets a css property from an element
*
- * @param {String} element The element to get the property from
+ * @private
+ * @param {HTMLElement} element The element to get the property from
* @param {String} property The css property
* @returns {String} The value of the property
*
@@ -17,8 +25,9 @@ var ProfileElevationPathDOM = {
/**
* Uses canvas.measureText to compute and return the width of the given text of given font in pixels.
*
+ * @private
* @param {String} text The text to be rendered.
- * @param {String} container The container of the text
+ * @param {HTMLElement} container The container of the text
* @param {String} font The font of the container if known, format: 'weight size familiy'
* @returns {Number} The width of the text
*
@@ -26,7 +35,7 @@ var ProfileElevationPathDOM = {
*/
_getTextWidth : function (text, container, font = null) {
// re-use canvas object for better performance
- var canvas = this.canvas || (this.canvas = document.createElement("canvas"));
+ var canvas = /** ts-syntax */(this.canvas) || ((this.canvas) = document.createElement("canvas"));
var context = canvas.getContext("2d");
if (font === null) {
context.font = `${this._getCssProperty(container, "font-weight")} ${this._getCssProperty(container, "font-size")} ${this._getCssProperty(container, "font-family")}`;
@@ -41,6 +50,7 @@ var ProfileElevationPathDOM = {
/**
* Converts a data point z to svg y coord
*
+ * @private
* @param {Object} z The z to convert.
* @param {Number} pathHeight The height of the path in the svg container in px
* @param {Number} minGraphZ Min z of the graph
@@ -55,6 +65,7 @@ var ProfileElevationPathDOM = {
/**
* Converts a data point dist value to svg x coord
*
+ * @private
* @param {Number} dist The dist to convert
* @param {Number} svgWidth The witdth of the svg container in px
* @param {Number} pathWidth The witdth of the path in the svg container in px
@@ -69,6 +80,7 @@ var ProfileElevationPathDOM = {
/**
* Converts a svg x coord to dist value
*
+ * @private
* @param {Number} svgX The dist to convert
* @param {Number} svgWidth The witdth of the svg container in px
* @param {Number} pathWidth The witdth of the path in the svg container in px
@@ -83,6 +95,7 @@ var ProfileElevationPathDOM = {
/**
* Returns the index of value if it were inserted in sorted (by dist) array of data points.
*
+ * @private
* @param {Array} array Sorted array of data points (with dist property)
* @param {Number} value Value to test the index of.
* @returns {Number} The index the value would have.
@@ -103,6 +116,8 @@ var ProfileElevationPathDOM = {
/**
* Display Profile function used by default : no additonal framework needed.
+ *
+ * @public
* @param {Object} data - elevations values for profile
* @param {HTMLElement} container - html container where to display profile
* @param {Object} context - this control object
@@ -545,7 +560,7 @@ var ProfileElevationPathDOM = {
tooltipG.setAttribute("class", "tooltipInit");
tooltipG.style.pointerEvents = "none";
- pathRectangle.addEventListener("mouseover", function () {
+ function onMouseOver () {
focusLineX.setAttribute("visibility", "visible");
focusLineY.setAttribute("visibility", "visible");
focusCircle.setAttribute("visibility", "visible");
@@ -561,9 +576,9 @@ var ProfileElevationPathDOM = {
// IE... deprecated
tooltipDiv.setAttribute("class", "tooltipFadeIn");
tooltipG.setAttribute("class", "tooltipFadeIn");
- });
+ }
- pathRectangle.addEventListener("mouseout", function () {
+ function onMouseOut () {
focusLineX.setAttribute("visibility", "hidden");
focusLineY.setAttribute("visibility", "hidden");
focusCircle.setAttribute("visibility", "hidden");
@@ -576,9 +591,9 @@ var ProfileElevationPathDOM = {
// IE... deprecated
tooltipDiv.setAttribute("class", "tooltipFadeOut");
tooltipG.setAttribute("class", "tooltipFadeOut");
- });
+ }
- pathRectangle.addEventListener("mousemove", function (e) {
+ function onMouseMove (e) {
const mousePoint = elevationSvg.createSVGPoint();
mousePoint.x = e.clientX;
mousePoint.y = e.clientY;
@@ -643,7 +658,11 @@ var ProfileElevationPathDOM = {
tooltipG.setAttribute("transform", `translate(${focusX},${focusY})`); // IE11 !
tooltipG.style.transform = `translate(${focusX}px,${focusY}px)`;
- }.bind(this));
+ }
+
+ pathRectangle.addEventListener("pointerover", onMouseOver);
+ pathRectangle.addEventListener("pointerout", onMouseOut);
+ pathRectangle.addEventListener("pointermove", onMouseMove.bind(this));
dynamicsG.appendChild(pathRectangle);
elevationSvg.appendChild(dynamicsG);
@@ -655,6 +674,8 @@ var ProfileElevationPathDOM = {
/**
* Display Profile without graphical rendering (raw service response)
+ *
+ * @public
* @param {Object} data - elevations values for profile
* @param {HTMLElement} container - html container where to display profile
* @param {Object} context - this control object
@@ -702,6 +723,8 @@ var ProfileElevationPathDOM = {
/**
* Display Profile using D3 javascript framework. This method needs D3 libraries to be loaded.
+ *
+ * @public
* @param {Object} data - elevations values for profile
* @param {HTMLElement} container - html container where to display profile
* @param {Object} context - this control object
@@ -945,6 +968,8 @@ var ProfileElevationPathDOM = {
/**
* Display Profile using Amcharts framework. This method needs AmCharts libraries to be loaded.
+ *
+ * @public
* @param {Object} data - elevations values for profile
* @param {HTMLElement} container - html container where to display profile
* @param {Object} context - this control object
diff --git a/src/Common/Utils.js b/src/Common/Utils.js
index a303fb92c..c64358dac 100644
--- a/src/Common/Utils.js
+++ b/src/Common/Utils.js
@@ -16,6 +16,7 @@ var Utils = {
* this information is useful to switch to touch mode.
* Detection : test for desktop or tactile
*
+ * @function detectSupport
* @returns {Boolean} isDesktop - true for desktop userAgent, false for mobile
*/
detectSupport : function () {
@@ -45,6 +46,7 @@ var Utils = {
/**
* Copies all source object members to dest
*
+ * @function assign
* @param {Object} dest - destination object where properties and method will be copied
* @param {Object} source - source object from which properties and method will be copied
* @returns {Object} dest
@@ -62,6 +64,7 @@ var Utils = {
/**
* Merge two objects parameters (deeper than assign)
*
+ * @function mergeParams
* @param {Object} dest - destination object where properties and method will be merge
* @param {Object} source - source object from which properties and method will be merge
* @param {Boolean} replace - replace destination value by source if exists or not (true by default)
diff --git a/src/Common/Utils/CheckRightManagement.js b/src/Common/Utils/CheckRightManagement.js
index c18e899fd..f5bc57003 100644
--- a/src/Common/Utils/CheckRightManagement.js
+++ b/src/Common/Utils/CheckRightManagement.js
@@ -1,10 +1,20 @@
import Logger from "../../Common/Utils/LoggerByDefault";
import Config from "./Config";
+/**
+ * @module CheckRightManagement
+ * @alias [private] CheckRightManagement
+ * @description
+ * ...
+ *
+ * @example
+ * check();
+ */
export default {
/**
* Contrôle des droits sur les ressources.
*
+ * @function check
* @param {Object} options - liste des options
* @param {String} options.key - clef API
* @param {Array} options.resources - liste des ressources
diff --git a/src/Common/Utils/ColorUtils.js b/src/Common/Utils/ColorUtils.js
index 8ca81f7a5..dd003ed2c 100644
--- a/src/Common/Utils/ColorUtils.js
+++ b/src/Common/Utils/ColorUtils.js
@@ -1,20 +1,21 @@
/**
-* @module ColorUtils
-* @alias Gp.ColorUtils
-* @description
-* ...
-*
-* @example
-* rgbaToHex();
-* hexToRgba();
-* isHex();
-* isRGB();
-*/
+ * @module ColorUtils
+ * @alias Gp.ColorUtils
+ * @description
+ * ...
+ *
+ * @example
+ * rgbaToHex();
+ * hexToRgba();
+ * isHex();
+ * isRGB();
+ */
var ColorUtils = {
/**
* Converts rgba String to #RRGGBBAA
* (Code adapted from : https://gist.github.com/mstssk/afda4ce9e5c335fd79cd)
*
+ * @function rgbaToHex
* @param {String} rgba - A color of RGB or RGBA format.
* @returns {Object} hex and opacity formated values
*/
@@ -49,6 +50,8 @@ var ColorUtils = {
/**
* Converts hex color and opacity value to rgba String.
* (Code adapted from : http://stackoverflow.com/a/5624139)
+ *
+ * @function hexToRgba
* @param {String} hex - A color value on RGB format (hexa).
* @param {Number} opacity - A opacity value.
* @returns {String} A color of RGB or RGBA format
diff --git a/src/Common/Utils/Config.js b/src/Common/Utils/Config.js
index b037c7276..d6aa81127 100644
--- a/src/Common/Utils/Config.js
+++ b/src/Common/Utils/Config.js
@@ -2,20 +2,43 @@ import Logger from "../../Common/Utils/LoggerByDefault";
var logger = Logger.getLogger("config");
+/**
+ * @module Config
+ * @alias [private] Config
+ * @description
+ * ...
+ *
+ * @example
+ * isConfigLoaded();
+ * getLayerId();
+ * getLayerParams();
+ * getServiceParams();
+ * getResolutions();
+ * getGlobalConstraints();
+ * getTileMatrix();
+ */
var Config = {
- /** autoconf */
+ /**
+ * autoconf
+ *
+ * @public
+ * @type {Object}
+ */
configuration : null,
/**
* Controle du chargement de l'autoconf
*
- * @returns {Boolean} isConfigLoaded - True si l'autoconf a déjà été chargée, False sinon.
+ * @function isConfigLoaded
+ * @this Config
+ * @public
+ * @returns {Boolean} True si l'autoconf a déjà été chargée, False sinon.
*/
isConfigLoaded : function () {
var scope = typeof window !== "undefined" ? window : typeof self !== "undefined" ? self : typeof global !== "undefined" ? global : {};
if (scope.Gp && scope.Gp.Config && Object.keys(scope.Gp.Config).length !== 0) {
- this.configuration = scope.Gp.Config;
+ /** ts-syntax */ (this.configuration) = scope.Gp.Config;
return true;
}
return false;
@@ -24,9 +47,11 @@ var Config = {
/**
* Recuperation de l'identifiant d'une couche donnée
*
+ * @function getLayerId
+ * @public
* @param {String} layerName - nom de la couche (par ex. "ORTHOIMAGERY.ORTHOPHOTOS")
* @param {String} service - nom du service (par ex. "WMS" ou "WMTS")
- * @returns {String} layerId - identifiant de la couche (par ex. "ORTHOIMAGERY.ORTHOPHOTOS$GEOPORTAIL:OGC:WMTS")
+ * @returns {String} Identifiant de la couche (par ex. "ORTHOIMAGERY.ORTHOPHOTOS$GEOPORTAIL:OGC:WMTS")
*/
getLayerId : function (layerName, service) {
var layerId = null;
@@ -72,6 +97,8 @@ var Config = {
/**
* Récupération des paramètres nécessaires à l'affichage d'une couche WMS ou WMTS
*
+ * @function getLayerParams
+ * @public
* @param {String} layerName - nom de la couche (par ex. "ORTHOIMAGERY.ORTHOPHOTOS")
* @param {String} service - nom du service (par ex. "WMS" ou "WMTS")
* @param {String} [apiKey] - Clé de contrat API
@@ -160,6 +187,8 @@ var Config = {
/**
* Recuperation des parametres d'un service
*
+ * @function getServiceParams
+ * @public
* @param {String} [resource] - "PositionOfInterest", "StreetAddress", "Voiture", "Pieton", ...
* @param {String} [service] - Geocode, Itineraire, ...
* @param {Array} [apiKeys] - Clé(s) de contrat API
@@ -217,6 +246,8 @@ var Config = {
/**
* Resolution en geographique
*
+ * @function getResolutions
+ * @public
* @returns {Array} resolutions
*/
getResolutions : function () {
@@ -231,8 +262,10 @@ var Config = {
/**
* Recuperation des parametres TMS de la configuration
- * @param {String} tmsName - tile matrix set name
*
+ * @function getTileMatrix
+ * @public
+ * @param {String} tmsName - tile matrix set name
* @returns {Object} tile matrix set
*/
getTileMatrix : function (tmsName) {
@@ -250,6 +283,8 @@ var Config = {
/**
* Récupération des contraintes générales d'une couche donnée : extent, minScale, maxScale, projection
*
+ * @function getGlobalConstraints
+ * @public
* @param {String} layerId - identifiant de la couche
* @returns {Object} params - contraintes de la couche
* @returns {String} params.projection - Projection par défaut de la couche
diff --git a/src/Common/Utils/Draggable.js b/src/Common/Utils/Draggable.js
index edeebcb00..7e749b7d2 100644
--- a/src/Common/Utils/Draggable.js
+++ b/src/Common/Utils/Draggable.js
@@ -2,12 +2,20 @@ import Logger from "./LoggerByDefault";
var logger = Logger.getLogger("draggable");
-// FIXME le mode draggable annule le resizing de la fenêtre !?
-
+/**
+ * @module Draggable
+ * @alias [private] Draggable
+ * @description
+ * ...
+ *
+ * @example
+ * dragElement();
+ */
var Draggable = {
/**
* A draggable HTML element with JavaScript and CSS.
*
+ * @function dragElement
* @param {DOMElement} element - element
* @param {DOMElement} header - header (optional)
* @param {DOMElement} container - container (optional)
diff --git a/src/Common/Utils/LayerUtils.js b/src/Common/Utils/LayerUtils.js
index a49267540..8293a283f 100644
--- a/src/Common/Utils/LayerUtils.js
+++ b/src/Common/Utils/LayerUtils.js
@@ -13,6 +13,7 @@ var LayerUtils = {
/**
* Obtenir le ZoomLevel à partir du ScaleDenominator
+ * @function getZoomLevelFromScaleDenominator
* @param {Number} scaleDenominator - the scale denominator
* @param {String} crs - the crs
*
@@ -183,6 +184,7 @@ var LayerUtils = {
/**
* Get attributions list for a layer, based on current zoom and extent
*
+ * @function getAttributions
* @param {Object} params - function params
* @param {Array.} params.extent - map current geographical extent (EPSG:4326) : [top, left, bottom, right] = [maxy, minx, miny, maxx]
* @param {Number} params.zoom - map current zoom
@@ -298,6 +300,7 @@ var LayerUtils = {
/**
* Determines if one extent (extent1) intersects another (extent2)
*
+ * @function intersects
* @param {Array.} extent1 - First extent : [top, left, bottom, right] = [maxy, minx, miny, maxx]
* @param {Array.} extent2 - Second extent : [top, left, bottom, right] = [maxy, minx, miny, maxx]
* @return {Boolean} intersects - True if the two extents intersect, false otherwise.
diff --git a/src/Common/Utils/LoggerByDefault.js b/src/Common/Utils/LoggerByDefault.js
index 1c5622a64..bf3120cf8 100644
--- a/src/Common/Utils/LoggerByDefault.js
+++ b/src/Common/Utils/LoggerByDefault.js
@@ -1,9 +1,21 @@
import * as Log from "loglevel";
+/**
+ * @module LoggerByDefault
+ * @alias [private] LoggerByDefault
+ * @description
+ * ...
+ *
+ * @example
+ * getLogger();
+ * disableAll();
+ * enableAll();
+ */
var LoggerByDefault = {
/**
* creation d'un logger statique
*
+ * @function getLogger
* @param {String} [name="default"] - the logger name
* @returns {Object} logger
*/
@@ -25,7 +37,10 @@ var LoggerByDefault = {
var logname = name || "default";
return Log.getLogger(logname);
},
- /** desactive tous les loggers */
+ /**
+ * desactive tous les loggers
+ * @function disableAll
+ */
disableAll : function () {
var loggers = Log.getLoggers();
for (const key in loggers) {
@@ -35,7 +50,10 @@ var LoggerByDefault = {
}
}
},
- /** active tous les loggers */
+ /**
+ * active tous les loggers
+ * @function enableAll
+ */
enableAll : function () {
var loggers = Log.getLoggers();
for (const key in loggers) {
diff --git a/src/Common/Utils/MathUtils.js b/src/Common/Utils/MathUtils.js
index 8b5f7b648..9f1de8e5a 100644
--- a/src/Common/Utils/MathUtils.js
+++ b/src/Common/Utils/MathUtils.js
@@ -14,6 +14,7 @@
var MathUtils = {
/**
* Reste de la division euclidienne
+ * @function modulo
* @param {Number} a - divisor
* @param {Number} b - quotient
* @returns {Number} Modulo
@@ -27,6 +28,7 @@ var MathUtils = {
* Transform degrees, minutes, seconds form decimal degrees -
* Largely inspired by the private function degreesToStringHDMS from ol/coordinate.js
*
+ * @function decimalToDMS
* @param {Number} degrees - decimal degrees
* @param {Array} hemispheres - "NS" ou "EO"
* @param {Number} numDigits - number of digits for seconds
@@ -65,6 +67,7 @@ var MathUtils = {
/**
* Converts string to Integer
*
+ * @function toInteger
* @param {String} s - string number
* @param {Numeric} base - between 2 and 36
* @returns {null|Numeric} result
@@ -81,6 +84,7 @@ var MathUtils = {
/**
* check if s represents an integer
*
+ * @function isInteger
* @param {String} s - string number
* @returns {Boolean} is integer
*/
@@ -96,6 +100,7 @@ var MathUtils = {
/**
* Converts s to float
*
+ * @function toFloat
* @param {String} s - string number
* @returns {null|Numeric} result
*/
diff --git a/src/Common/Utils/ProxyUtils.js b/src/Common/Utils/ProxyUtils.js
index ca9acda12..8c56046d5 100644
--- a/src/Common/Utils/ProxyUtils.js
+++ b/src/Common/Utils/ProxyUtils.js
@@ -13,6 +13,7 @@ var ProxyUtils = {
/**
* Ajoute un proxy aux url des couches vecteurs si besoin.
*
+ * @function proxifyUrl
* @param {String} url - Url to proxify.
* @param {Object} [proxyOptions] - Object defining proxy options.
* @param {String} proxyOptions.proxyUrl - Proxy URL.
diff --git a/src/Common/Utils/Register.js b/src/Common/Utils/Register.js
index c1bdc18c7..94e786e62 100644
--- a/src/Common/Utils/Register.js
+++ b/src/Common/Utils/Register.js
@@ -1,7 +1,9 @@
/**
- * @private
+ * @module Register
+ * @alias [private] Register
* @description
* Register definition for IGNF, and EPSG CRS.
+ *
* @example
* Gp.Register.IGNF.AMST63
* // return : "+title=Amsterdam 1963 +proj=geocent +towgs84=109.753,-528.133,-362.244,0,0,0,0 +a=6378388.0000 +rf=297.0000000000000 +units=m +no_defs"
@@ -18,6 +20,7 @@ var Register = {
/**
* get the definition for a code
*
+ * @function get
* @param {String} name - ie. EPSG:2154 (Lambert)
* @returns {Object} definition
* @example
@@ -49,8 +52,9 @@ var Register = {
},
/**
- * does projection code exist ?
+ * does projection code exist ?
*
+ * @function exist
* @param {String} name - ie. EPSG:2154 (Lambert)
* @returns {Boolean} true/false
* @example
@@ -82,6 +86,7 @@ var Register = {
/**
* load all defs to proj4
+ * @function load
* @param {Object} Proj4 - proj4 instance
*/
load : function (Proj4) {
@@ -114,7 +119,7 @@ var Register = {
}
}
}
- this.isLoaded = true;
+ /** ts-syntax */ (this.isLoaded) = true;
}
},
@@ -133,6 +138,7 @@ var Register = {
* - ["IGNF:RGF93G"],
* - ["IGNF:WGS84G"]
*
+ * @function loadByDefault
* @param {Object} Proj4 - proj4 instance
*/
loadByDefault : function (Proj4) {
@@ -175,6 +181,8 @@ var Register = {
/**
* load only a def to proj4
+ *
+ * @function loadByName
* @param {Object} Proj4 - proj4 instance
* @param {String} name - ie. EPSG:2154 (Lambert)
* @returns {Boolean} true/false
@@ -194,7 +202,10 @@ var Register = {
return true;
},
- // definitions
+ /**
+ * definitions EPSG
+ * @enum
+ */
EPSG : {
4978 : "+proj=geocent +datum=WGS84 +units=m +no_defs ",
3857 : "+title=WGS 84 / Pseudo-Mercator +proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0 +k=1.0 +units=m +nadgrids=@null +wktext +no_defs",
@@ -476,9 +487,17 @@ var Register = {
5489 : "+title=RGAF09 geographiques (dms) +proj=longlat +nadgrids=@null +wktext +towgs84=0.0000,0.0000,0.0000 +a=6378137 +rf=298.257222101 +units=m +no_defs",
5490 : "+title=RGAF09 UTM Nord Fuseau 20 +proj=tmerc +nadgrids=@null +wktext +towgs84=0.0000,0.0000,0.0000 +a=6378137 +rf=298.257222101 +lat_0=0.000000000 +lon_0=-63.000000000 +k_0=0.99960000 +x_0=500000.000 +y_0=0.000 +units=m +no_defs"
},
+ /**
+ * definitions CRS
+ * @enum
+ */
CRS : {
84 : "+title=WGS 84 longitude-latitude +proj=longlat +ellps=WGS84 +datum=WGS84 +no_defs "
},
+ /**
+ * definitions IGNF
+ * @enum
+ */
IGNF : {
AMST63 : "+title=Amsterdam 1963 +proj=geocent +towgs84=109.753,-528.133,-362.244,0,0,0,0 +a=6378388.0000 +rf=297.0000000000000 +units=m +no_defs",
CROZ63 : "+title=Crozet 1963 +proj=geocent +nadgrids=null +wktext +towgs84=0.0000,0.0000,0.0000 +a=6378388.0000 +rf=297.0000000000000 +units=m +no_defs",
diff --git a/src/Common/Utils/SearchEngineUtils.js b/src/Common/Utils/SearchEngineUtils.js
index 8995bfb1d..7c2508318 100644
--- a/src/Common/Utils/SearchEngineUtils.js
+++ b/src/Common/Utils/SearchEngineUtils.js
@@ -1,6 +1,17 @@
+/**
+ * @module SearchEngineUtils
+ * @alias [private] SearchEngineUtils
+ * @description
+ * ...
+ *
+ * @example
+ * advancedSearchFiltersByDefault();
+ * zoomToResultsByDefault();
+ */
var SearchEngineUtils = {
/**
* Advanced Search Filters by default
+ * @function advancedSearchFiltersByDefault
*/
advancedSearchFiltersByDefault : {
PositionOfInterest : [
@@ -87,6 +98,7 @@ var SearchEngineUtils = {
/**
* Provides default zoom based on results.
*
+ * @function zoomToResultsByDefault
* @param {Object} info - location information
* @returns {Integer} zoom level
*/
diff --git a/src/Common/Utils/SelectorID.js b/src/Common/Utils/SelectorID.js
index 3a3630ee4..1b70589ef 100644
--- a/src/Common/Utils/SelectorID.js
+++ b/src/Common/Utils/SelectorID.js
@@ -1,5 +1,6 @@
/**
- * @private
+ * @module SelectorID
+ * @alias [private] SelectorID
* @description
* formalisme d'un tag ID :
* -> NAME(_ORDER)-1460636385836
@@ -14,6 +15,7 @@ var SelectorID = {
/**
* Construction d'un identifiant statique basé sur le timestamp,
* et qui s'incremente de +1 à chaque appel
+ * @function generate
*/
generate : (function () {
var timestamp = Math.floor(Date.now());
@@ -24,8 +26,8 @@ var SelectorID = {
/**
* nom du tag
+ * @function name
* @param {String} id - the id
- *
* @returns {String} index
*/
name : function (id) {
@@ -43,8 +45,9 @@ var SelectorID = {
/**
* numero d'identifiant du tag
- * @param {String} id - the id
*
+ * @function index
+ * @param {String} id - the id
* @returns {String} index
*/
index : function (id) {
@@ -63,8 +66,9 @@ var SelectorID = {
/**
* uuid du tag
- * @param {String} id - the id
*
+ * @function uuid
+ * @param {String} id - the id
* @returns {String} uuid
*/
uuid : function (id) {
diff --git a/src/Leaflet/CRS/CRS.js b/src/Leaflet/CRS/CRS.js
index 8f09925dc..5f193252a 100644
--- a/src/Leaflet/CRS/CRS.js
+++ b/src/Leaflet/CRS/CRS.js
@@ -16,7 +16,7 @@ import Epsg4326 from "./EPSG4326";
*
* @module CRS
* @alias L.geoportalCRS
- * @ignore
+ * @abstract
* @example
* var map = L.Map('divmap', {
* crs : L.geoportalCRS.EPSG2154
@@ -36,6 +36,7 @@ import Epsg4326 from "./EPSG4326";
*
* lyr.addTo(map); // ou map.addLayer(lyr);
*/
+/** @type {L.geoportalCRS} */
var CRS = {
/**
@@ -53,8 +54,8 @@ var CRS = {
/**
* CRS : Lambert 2 extened
*
- * @ignore
* @method EPSG27572
+ * @static
* @alias L.geoportalCRS.EPSG27572
* @returns {EPSG27572} epsg code
*/
@@ -67,6 +68,7 @@ var CRS = {
*
* @ignore
* @method EPSG4326
+ * @static
* @alias L.geoportalCRS.EPSG4326
* @returns {EPSG4326} epsg code
*/
diff --git a/src/Leaflet/CRS/EPSG2154.js b/src/Leaflet/CRS/EPSG2154.js
index 412b45038..4d8a58ff3 100644
--- a/src/Leaflet/CRS/EPSG2154.js
+++ b/src/Leaflet/CRS/EPSG2154.js
@@ -7,7 +7,7 @@ import Register from "../../Common/Utils/Register";
*
* Leaflet Lambert 93 (EPSG:2154) ICRS compatible definition.
*
- * @namespace
+ * @module
* @alias L.geoportalCRS.EPSG2154
* @example
* var map = L.Map('divmap', {
@@ -20,6 +20,7 @@ import Register from "../../Common/Utils/Register";
*
* lyr.addTo(map); // ou map.addLayer(lyr);
*/
+/** @type {L.geoportalCRS.EPSG2154} */
var EPSG2154 = {
/**
diff --git a/src/Leaflet/CRS/EPSG27572.js b/src/Leaflet/CRS/EPSG27572.js
index 38c43dd07..255040fca 100644
--- a/src/Leaflet/CRS/EPSG27572.js
+++ b/src/Leaflet/CRS/EPSG27572.js
@@ -6,10 +6,8 @@ import Register from "../../Common/Utils/Register";
*
* Projection Lambert 2 étendu
*
- * @ignore
- * @module EPSG27572
- * @alias EPSG27572
- * @returns {L.Proj.CRS}
+ * @module
+ * @alias L.geoportalCRS.EPSG27572
* @example
* var map = L.Map('divmap', {
* crs : L.geoportalCRS.EPSG27572
@@ -30,6 +28,7 @@ import Register from "../../Common/Utils/Register";
*
* lyr.addTo(map); // ou map.addLayer(lyr);
*/
+/** @type {L.geoportalCRS.EPSG27572} */
var EPSG27572 = {
/**
diff --git a/src/Leaflet/CRS/EPSG4326.js b/src/Leaflet/CRS/EPSG4326.js
index 8b740471b..f1e23a9a0 100644
--- a/src/Leaflet/CRS/EPSG4326.js
+++ b/src/Leaflet/CRS/EPSG4326.js
@@ -15,8 +15,8 @@ import Register from "../../Common/Utils/Register";
* (PROTOTYPE)
*
* @ignore
- * @module EPSG4326
- * @alias EPSG4326
+ * @module
+ * @alias L.geoportalCRS.EPSG2154
* @returns {L.Proj.CRS}
* @example
* var map = L.Map('divmap', {
@@ -38,6 +38,7 @@ import Register from "../../Common/Utils/Register";
*
* lyr.addTo(map); // ou map.addLayer(lyr);
*/
+/** @type {L.geoportalCRS.EPSG4326} */
var EPSG4326 = {
/**
diff --git a/src/Leaflet/Controls/ElevationPath.js b/src/Leaflet/Controls/ElevationPath.js
index 95be142d3..d482fb9d7 100644
--- a/src/Leaflet/Controls/ElevationPath.js
+++ b/src/Leaflet/Controls/ElevationPath.js
@@ -17,7 +17,7 @@ var logger = Logger.getLogger("ElevationPath");
*
* Leaflet Control Class to compute and display Profil Elevation.
*
- * Use {@link module :Controls.ElevationPath L.geoportalControl.ElevationPath()} factory to create instances of that class.
+ * Use {@link module:Controls.ElevationPath L.geoportalControl.ElevationPath()} factory to create instances of that class.
*
* **Extends** Leaflet L.Control native class.
*
diff --git a/src/Leaflet/Controls/Route.js b/src/Leaflet/Controls/Route.js
index 40af60eb4..19ae982ea 100644
--- a/src/Leaflet/Controls/Route.js
+++ b/src/Leaflet/Controls/Route.js
@@ -751,6 +751,10 @@ var Route = L.Control.extend(/** @lends L.geoportalControl.Route.prototype */ {
this._currentComputation = options.computation;
this._currentExclusions = options.exclusions;
+ if (typeof this.options.routeOptions.geometryInInstructions === "undefined") {
+ this.options.routeOptions.geometryInInstructions = true;
+ }
+
// mise en place de la patience
this._displayWaitingContainer();
@@ -763,13 +767,16 @@ var Route = L.Control.extend(/** @lends L.geoportalControl.Route.prototype */ {
graph : this._currentTransport,
routePreference : this._currentComputation,
exclusions : this._currentExclusions,
- geometryInInstructions : true, // surcharge obligatoire !
+ geometryInInstructions : this.options.routeOptions.geometryInInstructions,
distanceUnit : "m", // surcharge obligatoire !
// callback onSuccess
onSuccess : function (results) {
logger.log(results);
if (results) {
context._fillRouteResultsDetails(results);
+ if (context.options.routeOptions.onSuccess) {
+ context.options.routeOptions.onSuccess(results);
+ }
}
},
// callback onFailure
@@ -1050,12 +1057,14 @@ var Route = L.Control.extend(/** @lends L.geoportalControl.Route.prototype */ {
this._fillRouteResultsDetailsGeometry(geometry);
}
- // existe t il une geometrie pour chaque troncon de route ?
- var bGeometryInstructions = (instructions && Array.isArray(instructions) && instructions[0].geometry.length !== 0);
+ if (this.options.routeOptions.geometryInInstructions) {
+ // existe t il une geometrie pour chaque troncon de route ?
+ var bGeometryInstructions = (instructions && Array.isArray(instructions) && instructions[0].geometry.length !== 0);
- // Geometries des tronçon
- if (instructions && bGeometryInstructions) {
- this._fillRouteResultsDetailsFeatureGeometry(instructions);
+ // Geometries des tronçon
+ if (instructions && bGeometryInstructions) {
+ this._fillRouteResultsDetailsFeatureGeometry(instructions);
+ }
}
// Emprise
@@ -1114,9 +1123,9 @@ var Route = L.Control.extend(/** @lends L.geoportalControl.Route.prototype */ {
var map = this._map;
var _style = {
- color : "#ff7800",
+ color : "#ED7F10",
weight : 5,
- opacity : 0.65
+ opacity : 0.75
};
this._geojsonRoute = L.geoJson(geometry, {
diff --git a/src/Leaflet/Layers/LayerEvent.js b/src/Leaflet/Layers/LayerEvent.js
index ac436e7bc..307abee74 100644
--- a/src/Leaflet/Layers/LayerEvent.js
+++ b/src/Leaflet/Layers/LayerEvent.js
@@ -10,6 +10,7 @@ var logger = Logger.getLogger("layer-event");
* Evenement sur les couches Geoportail
* @private
*/
+/** @type {LayerEvent} */
var LayerEvent = {
_id : null,
diff --git a/src/Leaflet/Layers/Layers.js b/src/Leaflet/Layers/Layers.js
index 9721a9bed..03cd04b4a 100644
--- a/src/Leaflet/Layers/Layers.js
+++ b/src/Leaflet/Layers/Layers.js
@@ -17,6 +17,7 @@ var logger = Logger.getLogger("layers");
* layer : "ORTHOIMAGERY.ORTHOPHOTOS",
* }).addTo(map) ;
*/
+/** @type {L.geoportalLayer} */
var Layers = {
options : {},
diff --git a/src/OpenLayers/Controls/Drawing.js b/src/OpenLayers/Controls/Drawing.js
index 655a4eabd..377335b95 100644
--- a/src/OpenLayers/Controls/Drawing.js
+++ b/src/OpenLayers/Controls/Drawing.js
@@ -62,6 +62,7 @@ var logger = Logger.getLogger("Drawing");
*
* @constructor
* @alias ol.control.Drawing
+ * @type {ol.control.Drawing}
* @extends {ol.control.Control}
* @param {Object} options - options for function call.
* @param {Boolean} [options.collapsed = true] - Specify if Drawing control should be collapsed at startup. Default is true.
diff --git a/src/OpenLayers/Controls/Editor/Search.js b/src/OpenLayers/Controls/Editor/Search.js
index e1f9c49aa..ff5e18026 100644
--- a/src/OpenLayers/Controls/Editor/Search.js
+++ b/src/OpenLayers/Controls/Editor/Search.js
@@ -107,7 +107,7 @@ Search.prototype._initialize = function () {
*/
Search.prototype._initContainer = function () {
// contexte
- var self = this;
+ // var self = this;
var _search = JSON.parse(JSON.stringify(this.options.obj)); // on manipule une copie !
diff --git a/src/OpenLayers/Controls/ElevationPath.js b/src/OpenLayers/Controls/ElevationPath.js
index 979c75f43..7b52120d9 100644
--- a/src/OpenLayers/Controls/ElevationPath.js
+++ b/src/OpenLayers/Controls/ElevationPath.js
@@ -43,6 +43,7 @@ var logger = Logger.getLogger("elevationpath");
*
* @constructor
* @alias ol.control.ElevationPath
+ * @type {ol.control.ElevationPath}
* @extends ol.control.Control
* @param {Object} options - options for function call.
* @param {String} [options.apiKey] - API key for services call (isocurve and autocomplete services), mandatory if autoconf service has not been charged in advance
diff --git a/src/OpenLayers/Controls/GeoportalAttribution.js b/src/OpenLayers/Controls/GeoportalAttribution.js
index 86a9068e5..f3117fdb7 100644
--- a/src/OpenLayers/Controls/GeoportalAttribution.js
+++ b/src/OpenLayers/Controls/GeoportalAttribution.js
@@ -16,6 +16,7 @@ var logger = Logger.getLogger("geoportalattribution");
* @constructor
* @extends {ol.control.Attribution}
* @alias ol.control.GeoportalAttribution
+ * @type {ol.control.GeoportalAttribution}
* @param {Object} options - ol.control.Attribution options (see {@link http://openlayers.org/en/latest/apidoc/ol.control.Attribution.html ol.Control.Attribution})
* @fires attributions:update
* @example
diff --git a/src/OpenLayers/Controls/GetFeatureInfo.js b/src/OpenLayers/Controls/GetFeatureInfo.js
index c00cb3486..04cfa92b7 100644
--- a/src/OpenLayers/Controls/GetFeatureInfo.js
+++ b/src/OpenLayers/Controls/GetFeatureInfo.js
@@ -22,6 +22,7 @@ var logger = Logger.getLogger("getfeatureinfo");
* @constructor
* @alias ol.control.GetFeatureInfo
* @extends {ol.control.Control}
+ * @type {ol.control.GetFeatureInfo}
* @param {Object} options - control options
* @param {Array.