An Azure service that provides geospatial APIs to add maps, spatial analytics, and mobility solutions to apps.
I don't believe this is a solution but I got it to work. I commented out the following code:
<!--<script type='text/javascript'>
var map, indoorManager;
//Your tileset and stateset ID's for Azure Maps Creator.
const tilesetId = 'xxx';
const statesetId = 'xxx';
function GetMap() {
//Initialize a map instance.
map = new atlas.Map('myMap', {
center: [-122.13215, 47.63647],
zoom: 10,
style: 'grayscale_light',
view: 'Auto',
//Add authentication details for connecting to Azure Maps.
authOptions: {
//Use Azure Active Directory authentication.
// authType: 'anonymous',
// clientId: "xxx", //Your Azure Active Directory client id for accessing your Azure Maps account.
// getToken: function (resolve, reject, map) {
// //URL to your authentication service that retrieves an Azure Active Directory Token.
// var tokenServiceUrl = "https://azuremapscodesamples.azurewebsites.net/Common/TokenService.ashx";
// fetch(tokenServiceUrl).then(r => r.text()).then(token => resolve(token));
// }
//Alternatively, use an Azure Maps key. Get an Azure Maps key at https://azure.com/maps. NOTE: The primary key should be used as the key.
authType: 'subscriptionKey',
subscriptionKey: 'xxx'
}
});-->
and replaced with this code:
<style>
html,
body {
width: 100%;
height: 100%;
padding: 0;
margin: 0;
}
#map-id {
width: 100%;
height: 100%;
}
</style>
</head>
<body>
<div id="map-id"></div>
<script>
const subscriptionKey = "xxx";
const tilesetId = "xxx";
const statesetId = "xxx";
const map = new atlas.Map("map-id", {
//use your facility's location
center: [-122.13315, 47.63637],
//or, you can use bounds: [# west, # south, # east, # north] and replace # with your Map bounds
style: "blank",
view: 'Auto',
authOptions: {
authType: 'subscriptionKey',
subscriptionKey: subscriptionKey
},
zoom: 19,
});