Skip to content

Commit

Permalink
correctifs module ES6 (cf. issue #45) (#46)
Browse files Browse the repository at this point in the history
cf. issue #45 
* Utilisation du SDK en mode module ES6 dans un Front-End 
* Mise à jour du package *geoportal-extensions-openlayers* en version 3.0.3
et *geoportal-extensions-itowns* en version 2.2.3
  • Loading branch information
lowzonenose authored Sep 25, 2019
1 parent 28d4577 commit 0fea43c
Show file tree
Hide file tree
Showing 18 changed files with 907 additions and 99 deletions.
37 changes: 6 additions & 31 deletions DRAFT_CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,48 +1,23 @@
# SDK Geoportail 2D/3D, version 3.0.0
# SDK Geoportail 2D/3D, version 3.0.1

**06/09/2019 : version 3.0.0**
**24/09/2019 : version 3.0.1**
> Release SDK Geoportail 2D/3D
## Summary

* Migration d'OpenLayers en version 5.3.0
* Migration Itowns en version 2.13.1
* Nouvelle fonctionnalité avec l'import de couche au format *vecteur tuilé* (MapBox)
* Correctifs et amélioration suite au passage ES6
* Migration Webpack en version > 4.0.0

[semver] :
- 2D : increment semver MAJOR version
- 2D : increment semver MINOR version
- 3D : increment semver MINOR version

## Changelog

* [Changed]

- [dev-workflow] Mise à jour du package *geoportal-extensions-openlayers* en version 3.0.1
- [dev-workflow] Mise à jour du package *geoportal-extensions-itowns* en version 2.2.1
- [dev-workflow] Le moteur 3d d'itowns est intégré au bundle

* [Added]

- Ajout du package *ol-mapbox-style* en version 4.2.1
- Ajout de l'import de couche au format *vecteur tuilé* (MapBox)
- Description de la variable globale **Gp** dans la jsdoc
- Ajout des options natives pour le controle *Graticule* (ex. showLabels)

* [Deprecated]

- [dev-workflow] protocole HTTPS : ne plus executer les exemples sur un serveur en HTTP !

* [Removed]

- suppression des liens sur 'http://depot.ign.fr/' dans la jsdoc
- [dev-workflow] Mise à jour du package *geoportal-extensions-openlayers* en version 3.0.3
- [dev-workflow] Mise à jour du package *geoportal-extensions-itowns* en version 2.2.3

* [Fixed]

- [#32](https://github.com/IGNF/geoportal-sdk/issues/32) - Chemin par défaut de la librairie itowns embarquée dans le SDK
- [#38](https://github.com/IGNF/geoportal-sdk/issues/38) - Encapsulation d'un composant dans une DIV utilisateur (option.div)

* [Security]

- [dev-workflow] Mise à jour des dependances (faille de sécurité)
- [#45](https://github.com/IGNF/geoportal-sdk/issues/45) - Dépendances manquantes ?
13 changes: 7 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{
"name": "geoportal-sdk",
"version": "3.0.0",
"date": "06/09/2019",
"SDK2DVersion": "3.0.0",
"SDK3DVersion": "3.0.0",
"version": "3.0.1",
"date": "24/09/2019",
"SDK2DVersion": "3.0.1",
"SDK3DVersion": "3.0.1",
"description": "French Geoportal SDK based on OpenLayers (2D) and iTowns (3D) libraries",
"main": "dist/2d/GpSDK2D-src.js, dist/3d/GpSDK3d-src.js",
"module": "src/SDK2D.js, src/SDK3D.js",
Expand Down Expand Up @@ -64,8 +64,9 @@
"eslint-plugin-standard": "^4.0.0",
"exports-loader": "^0.7.0",
"expose-loader": "^0.7.5",
"geoportal-extensions-itowns": "2.2.1",
"geoportal-extensions-openlayers": "3.0.1",
"fs-extra": "^8.1.0",
"geoportal-extensions-itowns": "2.2.3",
"geoportal-extensions-openlayers": "3.0.3",
"handlebars": "^4.1.2",
"handlebars-layouts": "^3.1.4",
"html-webpack-plugin": "^3.1.0",
Expand Down
2 changes: 0 additions & 2 deletions scripts/release/.gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,2 @@
/geoportal-sdk-2d
/geoportal-sdk-3d

*.tgz
9 changes: 9 additions & 0 deletions scripts/release/build-pack.sh
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,15 @@ build () {
doCmd "cp -r ../../src/Itowns/ ./${main_directory}/src/."
}

# flag de compilation
[ ${name} == "2d" ] && {
doCmd 'find ./${main_directory}/src/ -type f -name "*.js" -exec sed -i "s/__SWITCH2D3D_ALLOWED__/false/g" {} +'
}
[ ${name} == "3d" ] && {
doCmd 'find ./${main_directory}/src/ -type f -name "*.js" -exec sed -i "s/__SWITCH2D3D_ALLOWED__/true/g" {} +'
}


# package.json
# lecture du package.json du projet
export _PACKAGE_FIELD_NAME="SDK"${ucname}"Version"
Expand Down
Binary file added scripts/release/ignf-geoportal-sdk-2d-3.0.1.tgz
Binary file not shown.
Binary file added scripts/release/ignf-geoportal-sdk-3d-3.0.1.tgz
Binary file not shown.
33 changes: 18 additions & 15 deletions scripts/release/package-SDK2D.json
Original file line number Diff line number Diff line change
@@ -1,34 +1,37 @@
{
"repository" : {
"url" : "https://github.com/IGNF/geoportal-sdk.git",
"type" : "git"
},
"dependencies" : {},
"files" : [
"dist/",
"src/",
"LICENCE.md",
"README.md",
"package.json"
],
"main" : "dist/GpSDK2D-src.js",
"module" : "src/SDK2D.js",
"homepage" : "https://geoservices.ign.fr/documentation/utilisation_web/sdk.html",
"description" : "French Geoportal SDK based on OpenLayers (2D)",
"author" : "IGNF",
"keywords" : [
"openlayers",
"geoportail",
"webservice",
"javascript"
],
"name" : "@ignf-geoportal/sdk-2d",
"version" : "3.0.1",
"directories" : {},
"scripts" : {},
"repository" : {
"url" : "https://github.com/IGNF/geoportal-sdk.git",
"type" : "git"
},
"license" : "CECILL-B",
"dependencies" : {
"ol" : "5.3.0",
"geoportal-extensions-openlayers" : "3.0.3"
},
"module" : "src/SDK2D.js",
"main" : "dist/GpSDK2D-src.js",
"homepage" : "https://geoservices.ign.fr/documentation/utilisation_web/sdk.html",
"description" : "French Geoportal SDK based on OpenLayers (2D)",
"bugs" : {
"url" : "https://github.com/IGNF/geoportal-sdk/issues"
},
"scripts" : {},
"directories" : {},
"version" : "3.0.0",
"date" : "06/09/2019",
"license" : "CECILL-B"
"name" : "@ignf-geoportal/sdk-2d",
"date" : "24/09/2019"
}
39 changes: 22 additions & 17 deletions scripts/release/package-SDK3D.json
Original file line number Diff line number Diff line change
@@ -1,35 +1,40 @@
{
"homepage" : "https://geoservices.ign.fr/documentation/utilisation_web/sdk.html",
"version" : "3.0.1",
"repository" : {
"type" : "git",
"url" : "https://github.com/IGNF/geoportal-sdk.git"
},
"scripts" : {},
"bugs" : {
"url" : "https://github.com/IGNF/geoportal-sdk/issues"
},
"dependencies" : {
"geoportal-extensions-openlayers" : "3.0.3",
"itowns" : "2.13.1",
"geoportal-extensions-itowns" : "2.2.3",
"ol" : "5.3.0"
},
"date" : "24/09/2019",
"keywords" : [
"openlayers",
"itowns",
"geoportail",
"webservice",
"javascript"
],
"version" : "3.0.0",
"author" : "IGNF",
"directories" : {},
"files" : [
"dist/",
"src/",
"LICENCE.md",
"README.md",
"package.json"
],
"scripts" : {},
"bugs" : {
"url" : "https://github.com/IGNF/geoportal-sdk/issues"
},
"directories" : {},
"main" : "dist/GpSDK3D-src.js",
"license" : "CECILL-B",
"author" : "IGNF",
"dependencies" : {},
"description" : "French Geoportal SDK based on OpenLayers (2D) and iTowns (3D) libraries",
"homepage" : "https://geoservices.ign.fr/documentation/utilisation_web/sdk.html",
"name" : "@ignf-geoportal/sdk-3d",
"module" : "src/SDK3D.js",
"date" : "06/09/2019",
"repository" : {
"type" : "git",
"url" : "https://github.com/IGNF/geoportal-sdk.git"
}
"main" : "dist/GpSDK3D-src.js",
"description" : "French Geoportal SDK based on OpenLayers (2D) and iTowns (3D) libraries",
"module" : "src/SDK3D.js"
}
3 changes: 2 additions & 1 deletion src/Interface/IMapBase.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
/* global __SWITCH2D3D_ALLOWED__ */

import Logger from "../Utils/LoggerByDefault";
import { transform as olTransformProj } from "ol/proj";
import { Services, ProxyUtils } from "geoportal-extensions-openlayers";
Expand Down Expand Up @@ -194,6 +193,8 @@ function IMap (opts) {
// intialisation de la carte (à vide)
this._initMap();

// Substitute global constants configured at compile time
// cf. webpack.config.js
if (__SWITCH2D3D_ALLOWED__) {
this.switch2D3D = switch2D3D.bind(this);
}
Expand Down
118 changes: 118 additions & 0 deletions src/Itowns/CSS/ItMap.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,118 @@
/* Feature info popup */

.gp-feature-info-div-it {
position: absolute;
z-index: 10;
overflow: auto;
max-width: calc(100vw - 80px);
min-height: 30px;
padding: 10px;
border-radius: 10px;
font-size: 0.75em;
font-family: "Open Sans", sans-serif;
color: #002A50;
background-color: #FFF;
box-shadow: 0 0 5px #000;
}

/*
.gp-feature-info-div-it::before {
content: "";
position: absolute;
border-top: 15px solid #FFF;
border-right: 14px solid transparent;
border-left: 14px solid transparent;
bottom: -15px;
margin-left: -14px;
left: 50%;
}*/

.gp-feature-info-div-it .closer {
position: absolute;
display: block;
width: 30px;
height: 30px;
top: 0;
right: 0;
border: none;
cursor: pointer;
border-top-right-radius: 10px;
background-color: #FFF;
background-repeat: no-repeat;
background-image: url("img/close-emeraud.svg");
background-size: 14px 14px;
background-position: center;
}

.gp-features-content-div-it {
max-width: 420px;
min-width: 260px;
max-height: 340px;
/*overflow: auto;*/
}

.gp-features-content-div-it h5,
.gp-features-content-div-it h6,
.gp-features-content-div-it p,
.gp-features-content-div-it ul {
margin: 0;
}

.gp-features-content-div-it ul {
padding: 0;
list-style-type: none;
}

.geoportail-popup-content h5,
.geoportail-popup-content h6,
.geoportail-popup-content p,
.gp-att-name-div,
.gp-att-description-div,
.gp-att-others-div {
padding: 0 10px;
}

.geoportail-popup-content h5:not(:last-child),
.geoportail-popup-content h6:not(:last-child),
.geoportail-popup-content p:not(:last-child),
.gp-att-description-div:not(:last-child),
.gp-att-others-div:not(:last-child) {
margin-bottom: 15px;
}

.geoportail-popup-content h5:last-child,
.geoportail-popup-content h6:last-child,
.geoportail-popup-content p:last-child,
.gp-att-description-div:last-child,
.gp-att-others-div:last-child,
.gp-att-name-div {
margin-bottom: 10px;
}

.geoportail-popup-content h5:first-child,
.geoportail-popup-content h6:first-child,
.geoportail-popup-content p:first-child,
.gp-att-name-div:first-child,
.gp-att-description-div:first-child,
.gp-att-others-div:first-child {
margin-top: 10px;
}

.gp-att-name-div,
.gp-features-content-div-it h5 {
padding-right: 35px;
font-weight: bold;
font-size: 1.2em;
text-transform: uppercase;
color: #0B6BA7;
}

.gp-features-content-div-it h6 {
font-size: 1.1em;
}

.gp-att-description-div:not(:last-child),
.gp-att-others-div:not(:last-child) {
padding-bottom: 10px;
border-bottom: 1px dotted #666;
}
1 change: 1 addition & 0 deletions src/Itowns/CSS/img/close-emeraud.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 0fea43c

Please sign in to comment.