2

How to use tilesLoaded in agm angular google map. I want to do some action after map has fully loaded. Is there any example to use tilesLoaded in angular (v8)?

https://github.com/SebastianM/angular-google-maps/commit/d4f1371

evan
  • 5,443
  • 2
  • 11
  • 20
SKL
  • 1,243
  • 4
  • 32
  • 53

1 Answers1

2

Add the tilesLoaded event to your agm-map as follows:

<agm-map  
  [latitude]=51.673858
  [longitude]=7.815982
  [zoom]=8
  (tilesLoaded)="handleOnTilesLoaded()">
</agm-map>

Then add your own behavior within that function, e.g.:

handleOnTilesLoaded(){
    console.log("Tiles have loaded.");
}

Hope this helps you!

evan
  • 5,443
  • 2
  • 11
  • 20