angularjs 调取百度地图
angularjs吧
全部回复
仅看楼主
level 2
angularjs 如何调取百度地图,直接在单个页面中写<script src="http://api.map.baidu.com/api?v=1.5&ak=‘’"></script>总是会报错说Failed to execute 'write' on 'Document': It isn't possible to write into a document from an asynchronously-loaded external script unless it is explicitly opened.我想知道是为什么。
2015年03月24日 03点03分 1
level 3
百度下
github.com/leftstick/BaiduMapForAngularJS
2015年04月19日 06点04分 2
搜不到啊。。。
2015年06月21日 16点06分
请恕我挖坟,这个怎么用啊,
2015年10月10日 03点10分
level 11
。。
2015年04月19日 23点04分 3
level 5
直接可用啊
2015年05月02日 07点05分 4
level 6
一般是加在index页面,也可以在要调用的时候再初始化。
这样
var script = document.createElement("script");
script.type = "text/javascript";
script.src = "http://api.map.baidu.com/api?v=2.0&ak=你的AK&callback=loadMap";
document.body.appendChild(script);
window.loadMap = function(){
alert("地图加载成功");
}
2015年09月06日 03点09分 5
level 1
你没有密钥 <script src="http://api.map.baidu.com/api?v=1.5&ak=‘’SHaf8ukpw3ysd1cxyxptpB4G"></script>,用我的吧
2015年10月10日 05点10分 6
1