I am drawing markers on a GoogleMap using @capacitor/google-maps. When the user clicks on a marker, I want a small info popup at that marker. The Capacitor API seems to have removed the “InfoWindow” function, so I rolled my own popup using the code below. But how to make the popup show at the marker itself? It always shows in the center of the screen. I can’t figure out how to get the click event in addition to the marker.
(Really what I’d prefer is access to the InfoWindow itself, if I’m mistaken and that is possible, so please let me know if that is still possible.)
Thanks.
await this.newMap.setOnMarkerClickListener(async (marker) => {
console.log(marker);
const popover = await this.popoverController.create({
component: MapMarkerPopupComponent,
componentProps: { markerTitle: marker.title }
});
await popover.present();
popover.onDidDismiss();
});