这是我来自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);
}
https://stackoverflow.com/questions/42797049
复制相似问题