File tree Expand file tree Collapse file tree
samples/3d-accessibility-features Expand file tree Collapse file tree Original file line number Diff line number Diff line change 55 */
66
77// [START maps_3d_accessibility_features]
8- async function initMap ( ) {
8+ async function initMap ( ) : Promise < void > {
99 // Import the needed libraries.
1010 const [ { Marker3DInteractiveElement, PopoverElement } , { PinElement } ] =
1111 await Promise . all ( [
@@ -43,16 +43,16 @@ async function initMap() {
4343
4444 tourStops . forEach ( ( { position, title } , i ) => {
4545 const pin = new PinElement ( {
46- glyphText : ` ${ i + 1 } ` ,
46+ glyphText : String ( i + 1 ) ,
4747 scale : 1.5 ,
4848 glyphColor : '#FFFFFF' ,
4949 } ) ;
5050 const popover = new PopoverElement ( ) ;
5151
52- const content = `${ i + 1 } . ${ title } ` ;
52+ const content = `${ String ( i + 1 ) } . ${ title } ` ;
5353 const header = document . createElement ( 'span' ) ;
5454 // Include the label for screen readers.
55- header . ariaLabel = `This is marker ${ i + 1 } . ${ title } ` ;
55+ header . ariaLabel = `This is marker ${ String ( i + 1 ) } . ${ title } ` ;
5656 header . slot = 'header' ;
5757
5858 popover . append ( header ) ;
@@ -74,5 +74,5 @@ async function initMap() {
7474 document . body . append ( map3DElement ) ;
7575}
7676
77- void init ( ) ;
77+ void initMap ( ) ;
7878// [END maps_3d_accessibility_features]
You can’t perform that action at this time.
0 commit comments