angularjs google map
google map display incorrect
To remove the grayness, according to https://angular-ui.github.io/angular-google-maps/#!/faq:
If rendering starts before elements are full size, google maps calculates according to the smaller size. This is most commonly the case with a hidden element (eg, ng-show). To fix this, use "ng-if" instead, as this will wait to attach to the DOM until the condition is true, which should be after everything has rendered fully.
I‘ve modified your plunker http://plnkr.co/edit/JetUBY?p=preview to remove the grayness. Controller:
var ModalInstanceCtrl = function ($scope, $modalInstance, lat, lng) { $scope.render = true; // code here }
郑重声明:本站内容如果来自互联网及其他传播媒体,其版权均属原媒体及文章作者所有。转载目的在于传递更多信息及用于网络分享,并不代表本站赞同其观点和对其真实性负责,也不构成任何其他建议。