Skip to content

Commit 89c3962

Browse files
authored
Refactor to use append
1 parent 1a6eecf commit 89c3962

File tree

1 file changed

+4
-4
lines changed
  • samples/advanced-markers-accessibility

1 file changed

+4
-4
lines changed

samples/advanced-markers-accessibility/index.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -43,18 +43,18 @@ async function initMap() {
4343

4444
// Create the markers.
4545
tourStops.forEach(({position, title}, i) => {
46+
// [START maps_advanced_markers_accessibility_marker]
4647
const pin = new PinElement({
47-
glyph: `${i + 1}`,
48+
//@ts-ignore
49+
glyphText: `${i + 1}`,
4850
scale: 1.5,
4951
});
50-
// [START maps_advanced_markers_accessibility_marker]
5152
const marker = new AdvancedMarkerElement({
5253
position,
5354
title: `${i + 1}. ${title}`,
54-
content: pin.element,
5555
gmpClickable: true,
5656
});
57-
57+
marker.append(pin);
5858
mapElement.append(marker);
5959
// [END maps_advanced_markers_accessibility_marker]
6060
// [START maps_advanced_markers_accessibility_event_listener]

0 commit comments

Comments
 (0)