map-page.ts
有我的目的地地址,我希望从中获取路径
我在哪里,我必须做什么。
initMap(){
let latLng = new google.maps.LatLng(this.lat, this.lng);
let mapOptions = {
center: latLng,
zoom: 19,
mapTypeId: google.maps.MapTypeId.ROADMAP
};
this.map = new google.maps.Map(this.mapElement.nativeElement, mapOptions);
let marker = new google.maps.Marker({
map: this.map,
animation: google.maps.Animation.DROP,
position: this.map.getCenter()
});
let content = this.msj;
this.addInfoWindow(marker, content);
}