I follow Joshua Moroni. Getting started with Google Maps in the Ionic 2 video. I want to use Google maps in my application and I get a typescript error. this is part of the
page /home/home.ts
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 the name "google"
source
share