Reputation: 61
Sometimes Map displayed partially gray. google.maps.event.trigger($scope.map, "resize"); doesn't work.
Upvotes: 0
Views: 366
Reputation: 61
Finally, resolved this issue by resizing map when it gets initialized. Here is my code.
$scope.$on('mapInitialized', function (event, map)
{
$timeout(function() {
google.maps.event.trigger(map, 'resize');
map.setCenter(newgoogle.maps.LatLng('your latitude','your longitude'));
}, 100);
});
Upvotes: 1