码迷,mamicode.com
首页 > Web开发 > 详细

angularjs google map

时间:2014-10-09 13:39:43      阅读:160      评论:0      收藏:0      [点我收藏+]

标签:http   io   os   ar   for   sp   art   on   cti   

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
}


angularjs google map

标签:http   io   os   ar   for   sp   art   on   cti   

原文地址:http://www.cnblogs.com/xcwytu/p/4012803.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!