Skip to content

Commit f8d1ae8

Browse files
authored
Attach marker to mapElement instead of innerMap
1 parent 5a9dc53 commit f8d1ae8

File tree

1 file changed

+3
-2
lines changed
  • samples/advanced-markers-accessibility

1 file changed

+3
-2
lines changed

samples/advanced-markers-accessibility/index.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,11 +53,12 @@ async function initMap() {
5353
// [START maps_advanced_markers_accessibility_marker]
5454
const marker = new AdvancedMarkerElement({
5555
position,
56-
map: innerMap,
5756
title: `${i + 1}. ${title}`,
5857
content: pin.element,
5958
gmpClickable: true,
6059
});
60+
61+
mapElement.append(marker);
6162
// [END maps_advanced_markers_accessibility_marker]
6263
// [START maps_advanced_markers_accessibility_event_listener]
6364
// Add a click listener for each marker, and set up the info window.
@@ -72,4 +73,4 @@ async function initMap() {
7273
}
7374

7475
initMap();
75-
// [END maps_advanced_markers_accessibility]
76+
// [END maps_advanced_markers_accessibility]

0 commit comments

Comments
 (0)