角谷歌地圖中沒有自舉標籤角谷歌-地圖在自舉標籤不加載
加載但是,在谷歌地圖將完全加載,如果我在我的控制器最小化窗口
var app = angular.module('mymap', ['uiGmapgoogle-maps', 'ngAnimate', 'ui.bootstrap']);
app.controller('MainCtrl', function($scope) {
$scope.name = 'World';
$scope.fullmap = {
center: {latitude: 67, longitude: -55},
zoom: 8,
id: 9345,
events: {
tilesloaded: function (map) {
$scope.$apply(function() {
google.maps.event.trigger(map, "resize");
});
}
}
}
});
HTML文件
<uib-tabset>
<uib-tab heading="FEATURED" active=true >
<br><br>
</uib-tab>
<uib-tab heading="RECENTLY USED">
<br><br>
RECENTLY USED
</uib-tab>
<uib-tab heading="TOP RATED" >
<br><br>
TOP RATED
</uib-tab>
<uib-tab heading="NEAR ME" ng-click="loadmap()">
<br><br>
<div class="single-map-view" id="mapview">
<ui-gmap-google-map center='fullmap.center' zoom='fullmap.zoom' refresh="true">
<ui-gmap-marker idkey="fullmap.id" coords="fullmap.center" events="fullmap.events"></ui-gmap-marker>
</ui-gmap-google-map>
</div>
</uib-tab>
</uib-tabset>
DEMO:http://plnkr.co/edit/q7MdFxZ3Am5hvk1hL2Ja?p=preview
任何人有任何想法,爲什麼出現這種情況?
提前致謝!
感謝您的答案,但在這裏我使用http://angular-ui.github.io/angular-google在我的html中顯示地圖的地圖/模塊也需要動態更改經緯度 –
@JensonRaby look edit 2 –
我在html頁面中添加了modelsbyref =「false」dorebuildall =「true」,但它不起作用 –