【发布时间】:2021-06-10 15:53:06
【问题描述】:
我正在学习本教程 (https://docs.microsoft.com/en-us/learn/modules/create-your-first-iot-central-app/) 在第 4 单元中,我遵循了所有步骤,但我看到的只是一个这样的空白页
<!DOCTYPE html>
<html>
<head>
<title>Map</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<!-- Add references to the Azure Maps Map control JavaScript and CSS files. -->
<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>
<!-- Add a reference to the Azure Maps Services Module JavaScript file. -->
<script src="https://atlas.microsoft.com/sdk/javascript/mapcontrol/2/atlas-service.min.js"></script>
<script>
function GetMap() {
//Instantiate a map object
var map = new atlas.Map("myMap", {
//Add your Azure Maps subscription key to the map SDK. Get an Azure Maps key at https://azure.com/maps
authOptions: {
authType: 'subscriptionKey',
subscriptionKey: 'mB~~~~~~(I wrote my maps primary key here)'
}
});
}
</script>
<style>
html,
body {
width: 100%;
height: 100%;
padding: 0;
margin: 0;
}
#myMap {
width: 100%;
height: 100%;
}
</style>
</head>
<body onload="GetMap()">
<div id="myMap"></div>
</body>
</html>
此反馈页面也不起作用... (https://feedback.azuremaps.com/)
另外,在这个网站上,当我按“在新标签中打开”时,我什么也看不到... (https://azuremapscodesamples.azurewebsites.net/)
我花了将近 4 个小时,但找不到解决方案... 我需要做什么才能在这些页面上看到正确的地图?
【问题讨论】:
标签: azure azure-maps