1

I have a problem with loading Angular google maps map on one template in my App.

I'm loading angular map on my page according to documentation of Angular Google maps and map shows OK when I load page first time.

But, if I switch page to another and than switch back to page with map I have grey square instead of map.

Maybe someone know how to solve this problem?

Pawel Novikov
  • 465
  • 1
  • 11
  • 26

1 Answers1

0

I experienced the same symptoms, so maybe this will help. I had my map wrapped in a div with ng-show. My guess is that Google walks up the DOM to determine if the map is visible and only renders it if it is. Even though my ng-show condition changed to true, nothing was telling the map to redraw.

The simplest answer for me was to change the ng-show I was using to display the map to an ng-if.

adam0101
  • 29,096
  • 21
  • 96
  • 174