Chris Yeung Chris Yeung - 3 months ago 26
AngularJS Question

Google Map's "Only displaying top left tile", using gMaps.js in Angular JS

I checked that there are checkresize() methods from google Map's native API.. but it doesn't seem to work with the refresh function from gmaps.js.

Does anyone has similar problems using AngularJS and gMaps.js? How do you come to solve it?

Before resize

After i resize the window, the map appears again. So I am thinking is there anyway to check resize on initialization for gMap.js?

After resize

Answer

Add the ng-cloak property on your map element or on your directive element.

"The ngCloak directive is used to prevent the Angular html template from being briefly displayed by the browser"

http://docs.angularjs.org/api/ng.directive:ngCloak