AGM Google maps imagery tiles not loading

二次信任 提交于 2019-12-11 10:45:32

问题


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?


回答1:


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



来源:https://stackoverflow.com/questions/54930412/agm-google-maps-imagery-tiles-not-loading

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!