Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions examples/ag-ui/angular/src/app/map-canvas.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ const PARIS_CENTER: google.maps.LatLngLiteral = { lat: 48.8566, lng: 2.3522 };
[position]="m.position"
[content]="m.content"
[title]="m.stop.place"
[options]="advancedMarkerOptions"
(mapClick)="onMarkerClick(m.stop)"
/>
}
Expand Down Expand Up @@ -95,6 +96,12 @@ export class MapCanvasComponent {
zoomControl: true,
clickableIcons: false,
};
// AdvancedMarkerElement is NOT clickable by default (unlike the legacy
// Marker) — without gmpClickable it never fires click/gmp-click, so the
// wrapper's (mapClick) output stays silent and the info window can't open.
protected readonly advancedMarkerOptions: google.maps.marker.AdvancedMarkerElementOptions = {
gmpClickable: true,
};

private readonly googleMap = viewChild(GoogleMap);
private readonly infoWindow = viewChild(MapInfoWindow);
Expand Down
Loading