Skip to content

Commit

Permalink
Merge pull request #1825 from jolevesq/1817-osdp
Browse files Browse the repository at this point in the history
feature(demo): Add demo for OSDP configuration (#1825)

Co-Authored-By: jolevesq <[email protected]>
  • Loading branch information
jolevesq and jolevesq authored Feb 20, 2024
2 parents 65f743c + cbcd209 commit fc1b7b6
Show file tree
Hide file tree
Showing 36 changed files with 1,405 additions and 332 deletions.
10 changes: 10 additions & 0 deletions packages/geoview-core/public/configs/OSDP/osdp-land-swiper.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"orientation": "vertical",
"keyboardOffset": 10,
"layers": [
"LYR1"
],
"suportedLanguages": [
"en"
]
}
52 changes: 52 additions & 0 deletions packages/geoview-core/public/configs/OSDP/osdp-land.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
{
"map": {
"interaction": "dynamic",
"viewSettings": {
"zoom": 8,
"center": [-113, 57.5],
"projection": 3978
},
"basemapOptions": {
"basemapId": "transport",
"shaded": true,
"labeled": true
},
"listOfGeoviewLayerConfig": [
{
"geoviewLayerId": "LYR1",
"geoviewLayerName": { "en": "2010 Land Cover of Canada" },
"metadataAccessPath": {
"en": "https://datacube.services.geo.ca/web/landcover.xml"
},
"geoviewLayerType": "ogcWms",
"listOfLayerEntryConfig": [
{
"layerId": "landcover-2010"
}
]
},
{
"geoviewLayerId": "LYR2",
"geoviewLayerName": { "en": "2015 Land Cover of Canada" },
"metadataAccessPath": {
"en": "https://datacube.services.geo.ca/web/landcover.xml"
},
"geoviewLayerType": "ogcWms",
"listOfLayerEntryConfig": [
{
"layerId": "landcover-2015"
}
]
}
]
},
"components": ["north-arrow", "overview-map"],
"footerBar": {
"tabs": {
"core": ["legend", "layers", "details", "data-table"]
}
},
"corePackages": [ "swiper"],
"theme": "geo.ca",
"suportedLanguages": ["en"]
}
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"metadataAccessPath": {
"en": "https://maps-cartes.services.geo.ca/server_serveur/rest/services/NRCan/historical_flood_event_en/MapServer/"
},
"geoviewLayerType": "esriDynamic",
"geoviewLayerType": "esriFeature",
"listOfLayerEntryConfig": [
{
"layerId": "0"
Expand Down
1 change: 1 addition & 0 deletions packages/geoview-core/public/css/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ html {
body {
margin: 0;
padding: 50px;
background-color: #ffffff !important;
}

td {
Expand Down
146 changes: 72 additions & 74 deletions packages/geoview-core/public/index.html
Original file line number Diff line number Diff line change
@@ -1,76 +1,74 @@
<!DOCTYPE html>
<html lang="en">

<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>
<%= htmlWebpackPlugin.options.title %>
</title>
<link rel="shortcut icon" href="./favicon.ico" />
<link rel="stylesheet" href="css/style.css" />
<link href="https://fonts.googleapis.com/css?family=Roboto|Montserrat:200,300,400,900|Merriweather" rel="stylesheet"
type="text/css" />
</head>

<body>
<div>
<img class="center-logo header-logo" alt="logo" src="./img/Logo.png" />
<h1 class="index-header-title"><strong>Plateforme Géospatiale Canadienne (PGC) - Projet GeoView -</strong></h1>
<h1 class="index-header-title"><strong>Canadian Geospatial Platform (CGP) - GeoView Project -</strong></h1>
<hr />
<hr />
<br />
<br />
<h4>Sandbox</h4>
<a class="page-link" href="./sandbox.html">Sandbox</a>
<h4>Basic Maps</h4>
<a class="page-link" href="./use-cases.html">Use Cases</a>
<a class="page-link" href="./basemaps.html">Basemaps</a>
<a class="page-link" href="./projections.html">Projections</a>
<a class="page-link" href="./languages.html">Languages</a>
<h4>Basic Raw Components</h4>
<a class="page-link" href="./raw-feature-info.html">Basic Details</a>
<a class="page-link" href="./raw-data-table.html">Basic Data Table</a>
<a class="page-link" href="./raw-add-layers.html">Basic Add Layers</a>
<a class="page-link" href="./raw-app-bar.html">Basic App Bar Tabs</a>
<h4>Basic Loading</h4>
<a class="page-link" href="./default-config.html">Default Configuration</a>
<a class="page-link"
href="./api-loads.html?geoms=000183ed-8864-42f0-ae43-c4313a860720,0083baf1-8145-4207-a84f-3d85ef2943a5">API
loads</a>
<a class="page-link" href="./type-of-layers.html">Type Of Layers</a>
<a class="page-link" href="./pygeoapi-processes.html">pygeoapi process</a>
<a class="page-link" href="./layers-temporal.html">Layers - Temporal</a>
<h4>Internal Package</h4>
<a class="page-link" href="./loading-packages.html">Loading Packages</a>
<a class="page-link" href="./package-basemap-panel.html">Package - Basemap Panel</a>
<a class="page-link" href="./package-swiper.html">Package - Swiper</a>
<a class="page-link" href="./package-time-slider.html">Package - Time Slider</a>
<a class="page-link" href="./package-geochart.html">Package - GeoChart</a>
<a class="page-link" href="./package-footer-panel-geochart.html">Package - GeoChart (footer)</a>
<h4>API and Events</h4>
<a class="page-link" href="./api-functions-test.html">API Functions Test</a>
<a class="page-link" href="./events.html">Events</a>
<a class="page-link" href="./add-panels.html">Add Panels</a>
<a class="page-link" href="./geometry.html">Geometry</a>
<a class="page-link" href="./footer-bar.html">Footer bar (vanilla JS)</a>
<h4>UI Components</h4>
<a class="page-link" href="./ui-components.html">UI Components</a>
<a class="page-link" href="./theme-switching.html">Theme Switching</a>
<h4>Interactions</h4>
<a class="page-link" href="./inter-all.html">Interactions (all-in)</a>
<a class="page-link" href="./inter-select.html">Select</a>
<a class="page-link" href="./inter-draw.html">Draw</a>
<a class="page-link" href="./inter-modify.html">Modify</a>
<a class="page-link" href="./inter-translate.html">Translate</a>
<a class="page-link" href="./inter-snap.html">Snap</a>
<a class="page-link" href="./inter-extent.html">Extent</a>
<h4>Other</h4>
<a class="page-link" href="./responsive_page.html">Responsive Page</a>
<a class="page-link" href="./load-test.html">Performance Test</a>
<a class="page-link" href="./cgdi-demo.html">CGDI Demo</a>
</div>
</body>

</html>
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>
<%= htmlWebpackPlugin.options.title %>
</title>
<link rel="shortcut icon" href="./favicon.ico" />
<link rel="stylesheet" href="css/style.css" />
<link href="https://fonts.googleapis.com/css?family=Roboto|Montserrat:200,300,400,900|Merriweather" rel="stylesheet"
type="text/css" />
</head>

<body>
<div>
<img class="center-logo header-logo" alt="logo" src="./img/Logo.png" />
<h1 class="index-header-title"><strong>Plateforme Géospatiale Canadienne (PGC) - Projet GeoView -</strong></h1>
<h1 class="index-header-title"><strong>Canadian Geospatial Platform (CGP) - GeoView Project -</strong></h1>
<hr />
<hr />
<br />
<br />
<h4>Sandbox</h4>
<a class="page-link" href="./sandbox.html">Sandbox</a>
<h4>Basic Maps</h4>
<a class="page-link" href="./use-cases.html">Use Cases</a>
<a class="page-link" href="./basemaps.html">Basemaps</a>
<a class="page-link" href="./projections.html">Projections</a>
<a class="page-link" href="./languages.html">Languages</a>
<h4>Basic Raw Components</h4>
<a class="page-link" href="./raw-feature-info.html">Basic Details</a>
<a class="page-link" href="./raw-add-layers.html">Basic Add Layers</a>
<a class="page-link" href="./raw-app-bar.html">Basic App Bar Tabs</a>
<h4>Basic Loading</h4>
<a class="page-link" href="./default-config.html">Default Configuration</a>
<a class="page-link" href="./api-loads.html?geoms=000183ed-8864-42f0-ae43-c4313a860720,0083baf1-8145-4207-a84f-3d85ef2943a5"
>API loads</a
>
<a class="page-link" href="./type-of-layers.html">Type Of Layers</a>
<a class="page-link" href="./pygeoapi-processes.html">pygeoapi process</a>
<a class="page-link" href="./layers-temporal.html">Layers - Temporal</a>
<h4>Internal Package</h4>
<a class="page-link" href="./loading-packages.html">Loading Packages</a>
<a class="page-link" href="./package-basemap-panel.html">Package - Basemap Panel</a>
<a class="page-link" href="./package-swiper.html">Package - Swiper</a>
<a class="page-link" href="./package-time-slider.html">Package - Time Slider</a>
<a class="page-link" href="./package-geochart.html">Package - GeoChart</a>
<a class="page-link" href="./package-footer-panel-geochart.html">Package - GeoChart (footer)</a>
<h4>API and Events</h4>
<a class="page-link" href="./api-functions-test.html">API Functions Test</a>
<a class="page-link" href="./events.html">Events</a>
<a class="page-link" href="./add-panels.html">Add Panels</a>
<a class="page-link" href="./geometry.html">Geometry</a>
<a class="page-link" href="./footer-bar.html">Footer bar (vanilla JS)</a>
<h4>UI Components</h4>
<a class="page-link" href="./ui-components.html">UI Components</a>
<a class="page-link" href="./theme-switching.html">Theme Switching</a>
<h4>Interactions</h4>
<a class="page-link" href="./inter-all.html">Interactions (all-in)</a>
<a class="page-link" href="./inter-select.html">Select</a>
<a class="page-link" href="./inter-draw.html">Draw</a>
<a class="page-link" href="./inter-modify.html">Modify</a>
<a class="page-link" href="./inter-translate.html">Translate</a>
<a class="page-link" href="./inter-snap.html">Snap</a>
<a class="page-link" href="./inter-extent.html">Extent</a>
<h4>Demos</h4>
<a class="page-link" href="./demos.html">Specific Demos Pages</a>
<h4>Other</h4>
<a class="page-link" href="./responsive_page.html">Responsive Page</a>
<a class="page-link" href="./load-test.html">Performance Test</a>
</div>
</body>
</html>
3 changes: 2 additions & 1 deletion packages/geoview-core/public/locales/en/translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,8 @@
"changeDisplayLanguageLayers": "Layers can not be relaoded because the configuration does not support this language",
"changeDisplayLanguage": "Only 'en' and 'fr' are supported",
"changeDisplayTheme": "Theme unsuported",
"changeDisplayProjection": "Projection unsuported"
"changeDisplayProjection": "Projection unsuported",
"invalidConfig": "Invalid JSON config, default configuration applied"
},
"exportModal": {
"title": "Export Map as PNG",
Expand Down
3 changes: 2 additions & 1 deletion packages/geoview-core/public/locales/fr/translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,8 @@
"changeDisplayLanguageLayers": "Les couches ne peuvent être chargée(s) de nouveau car la configuration ne supporte pas ce langage",
"changeDisplayLanguage": "Seulement 'en' et 'fr' sont supporées",
"changeDisplayTheme": "Theme non supporté",
"changeDisplayProjection": "Projection non supportée"
"changeDisplayProjection": "Projection non supportée",
"invalidConfig": "Configuration JSON non valide, configuration par défaut appliquée"
},
"exportModal": {
"title": "Exporter la carte en PNG",
Expand Down
3 changes: 0 additions & 3 deletions packages/geoview-core/public/templates/add-panels.html
Original file line number Diff line number Diff line change
Expand Up @@ -75,9 +75,6 @@ <h1><strong>Add Panels</strong></h1>
}"
></div>
<p></p>
<button type="button" class="collapsible">Configuration Snippet</button>
<pre id="mapWMCS" class="panel"></pre>
<hr />

<button type="button" class="collapsible">Code Snippet</button>
<pre id="codeSnippet" class="panel"></pre>
Expand Down
6 changes: 3 additions & 3 deletions packages/geoview-core/public/templates/codedoc.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ function sleep(milliseconds) {
}

function createCodeSnippet() {
sleep(1000);
sleep(500);

const scripts = Array.prototype.filter.call(document.getElementsByTagName('script'), (obj) => {
return obj.getAttribute('id') === null;
Expand All @@ -27,7 +27,7 @@ function createCodeSnippet() {
}

function createCodeSnippetUsingIDs() {
sleep(1000);
sleep(500);

// Enhanced code snippet generator which allows to associate a script id with a code snippet script (og function is using indexes)
// and write down different code snippet spreaded in the dom tree (og function always reuses 'script' variable which is the last script tag found in the dom)
Expand All @@ -48,7 +48,7 @@ function createCodeSnippetUsingIDs() {
}

function createConfigSnippet() {
sleep(1000);
sleep(500);

let j = 0;
// inject configuration snippet inside panel
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ <h1><strong>CGDI Water Resources Demo</strong></h1>
</td>
</tr>
<tr>
<td><a href="./index.html">Main</a><br /></td>
<td><a href="./demos.html">Main</a><br /></td>
</tr>
</tbody>
</table>
Expand Down
Loading

0 comments on commit fc1b7b6

Please sign in to comment.