I am following Joshua Morony's Getting Started with Google Maps in Ionic 2 video tutorial. I want to use google maps in my application and i end up with a typescript error. this is a part of the pages/home/home.ts file
initMap(){
let latLng= new google.maps.LatLng(6.929848, 79.857407);
let mapOpt={
center : latLng,
zoom : 15,
mapTypeId :google.maps.MapTypeId.ROADMAP
};
this.map= new google.maps.Map(this.mapElement.nativeElement,mapOpt);}
I tried npm install --save @types/googlemaps,
but it still gives me the same typescript error Typescript Error Cannot find name 'google'
npm install --save @types/googlemaps. You are saying you have this, they are saying useany. It doesn't solve the problem. You can even right click in your IDE and see thegoogledeclarations, but Ionic2 doesn't see it.