Search code examples
angulargoogle-mapsangular-google-maps

AGM Google maps imagery tiles not loading


Imagery tiles do not load when the page loads...I have to take some action on the map i.e.(zoom,pan) then the tiles load

AGM initialization in my module

AgmCoreModule.forRoot({
apiKey: 'MyKey'
}),

My agm-map tag

   <agm-map  
   [latitude]="lat"
   [longitude]="lng"
   [zoom]="zoom"
   [mapTypeId]="mapType" 
   [mapTypeControl]="mapControls" 
   [zoomControl]="mapControls" 
   [streetViewControl]="mapControls">
   </agm-map>

How can I force tiles to load?


Solution

  • Make sure that when you are using AGM Angular google Maps that you initialize the map with proper lat/lng values...if you do not the map just does nothing, it's especially confusing if you have all the map controls set to "false" like I did.

    Mystery solved