Azure Maps Show 的白屏

问题描述 投票:0回答:0

现在已经为此奋斗了 2 天,我不确定要做什么……而且它非常简单,我正在尝试将地图添加到我的网站只是基本的地图,没什么特别的,唯一显示的是没什么大声笑黑屏。有人可以给我一些关于寻找什么的提示吗?

这是我简单但令人沮丧的代码---

<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" type="text/javascript"></script>
        <script src="https://atlas.microsoft.com/sdk/javascript/service/2/atlas-service.min.js" type="text/javascript"></script>


$(document).ready(function() {
   InitMap();


});

function InitMap() {

    //Initialize a map instance.
    var map = new atlas.Map('field', {
        
        style: 'satellite',
        authOptions: {
            authType: 'subscriptionKey',
            subscriptionKey: '<Primary KEY>'
        }
    });
}

任何帮助将不胜感激。谢谢伙计们/姑娘们:)

我试过以下

检查兼容性 确保我使用的是 G2 层。 我正在使用我正确的钥匙号码 div容器与代码正确 当我右键单击并浏览代码时,地图的所有数据都在那里,当我将鼠标悬停在该代码上时,它会在页面上亮起,就好像它在那里一样(它只是白色)。

azure maps azure-api-management azure-maps
© www.soinside.com 2019 - 2024. All rights reserved.