How to use tilesLoaded in angular 8?

476 views Asked by At

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

1

There are 1 answers

0
evan On BEST ANSWER

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!