I am trying to fetch the googleMap object in agm and utilize it to create a HeatMapLayer in my project. However, the following code is not functioning as expected:
declare var google: any;
@Directive({
selector: 'my-comp',
})
export class MyComp {
constructor(private _gmap:GoogleMapsAPIWrapper){
_gmap.getMap().then((m: mapTypes.GoogleMap) => {
console.log(google);
});
}
}
After researching GitHub repository issues, I found that many users claim this code is working for them. However, I am experiencing difficulties. Can anyone suggest why?