Skip to content

Commit

Permalink
docs: Adds region tags and scale attribute (#1710)
Browse files Browse the repository at this point in the history
* Fix: Adds region tags and scale attribute

Adds region tags for documentation; adds scale 1.5.

* Update index.ts
  • Loading branch information
willum070 authored May 2, 2024
1 parent 635c551 commit 601756e
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions samples/advanced-markers-accessibility/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,22 +49,25 @@ async function initMap() {
tourStops.forEach(({position, title}, i) => {
const pin = new PinElement({
glyph: `${i + 1}`,
scale: 1.5,
});

// [START maps_advanced_markers_accessibility_marker]
const marker = new AdvancedMarkerElement({
position,
map,
title: `${i + 1}. ${title}`,
content: pin.element,
});

// [END maps_advanced_markers_accessibility_marker]
// [START maps_advanced_markers_accessibility_event_listener]
// Add a click listener for each marker, and set up the info window.
marker.addListener('click', ({ domEvent, latLng }) => {
const { target } = domEvent;
infoWindow.close();
infoWindow.setContent(marker.title);
infoWindow.open(marker.map, marker);
});
// [END maps_advanced_markers_accessibility_event_listener]
});
}

Expand Down

0 comments on commit 601756e

Please sign in to comment.