File tree Expand file tree Collapse file tree 1 file changed +1
-4
lines changed
samples/advanced-markers-simple Expand file tree Collapse file tree 1 file changed +1
-4
lines changed Original file line number Diff line number Diff line change 77// [START maps_advanced_markers_simple]
88// [START maps_advanced_markers_simple_snippet]
99const mapElement = document . querySelector ( 'gmp-map' ) as google . maps . MapElement ;
10- let innerMap ;
1110
1211async function initMap ( ) {
1312 // Request needed libraries.
1413 const { Map } = await google . maps . importLibrary ( "maps" ) as google . maps . MapsLibrary ;
1514 const { AdvancedMarkerElement } = await google . maps . importLibrary ( "marker" ) as google . maps . MarkerLibrary ;
1615
17- innerMap = mapElement . innerMap ;
18-
1916 const marker = new AdvancedMarkerElement ( {
20- map : innerMap ,
2117 position : { lat : 37.4239163 , lng : - 122.0947209 } ,
2218 } ) ;
19+ mapElement . append ( marker ) ;
2320}
2421// [END maps_advanced_markers_simple_snippet]
2522initMap ( ) ;
You can’t perform that action at this time.
0 commit comments