昨天api正在工作。今天发生了一个错误:
未捕获ReferenceError:未定义amd
有谁可以帮助我吗?
<!DOCTYPE html>
<html>
<head>
<title>loadMapAsyncHTML</title>
<meta http-equiv='Content-Type' content='text/html; charset=utf-8'/>
</head>
<body>
<div id='printoutPanel'></div>
<div id='myMap' style='width: 100vw; height: 100vh;'></div>
<script type='text/javascript'>
var map;
function loadMapScenario() {
map = new Microsoft.Maps.Map(document.getElementById('myMap'), {
credentials: 'Your Bing Maps Key'
});
}
</script>
<script type='text/javascript' src='http://www.bing.com/api/maps/mapcontrol?branch=release&callback=loadMapScenario' async defer></script>
</body>
更新
此错误已由Bing团队修复。
最佳答案
<script type="text/javascript">
window.amd = function(){};
window.amd.define = function(){};
</script>
<script type='text/javascript' src='//www.bing.com/api/maps/mapcontrol?branch=release'></script>
关于javascript - 必应 map V8-未捕获的ReferenceError:未定义amd,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/39895837/