Hello,
I’m trying to make a marker with an infoWindow looking something like this, but I can’t really figure out how to add an image:
Do anyone of you have any idea how this should be done?
Currently, my markers and infoWindow are set like this:
addMarker(map, latitude, longitude, title, artist, id) {
// create LatLng object
let ionic: LatLng = new LatLng(latitude, longitude);
// create new marker
let markerOptions: MarkerOptions = {
position: ionic,
title: title,
snippet: "Av " + artist,
icon: {'url': 'www/assets/images/landemerke.png', 'size': {
width: 37,
height: 49
}},
};
this.marker = map.addMarker(markerOptions)
.then((marker: Marker) => {
marker.setAnimation('DROP');
marker.addEventListener(GoogleMapsEvent.INFO_CLICK).subscribe(
(data) => {
this.showDetails(id);
}
);
});
}
The solution was to set up a canvas inside the infowindow: