File tree Expand file tree Collapse file tree 1 file changed +1
-7
lines changed
samples/advanced-markers-html-simple Expand file tree Collapse file tree 1 file changed +1
-7
lines changed Original file line number Diff line number Diff line change 77// [START maps_advanced_markers_html_simple]
88// [START maps_advanced_markers_html_simple_snippet]
99const mapElement = document . querySelector ( "gmp-map" ) as google . maps . MapElement ;
10- let innerMap ;
1110
1211async function initMap ( ) {
1312 // Request needed libraries.
@@ -18,20 +17,15 @@ async function initMap() {
1817 "marker"
1918 ) ) as google . maps . MarkerLibrary ;
2019
21- innerMap = mapElement . innerMap ;
22- innerMap . setOptions ( {
23- mapTypeControl : false ,
24- } ) ;
25-
2620 const priceTag = document . createElement ( "div" ) ;
2721 priceTag . className = "price-tag" ;
2822 priceTag . textContent = "$2.5M" ;
2923
3024 const marker = new AdvancedMarkerElement ( {
31- map : innerMap ,
3225 position : { lat : 37.42 , lng : - 122.1 } ,
3326 content : priceTag ,
3427 } ) ;
28+ mapElement . append ( marker ) ;
3529}
3630// [END maps_advanced_markers_html_simple_snippet]
3731initMap ( ) ;
You can’t perform that action at this time.
0 commit comments