parent
b11d60e7a9
commit
83f62c02b6
@ -1,9 +1,12 @@
|
|||||||
#
|
# Deploy your app
|
||||||
|
|
||||||
## Instructions
|
## Instructions
|
||||||
|
|
||||||
|
There are several ways that you can deploy your app so that you can share it with the world, including using GitHub pages or using one of many service providers. A really excellent way to do this is to use Azure Static Web Apps. In this assignment, build your web app and deploy it to the cloud by following [these instructions](https://github.com/Azure/static-web-apps-cli) or watching [these videos](https://www.youtube.com/watch?v=ADVGIXciYn8&list=PLlrxD0HtieHgMPeBaDQFx9yNuFxx6S1VG&index=3).
|
||||||
|
A benefit of using Azure Static Web Apps is that you can hide any API keys in the portal, so take this opportunity to refactor your subscriptionKey as a variable and store it in the cloud.
|
||||||
|
|
||||||
## Rubric
|
## Rubric
|
||||||
|
|
||||||
| Criteria | Exemplary | Adequate | Needs Improvement |
|
| Criteria | Exemplary | Adequate | Needs Improvement |
|
||||||
| -------- | --------- | -------- | ----------------- |
|
| -------- | --------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------- |
|
||||||
| | | | |
|
| | A working web app is presented in a documented GitHub repository with its subscriptionKey stored in the cloud and called via a variable | A working web app is presented in a documented GitHub repository but its subscriptionKey is not stored in the cloud | The web app contains bugs or does not work properly |
|
||||||
|
@ -0,0 +1,46 @@
|
|||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
|
||||||
|
<link rel="stylesheet" href="https://atlas.microsoft.com/sdk/javascript/mapcontrol/2/atlas.min.css" type="text/css" />
|
||||||
|
<script src="https://atlas.microsoft.com/sdk/javascript/mapcontrol/2/atlas.min.js"></script>
|
||||||
|
|
||||||
|
<script type='text/javascript'>
|
||||||
|
|
||||||
|
function init() {
|
||||||
|
fetch("https://gpssensorjimb.blob.core.windows.net/gps-data/?restype=container&comp=list")
|
||||||
|
.then(response => response.text())
|
||||||
|
.then(str => new window.DOMParser().parseFromString(str, "text/xml"))
|
||||||
|
.then(xml => {
|
||||||
|
let blobList = Array.from(xml.querySelectorAll("Url")); //.getAttribute("Url");
|
||||||
|
blobList.forEach(async blobUrl => {
|
||||||
|
console.log(blobUrl);
|
||||||
|
});
|
||||||
|
})
|
||||||
|
.then( response => {
|
||||||
|
var map = new atlas.Map('myMap', {
|
||||||
|
center: [-122.33, 47.6],
|
||||||
|
zoom: 12,
|
||||||
|
authOptions: {
|
||||||
|
authType: "subscriptionKey",
|
||||||
|
subscriptionKey: "<your-key>",
|
||||||
|
|
||||||
|
}
|
||||||
|
});
|
||||||
|
})
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
<style>
|
||||||
|
#myMap {
|
||||||
|
width:100%;
|
||||||
|
height:100%;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<body onload="init()">
|
||||||
|
<div id="myMap"></div>
|
||||||
|
</body>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</html>
|
After Width: | Height: | Size: 571 KiB |
Loading…
Reference in new issue