0
我的地圖只是部分加載地圖控件,但不能造成實際的地圖:角谷歌,地圖沒有繪製的地圖,只要在地圖控制
我都裝入了正確的依賴關係,作爲指導,使用this。
我的HTML:
<div class="col-xs-3">
<ui-gmap-google-map center="vm.map.center" zoom="vm.map.zoom">
<ui-gmap-layer type="TrafficLayer" show="vm.map.showTraffic"></ui-gmap-layer>
</ui-gmap-google-map>
</div>
我使用的建議uiGmapGoogleMapApiProvider供應商,以保證角谷歌,地圖不開始處理任何指令,直到所有的谷歌地圖SDK是完全準備好:
angular.module('app', [
'uiGmapgoogle-maps',
]).config(config)
config.$inject = ['uiGmapGoogleMapApiProvider'];
function config(uiGmapGoogleMapApiProvider) {
uiGmapGoogleMapApiProvider.configure({
v: '3.17',
libraries: 'weather,geometry,visualizations'
})
}
我的控制器內我的角地圖模型:
uiGmapGoogleMapApi.then(function(maps) {
console.log(maps, "MAPS");
vm.map = {center: {latitude: 45, logitude: -73}, zoom:8, showTraffic: true, show: true}
})
爲什麼我的地圖細節不顯示?
謝謝!
你好,你的控制檯有錯誤嗎? – user1713964
我的控制檯沒有錯誤:( –