Skip to content

Commit

Permalink
Deploying to gh-pages from @ 7438da9 🚀
Browse files Browse the repository at this point in the history
  • Loading branch information
jolevesq committed Oct 17, 2024
0 parents commit 05992c1
Show file tree
Hide file tree
Showing 770 changed files with 942,725 additions and 0 deletions.
Binary file added 0515ab82dae6923cab85.woff
Binary file not shown.
Binary file added 1431d1cef06ad04f5458.woff2
Binary file not shown.
Binary file added 169619821ea93019d1bb.woff2
Binary file not shown.
Binary file added 182712ab85f1472cdb2f.woff
Binary file not shown.
Binary file added 198a421f279162d59143.woff
Binary file not shown.
Binary file added 1a05a4887ccb810cb4dd.woff
Binary file not shown.
Binary file added 1f075502d0094a398e21.woff
Binary file not shown.
Binary file added 227c93190fe7f82de3f8.woff2
Binary file not shown.
Binary file added 249853776d22a271b2b5.woff
Binary file not shown.
Binary file added 252057e589a0379208ed.woff
Binary file not shown.
Binary file added 268f264f58eba5c07c88.woff
Binary file not shown.
Binary file added 3230f9b040f3c630e0c3.woff2
Binary file not shown.
Binary file added 32fc45a3d1e8ea11fabc.woff2
Binary file not shown.
Binary file added 3425a701027d0699e369.woff2
Binary file not shown.
Binary file added 3503ec5cc6330e21f695.woff
Binary file not shown.
Binary file added 35b9d6be04b95f0f0530.woff2
Binary file not shown.
Binary file added 392a45a84c081c4b412d.woff
Binary file not shown.
Binary file added 3f2b9a42f643e62a49b7.woff
Binary file not shown.
Binary file added 4777461b144e55145268.woff2
Binary file not shown.
Binary file added 4df79f684fcbca8386bd.woff
Binary file not shown.
Binary file added 50e795c1345353b0e996.woff2
Binary file not shown.
Binary file added 5b5f2f31962967dfc22c.woff
Binary file not shown.
Binary file added 62ced72e5832f02c2796.woff2
Binary file not shown.
Binary file added 657896dad292ee9a0a0a.woff
Binary file not shown.
Binary file added 666d7a2f9db53cf52e2d.woff
Binary file not shown.
Binary file added 6fb9cffb1d3e72bf9293.woff2
Binary file not shown.
Binary file added 71a33b6b50457b2c903a.woff2
Binary file not shown.
Binary file added 804378952da8a10faae2.woff2
Binary file not shown.
Binary file added 8472d69545c7409091b4.woff
Binary file not shown.
Binary file added 861b791f9de857a6e7bc.woff2
Binary file not shown.
Binary file added 8ecd7085cfe9bc2c22ac.woff
Binary file not shown.
Binary file added 9165081d10e1ba601384.woff2
Binary file not shown.
Binary file added 965aebef74db72eaf236.woff
Binary file not shown.
Binary file added 9ac81fefbe6c319ea40b.woff2
Binary file not shown.
Binary file added a84892c56152037b3552.woff
Binary file not shown.
97 changes: 97 additions & 0 deletions add-layers.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,97 @@
<!doctype html><html lang="en"><head><meta charset="UTF-8"/><meta name="viewport" content="width=device-width,initial-scale=1"/><title>Add Layers Panel - Canadian Geospatial Platform Viewer</title><link rel="shortcut icon" href="./favicon.ico"/><meta name="msapplication-TileColor" content="#da532c"/><meta name="msapplication-config" content="./img/browserconfig.xml"/><meta name="theme-color" content="#ffffff"/><meta name="msapplication-TileColor" content="#da532c"/><meta name="theme-color" content="#ffffff"/><link rel="stylesheet" href="css/style.css"/><style>li.source-link {
cursor: pointer;
color: #6082b6;
}

.sourceLinkCopied {
position: fixed;
top: 6px;
right: 6px;
background-color: darkblue;
color: white;
padding: 16px;
font-size: 16px;
min-width: 150px;
text-align: center;
border-radius: 5px;
z-index: 1;
}</style><script src="cgpv-main.js"></script></head><body><div class="header-table"><table><tbody><tr><td><img class="header-logo" alt="logo" src="./img/Logo.png"/></td><td class="header-title"><h1><strong>Add Layers Panel</strong></h1></td></tr><tr><td><a href="./index.html">Main</a><br/><a href="#HUC1">Default Configuration</a><br/></td></tr></tbody></table><table><tbody><tr><td>This page is used to showcase loading "Layers Panel" with the ability to add various layer types.</td></tr></tbody></table></div><div class="map-title-holder"><h4 id="HUC1">1. Default Configuration</h4><a class="ref-link" href="#top">Top</a></div><select name="projections" id="projections"><option value="3857">Web Mercator (3857)</option><option value="3978">LCC (3978)</option></select> <button type="button" onclick="reloadMap()">Set Projection</button><div id="mapWM" class="geoview-map" data-lang="en" data-config="{
'map': {
'interaction': 'dynamic',
'viewSettings': {
'projection': 3857
},
'basemapOptions': {
'basemapId': 'transport',
'shaded': true,
'labeled': true
},
'listOfGeoviewLayerConfig': []
},
'theme': 'geo.ca',
'components': [],
'footerBar': {
'tabs': {
'core': ['legend', 'layers', 'details', 'data-table', 'geochart', 'time-slider']
}
},
'corePackages': [],
'externalPackages': [],
'appBar': {
'tabs': {
'core': ['legend', 'layers', 'details', 'data-table', 'geochart']
}
}
}"></div><h4>Add Layer Examples</h4><div style="font-size: smaller"><div>ESRI Feature Service Layer<ul><li class="source-link">https://maps-cartes.services.geo.ca/server_serveur/rest/services/NRCan/forest_industry_hotspots_en/MapServer/0</li></ul></div><div>ESRI Dynamic Service Layer<ul><li class="source-link">https://maps-cartes.services.geo.ca/server_serveur/rest/services/NRCan/historical_flood_event_en/MapServer</li><li class="source-link">https://maps-cartes.services.geo.ca/server_serveur/rest/services/NRCan/forest_industry_hotspots_en/MapServer</li></ul></div><div>ESRI Image Layer<ul><li class="source-link">https://www5.agr.gc.ca/atlas/rest/services/app_agclimate_agclimat/agclimate_tx/ImageServer/</li></ul></div><div>WMS Layer<ul><li class="source-link">https://ows.mundialis.de/services/service</li><li>https://datacube.services.geo.ca/ows/msi?request=GetCapabilities&service=wms&version=1.3.0&layers=msi</li></ul></div><div>WFS Layer<ul><li class="source-link">https://ahocevar.com/geoserver/wfs?REQUEST=GetCapabilities&VERSION=2.0.0&SERVICE=WFS</li></ul></div><div>XYZ Layer<ul><li class="source-link">https://server.arcgisonline.com/ArcGIS/rest/services/World_Topo_Map/MapServer/tile/{z}/{y}/{x}</li></ul></div><div>GeoJson Layer<ul><li class="source-link">https://canadian-geospatial-platform.github.io/geoview/public/datasets/geojson/polygons.json</li><li class="source-link">https://canadian-geospatial-platform.github.io/geoview/public/datasets/geojson/lines.json</li><li class="source-link">https://canadian-geospatial-platform.github.io/geoview/public/datasets/geojson/points.json</li></ul></div><div>OGC API Feature Layer<ul><li class="source-link">https://b6ryuvakk5.execute-api.us-east-1.amazonaws.com/dev</li><li class="source-link">https://b6ryuvakk5.execute-api.us-east-1.amazonaws.com/dev/collections/lakes</li></ul></div><div>GeoPackage Layer<ul><li class="source-link">https://canadian-geospatial-platform.github.io/geoview/public/datasets/geopackages/rivers.gpkg</li></ul></div><div>CSV Layer<ul><li class="source-link">https://canadian-geospatial-platform.github.io/geoview/public/datasets/csv-files/Station_List_Minus_HQ-MELCC.csv</li></ul></div><div style="margin-bottom: 20px"><div>GeoCore UUID Layer</div><div style="margin-top: 10px; margin-left: 20px"><input id="selectGeoCore" list="geocoreids" style="width: 300px"/><datalist id="geocoreids"><option value="21b821cf-0f1c-40ee-8925-eab12d357668"></option><option value="ccc75c12-5acc-4a6a-959f-ef6f621147b9"></option><option value="0fca08b5-e9d0-414b-a3c4-092ff9c5e326"></option><option value="03ccfb5c-a06e-43e3-80fd-09d4f8f69703"></option><option value="ea4c0bdb-a63f-49a4-b14a-09c1560aad0b"></option><option value="0fe65119-e96e-4a57-8bfe-9d9245fba06b"></option><option value="ed9b204b-590c-4b17-9703-f6e167acd6c6"></option><option value="fe83a604-aa5a-4e46-903c-685f8b0cc33c"></option></datalist><button type="button" onclick="addGeocore()">Add layer</button></div></div><hr/><button type="button" class="collapsible">Configuration Snippet</button><pre id="mapWMCS" class="panel"></pre><hr/><script src="codedoc.js"></script><script>function addGeocore() {
// Precond
if (!document.getElementById('selectGeoCore').value) return;

// Add the layer on the map
cgpv.api.maps['mapWM'].layer.addGeoviewLayerByGeoCoreUUID(document.getElementById('selectGeoCore').value);
}

document.addEventListener('DOMContentLoaded', function () {
var sourceLinks = document.querySelectorAll('li.source-link');

sourceLinks.forEach(function (link) {
link.addEventListener('click', function () {
// Get the content to copy
var contentToCopy = link.innerHTML;

// Create a temporary textarea element to copy the content
var textarea = document.createElement('textarea');
textarea.value = contentToCopy;
document.body.appendChild(textarea);

// Select the content and copy it to the clipboard
textarea.select();
document.execCommand('copy');

// Remove the temporary textarea
document.body.removeChild(textarea);

// Show a message for 5 seconds
var message = document.createElement('div');
message.classList.add('sourceLinkCopied');
message.innerHTML = 'Copied to clipboard';
document.body.appendChild(message);
setTimeout(function () {
// Remove the message after 5 seconds
document.body.removeChild(message);
}, 2000);
});
});
});</script><script>function reloadMap() {
cgpv.api.maps['mapWM'].setProjection(Number(document.getElementById('projections').value));
}

// initialize cgpv and api events, a callback is optional, used if calling api's after the rendering is ready
cgpv.init((mapId) => {
// write some code ...
});

// create snippets
window.addEventListener('load', () => {
createCodeSnippet();
createConfigSnippet();
});</script></div></body></html>
113 changes: 113 additions & 0 deletions add-panels.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,113 @@
<!doctype html><html lang="en"><head><meta charset="UTF-8"/><meta name="viewport" content="width=device-width,initial-scale=1"/><title>Add Panels - Canadian Geospatial Platform Viewer</title><link rel="shortcut icon" href="./favicon.ico"/><meta name="msapplication-TileColor" content="#da532c"/><meta name="msapplication-config" content="./img/browserconfig.xml"/><meta name="theme-color" content="#ffffff"/><meta name="msapplication-TileColor" content="#da532c"/><meta name="theme-color" content="#ffffff"/><link rel="stylesheet" href="css/style.css"/><script src="cgpv-main.js"></script></head><body><div class="header-table"><table><tbody><tr><td><img class="header-logo" alt="logo" src="./img/Logo.png"/></td><td class="header-title"><h1><strong>Add Panels</strong></h1></td></tr><tr><td><a href="./index.html">Main</a><br/></td></tr></tbody></table><table><tbody><tr><td>This page is used to showcase adding panels to the app-bar and adding panels and buttons to the navbar.</td></tr></tbody></table></div><div class="toolbar"><button class="add-appbar-panel-btn">Add Appbar Panel</button> <button class="add-navbar-panel-btn">Add Navbar Panel</button> <button class="add-navbar-button-btn">Add Navbar Button</button> <input id="navbar-button-group-name" placeholder="Enter group name" value="groupName1"/></div><div id="mapWM" class="geoview-map" data-lang="en" data-config="{
'map': {
'interaction': 'dynamic',
'viewSettings': {
'projection': 3857
},
'basemapOptions': {
'basemapId': 'transport',
'shaded': false,
'labeled': true
}
},
'navBar': ['zoom', 'fullscreen', 'home', 'location'],
'appBar': {
'tabs': {
'core': ['geolocator', 'export']
}
},
'components': ['overview-map'],
'corePackages': [],
'theme': 'geo.ca'
}"></div><p></p><button type="button" class="collapsible">Code Snippet</button><pre id="codeSnippet" class="panel"></pre><script src="codedoc.js"></script><script>// initialize cgpv and api events, a callback is optional, used if calling api's after the rendering is ready
cgpv.init((mapId) => {
if (mapId === 'mapWM') {
// get add panel button element for WM map
var addAppbarPanelBtn = document.getElementsByClassName('add-appbar-panel-btn')[0];

// get the input for the group name
var navbarButtonGroupNameInput = document.getElementById('navbar-button-group-name');

// add app-bar panel btn click event handler
// button will open a panel on the app-bar
addAppbarPanelBtn.addEventListener('click', function (e) {
const button = {
id: 'AppbarPanelButtonId',
tooltip: 'Test',
tooltipPlacement: 'right',
children: cgpv.react.createElement(cgpv.ui.elements.AppsIcon),
};

const panel = {
panelId: 'AppbarPanelId',
title: 'Test',
content: `<div>Test content</div>`,
convertHtmlContent: true,
width: 200,
};

// call an api function to add a panel with a button in the default group
cgpv.api.maps['mapWM'].appBarApi.createAppbarPanel(button, panel, null);
});

// get add nav-bar panel button element for WM map
var addNavbarPanelBtn = document.getElementsByClassName('add-navbar-panel-btn')[0];
// add nav-bar panel btn click event handler
// button will open a panel on the nav-bar
addNavbarPanelBtn.addEventListener('click', function (e) {
const groupName = navbarButtonGroupNameInput.value;

if (groupName === '') {
alert('Enter a value group name');
return;
}
const button = {
tooltip: 'Test',
children: cgpv.react.createElement(cgpv.ui.elements.AppsIcon),
tooltipPlacement: 'left',
};

const panel = {
title: 'Panel Title',
content: `<div><p>Vestibulum in fringilla tortor. Aliquam placerat odio nec urna consequat tincidunt eu sit amet mauris.</p><p>Donec vestibulum tellus ex, a venenatis urna finibus quis. Sed venenatis nisi porttitor ex laoreet auctor. </p></div>`,
convertHtmlContent: true,
width: 400,
};

// call an api function to add a panel with a button
cgpv.api.maps['mapWM'].navBarApi.createNavbarButtonPanel(button, panel, groupName);
});

// get add nav-bar button element for WM map
var addNavbarButtonBtn = document.getElementsByClassName('add-navbar-button-btn')[0];

// add nav-bar button btn click event handler
// button will call a function
addNavbarButtonBtn.addEventListener('click', function (e) {
const groupName = navbarButtonGroupNameInput.value;

if (groupName === '') {
alert('Enter a value group name');
return;
}

const button = {
tooltip: `Test (${groupName})`,
children: cgpv.react.createElement(cgpv.ui.elements.OpenInBrowserIcon),
tooltipPlacement: 'left',
onClick: function () {
alert('You clicked on a navbar test button');
},
};

// call an api function to add a panel with a button
cgpv.api.maps['mapWM'].navBarApi.createNavbarButton(button, groupName);
});
}
});

// create snippets
window.addEventListener('load', () => {
createCodeSnippet();
createConfigSnippet();
});</script></body></html>
Binary file added af4d91666ea345601bea.woff
Binary file not shown.
Loading

0 comments on commit 05992c1

Please sign in to comment.