Skip to content

Commit

Permalink
Deploying to gh-pages from @ 2c33a79 🚀
Browse files Browse the repository at this point in the history
  • Loading branch information
jolevesq committed Dec 6, 2024
0 parents commit d1e2984
Show file tree
Hide file tree
Showing 764 changed files with 940,069 additions and 0 deletions.
Binary file added 047a7839f69b209db815.woff
Binary file not shown.
Binary file added 06c30711d588145a4541.woff
Binary file not shown.
Binary file added 090fabef926bdc0e9b9f.woff2
Binary file not shown.
Binary file added 0a79a9fabfc32e33f360.woff2
Binary file not shown.
Binary file added 0ae2428323939af5e1ad.woff2
Binary file not shown.
Binary file added 0dc97c66f9b542d6fa17.woff
Binary file not shown.
Binary file added 135d076fa32aa0b4d105.woff
Binary file not shown.
Binary file added 14982a9e4857a93b6dce.woff
Binary file not shown.
Binary file added 160a791a8e4f46bca3cc.woff
Binary file not shown.
Binary file added 16eb83b4a3b1ea994243.woff
Binary file not shown.
Binary file added 18841836e391d39e83a8.woff2
Binary file not shown.
Binary file added 1b79538ccd585c259996.woff2
Binary file not shown.
Binary file added 1df4abad55796d11a0c8.woff2
Binary file not shown.
Binary file added 23b7b8a2524d2d4b637b.woff
Binary file not shown.
Binary file added 27da5b36b6d3a16f53f4.woff
Binary file not shown.
Binary file added 285f3e6261d8eb20417d.woff2
Binary file not shown.
Binary file added 297d48e1b5a10c0831a9.woff2
Binary file not shown.
Binary file added 2c32b1315be61477013a.woff2
Binary file not shown.
Binary file added 2dd6febad11502dec6a6.woff2
Binary file not shown.
Binary file added 2eeae187764baf05867d.woff2
Binary file not shown.
Binary file added 35ed0597568ff6f19c16.woff
Binary file not shown.
Binary file added 3c5bcdd0e69c4c3ffafe.woff
Binary file not shown.
Binary file added 3f6e1548bd5175a8c342.woff
Binary file not shown.
Binary file added 4535474e1cf8598695ad.woff2
Binary file not shown.
Binary file added 4750292c47fa2bc6ac1a.woff2
Binary file not shown.
Binary file added 4a96ba31abcce0f5d52b.woff2
Binary file not shown.
Binary file added 4abdc9fff4507f17d726.woff
Binary file not shown.
Binary file added 4fdfc29a10e7d4b7c527.woff2
Binary file not shown.
Binary file added 5cec61a21cc20180fbe1.woff2
Binary file not shown.
Binary file added 5d2930082227d172f62c.woff
Binary file not shown.
Binary file added 5f077fd7b977d1715acf.woff
Binary file not shown.
Binary file added 60810e07c7b0273013aa.woff
Binary file not shown.
Binary file added 68d40d6d01c6f85d24ba.woff
Binary file not shown.
Binary file added 6de16332fda843a3dc3d.woff2
Binary file not shown.
Binary file added 7077203b1982951ecf76.woff2
Binary file not shown.
Binary file added 77dd370f2001e184ba0d.woff2
Binary file not shown.
Binary file added 795dbc8140e3fef82983.woff
Binary file not shown.
Binary file added 80947a31d23c70204b47.woff2
Binary file not shown.
Binary file added 889beddda1c9bd9f97df.woff
Binary file not shown.
Binary file added 97cbc447d4a8d41a9543.woff2
Binary file not shown.
Binary file added 9a18d7bb9ff7a6af7b32.woff2
Binary file not shown.
Binary file added 9f6a16a7770c87b2042b.woff
Binary file not shown.
Binary file added a9e19870cf6c4b973427.woff2
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>
Loading

0 comments on commit d1e2984

Please sign in to comment.