Skip to content

Commit

Permalink
fix(demo): demo by theme
Browse files Browse the repository at this point in the history
  • Loading branch information
mbarbeau committed Oct 10, 2019
1 parent d2608f3 commit 08d3ff7
Show file tree
Hide file tree
Showing 12 changed files with 359 additions and 334 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
"preversion": "npm run test.all && rimraf ./dist && npm run build.prod",
"version": "npm run changelog && git add -A CHANGELOG.md",
"postversion": "git push && git push --tags && rimraf igo2.zip && cd ./dist/igo2/ && zip -r ../igo2.zip ./* && npm run ghpages && npm run ghrelease",
"preghpages": "npm run build -- --configuration=github --output-path ./dist/ghpages --base-href /igo2/ && echo \"include: ['_default.json', '_contexts.json']\" > dist/ghpages/_config.yml",
"preghpages": "npm run build -- --configuration=github --output-path ./dist/ghpages --base-href /igo2/ && echo \"include: ['_default.json', '_contexts.json', '_base.json']\" > dist/ghpages/_config.yml",
"ghpages": "VERSION=$(node -p -e \"require('./package.json').version\") && npx ngh --dir=dist/ghpages --no-silent=false --message=$VERSION",
"postghpages": "rimraf ./dist/ghpages",
"ghrelease": "VERSION=$(node -p -e \"require('./package.json').version\") && publish-release --owner infra-geo-ouverte --repo igo2 --tag $VERSION --name $VERSION --reuse-release --notes \"$(npm run changelog-current -s)\" --assets dist/igo2.zip"
Expand Down
144 changes: 144 additions & 0 deletions src/contexts/_base.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,144 @@
{
"map": {
"view": {
"projection": "EPSG:3857",
"center": [-71.938087, 48.446975],
"zoom": 6,
"maxZoom": 17
}
},
"layers": [
{
"id": "fond_osm",
"title": "OSM",
"visible": false,
"baseLayer": true,
"sourceOptions": {
"type": "osm",
"attributions": "© les contributeurs <a href='https://www.openstreetmap.org/copyright' target='_blank'>d’OpenStreetMap</a> / <a href='http://www.igouverte.org/' target='_blank'>IGO2</a>"
}
},
{
"title": "Satellite",
"baseLayer": true,
"visible": false,
"sourceOptions": {
"url": "https://geoegl.msp.gouv.qc.ca/apis/carto/tms/1.0.0/orthos@EPSG_3857/{z}/{x}/{-y}.jpeg",
"attributions": "© <a href='http://www.droitauteur.gouv.qc.ca/copyright.php' target='_blank'><img src='/gouvouvert/public/images/quebec/gouv_qc_logo.png' width='64' height='14'>Gouvernement du Québec</a> / <a href='http://www.igouverte.org/' target='_blank'>IGO2</a>",
"type": "xyz"
}
},
{
"title": "Blanc",
"baseLayer": true,
"visible": false,
"sourceOptions": {
"attributions": "<a href='http://www.igouverte.org/' target='_blank'>IGO2</a>",
"url": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR42mP8/x8AAwMCAO+ip1sAAAAASUVORK5CYII=",
"type": "xyz"
}
},
{
"id": "carte_gouv_qc",
"title": "Route",
"visible": true,
"baseLayer": true,
"sourceOptions": {
"url": "https://geoegl.msp.gouv.qc.ca/apis/carto/tms/1.0.0/carte_gouv_qc_ro@EPSG_3857/{z}/{x}/{-y}.png",
"attributions": "© <a href='http://www.droitauteur.gouv.qc.ca/copyright.php' target='_blank'><img src='/gouvouvert/public/images/quebec/gouv_qc_logo.png' width='64' height='14'>Gouvernement du Québec</a> / <a href='http://www.igouverte.org/' target='_blank'>IGO2</a>",
"type": "xyz"
}
},
{
"title": "Couleur",
"baseLayer": true,
"visible": false,
"sourceOptions": {
"url": "https://geoegl.msp.gouv.qc.ca/apis/carto/tms/1.0.0/carte_adn@EPSG_3857/{z}/{x}/{-y}.png",
"attributions": "© <a href='http://www.droitauteur.gouv.qc.ca/copyright.php' target='_blank'><img src='/gouvouvert/public/images/quebec/gouv_qc_logo.png' width='64' height='14'>Gouvernement du Québec</a> / <a href='http://www.igouverte.org/' target='_blank'>IGO2</a>",
"type": "xyz"
}
},
{
"title": "Gris",
"baseLayer": true,
"visible": false,
"sourceOptions": {
"url": "https://geoegl.msp.gouv.qc.ca/apis/carto/tms/1.0.0/fond_thematique@EPSG_3857/{z}/{x}/{-y}.png",
"attributions": "© <a href='http://www.droitauteur.gouv.qc.ca/copyright.php' target='_blank'><img src='/gouvouvert/public/images/quebec/gouv_qc_logo.png' width='64' height='14'>Gouvernement du Québec</a> / <a href='http://www.igouverte.org/' target='_blank'>IGO2</a>",
"type": "xyz"
}
}
],
"toolbar": [
"searchResults",
"contextManager",
"mapDetails",
"timeAnalysis",
"ogcFilter",
"measurer",
"directions",
"catalog",
"importExport",
"print",
"shareMap",
"about"
],
"tools": [
{
"name": "searchResults",
"options": {
"focusFirst": false
}
},
{
"name": "contextManager"
},
{
"name": "about",
"options": {
"html": "<h2>IGO2</h2><p>IGO2 (<a target='_blank' href='http://igouverte.org/'>Infrastructure de Géomatique Ouverte</a> - version 2) est une solution Web gouvernementale, libre et gratuite spécialisée en géomatique.<br><br>IGO2 a été conçue grâce à un réseau d’échanges regroupant des spécialistes en développement géomatique provenant de plusieurs ministères et organismes du gouvernement du Québec et intègre plusieurs <a href='http://igouverte.org/documentation/page-services-igo-msp/'>services Web gouvernementaux</a>. Ce faisant, elle permet de tirer profit d’une multitude de données géographiques (patrimoine culturel, territoires agricoles, écoles, casernes d'incendie, villages relais, etc.) grâce à une interface cartographique accessible par un navigateur Web.<br><br>Les internautes de partout dans le monde sont encouragés à <a target='_blank' href='http://igouverte.org/contribuer/'>contribuer</a> à IGO2 en vue de l’améliorer au bénéfice de ses utilisateurs. Par son développement basé sur un modèle collaboratif (« open source »), IGO2 est en constante évolution et est basé sur plusieurs autres logiciels libres de l'industrie. <br><br>IGO2 vous permet de consulter :<ul><li>Afficher votre position géographique</li><li>Rechercher un lieu/coordonnées gps ou une adresse</li><li>Partager une vue/thème/contexte carto</li><li>Changer les fonds de carte</li><li>Catalogues de services de données</li><li>Importer/exporter un fichier vertoriel (kml, geojson, shape)</li><li>Outil d'itinéraire</li><li>Menu d'impression</li><li>Filtre temporel.</ul></p>"
}
},
{
"name": "mapDetails",
"options": {
"toggleLegendOnVisibilityChange": true,
"layerListControls": {
"excludeBaseLayers": true
}
}
},
{
"name": "shareMap",
"options": {
"hasShareMapButton": false,
"hasCopyLinkButton": true
}
},
{
"name": "measurer"
},
{
"name": "directions"
},
{
"name": "catalog"
},
{
"name": "catalogBrowser"
},
{
"name": "timeAnalysis"
},
{
"name": "ogcFilter"
},
{
"name": "importExport"
},
{
"name": "print"
}
]
}
16 changes: 10 additions & 6 deletions src/contexts/_contexts.json
Original file line number Diff line number Diff line change
@@ -1,18 +1,22 @@
[
{
"uri": "_default",
"title": "Default Context"
"title": "Simple"
},
{
"uri": "qc911",
"title": "Qc-911"
"uri": "simple2",
"title": "Simple 2"
},
{
"uri": "embacle",
"title": "Embâcle (analyse temporelle)"
"uri": "timeFilter",
"title": "Filtre temporel (Time filter)"
},
{
"uri": "ogcFilters",
"title": "Filtre attributaire (Attribute filter)"
},
{
"uri": "mapOverlay",
"title": "Map overlay Demo"
"title": "Superposition de carte (Map overlay)"
}
]
112 changes: 21 additions & 91 deletions src/contexts/_default.json
Original file line number Diff line number Diff line change
@@ -1,103 +1,33 @@
{
"uri": "_default",
"title": "Default Context",
"map": {
"view": {
"projection": "EPSG:3857",
"center": [-72, 52],
"zoom": 6
}
},
"base": "_base",
"layers": [
{
"title": "OSM",
"baseLayer": true,
"visible": false,
"title": "MSP DESSERTE MUN 911",
"sourceOptions": {
"type": "osm"
"type": "wms",
"url": "https://geoegl.msp.gouv.qc.ca/apis/ws/igo_gouvouvert.fcgi",
"params": {
"layers": "MSP_DESSERTE_MUN_911",
"version": "1.3.0"
},
"queryable": false,
"queryFormat": "gml2",
"queryTitle": "Municipalite"
}
},
{
"title": "Fond de carte du Québec",
"visible": true,
"baseLayer": true,
"title": "MSP Tel. Urgence",
"sourceOptions": {
"type": "xyz",
"url": "https://geoegl.msp.gouv.qc.ca/apis/carto/tms/1.0.0/carte_gouv_qc_public@EPSG_3857/{z}/{x}/{-y}.png",
"attributions": "© <a href='http://www.droitauteur.gouv.qc.ca/copyright.php' target='_blank'><img src='https://geoegl.msp.gouv.qc.ca/gouvouvert/public/images/quebec/gouv_qc_logo.png' width='64' height='14'>Gouvernement du Québec</a> / <a href='http://www.igouverte.org/' target='_blank'>IGO2</a>"
}
}
],
"toolbar": [
"searchResults",
"contextManager",
"mapDetails",
"directions",
"timeAnalysis",
"measurer",
"catalog",
"print",
"shareMap",
"about"
],
"tools": [
{
"name": "searchResults",
"options": {
"focusFirst": true
}
},
{
"name": "contextManager"
},
{
"name": "catalogBrowser"
},
{
"name": "catalog"
},
{
"name": "shareMap"
},
{
"name": "mapDetails",
"options": {
"toggleLegendOnVisibilityChange": false,
"layerListControls": {
"showToolbar": "always",
"excludeBaseLayers": false,
"keyword": "",
"sortedAlpha": false,
"onlyVisible": false,
"onlyInRange": false
}
}
},
{
"name": "directions"
},
{
"name": "timeAnalysis"
},
{
"name": "measurer"
},
{
"name": "catalogBrowser"
},
{
"name": "catalog"
},
{
"name": "print"
},
{
"name": "shareMap"
},
{
"name": "about",
"options": {
"html": "<h1>This is a IGO</h1>"
"type": "wms",
"url": "https://geoegl.msp.gouv.qc.ca/apis/ws/igo_gouvouvert.fcgi",
"params": {
"layers": "telephone_urg",
"version": "1.3.0"
},
"queryable": true,
"queryFormat": "gml2",
"queryTitle": "desclocal"
}
}
]
Expand Down
Loading

0 comments on commit 08d3ff7

Please sign in to comment.