无法读取未定义的属性映射
export class LocationsPage {
@ViewChild('map') mapref : ElementRef;
map : any;
constructor(public navCtrl: NavController, public navParams: NavParams) {
}
ionViewDidLoad() {
this.dispMap();
}
dispMap(){
let coords = new google.maps.latlng('17.512511','78.352228');
let mapoptions = {
center : coords,
zoom : 14,
mapTypeId : google.maps.mapTypeId.ROADMAP
};
this.map = new google.maps.Map(this.mapref.nativeElement,mapoptions);
}
}

#my-map{
height: 100% !important;
}

<ion-content>
<div #map id="my-map"></div>
</ion-content>
&#13;