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
我的控制台没有错误:( –