2017-05-31 3 views

Antwort

1

Das ist, wie Sie einen Marker zu Ihrer Karte hinzufügen. Vorsicht, Sie müssen zuerst Ihre Karte erstellen.

addMarker() { 

// costum image 
//let image = 'https://developers.google.com/maps/documentation/javascript/examples/full/images/beachflag.png'; 
let marker = new google.maps.Marker({ 
    map: this.map, 
    animation: google.maps.Animation.DROP, 
    position: this.map.getCenter() 
    //,icon: image 
}); 

let content = "<h4>Information!</h4>"; 

this.addInfoWindow(marker, content); 

}