From 4ca6c29d59569210e037a1aa1c01177737f98aa6 Mon Sep 17 00:00:00 2001 From: Brian Love Date: Mon, 6 Jul 2026 08:06:50 -0700 Subject: [PATCH] =?UTF-8?q?fix(ag-ui):=20advanced=20markers=20ignore=20cli?= =?UTF-8?q?cks=20=E2=80=94=20set=20gmpClickable?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Regression from the AdvancedMarkerElement migration: the legacy google.maps.Marker was clickable by default, but AdvancedMarkerElement is NOT — without gmpClickable it never fires click/gmp-click, so the wrapper's (mapClick) output stays silent and the marker info window (focus + Remove) never opens. Pass { gmpClickable: true } via the marker [options]. Found by Brian during live review; verified live in Chrome — markers report gmpClickable=true and clicking opens the info window. (The "use gmp-click" console hint was this bug's symptom, not noise.) Co-Authored-By: Claude Fable 5 --- examples/ag-ui/angular/src/app/map-canvas.component.ts | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/examples/ag-ui/angular/src/app/map-canvas.component.ts b/examples/ag-ui/angular/src/app/map-canvas.component.ts index 00554821b..3a3f39a65 100644 --- a/examples/ag-ui/angular/src/app/map-canvas.component.ts +++ b/examples/ag-ui/angular/src/app/map-canvas.component.ts @@ -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)" /> } @@ -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);