File tree Expand file tree Collapse file tree 1 file changed +1
-4
lines changed
samples/advanced-markers-collision Expand file tree Collapse file tree 1 file changed +1
-4
lines changed Original file line number Diff line number Diff line change 77// eslint-disable no-undef
88// [START maps_advanced_markers_collision]
99const mapElement = document . querySelector ( "gmp-map" ) as google . maps . MapElement ;
10- let innerMap ;
1110
1211// Initialize and add the map
1312async function initMap ( ) : Promise < void > {
@@ -23,8 +22,6 @@ async function initMap(): Promise<void> {
2322
2423 let collisionBehavior = google . maps . CollisionBehavior . REQUIRED ;
2524
26- innerMap = mapElement . innerMap ;
27-
2825 // @ts -ignore
2926 const select = new mdc . select . MDCSelect (
3027 document . querySelector ( ".mdc-select" ) as HTMLElement
@@ -60,9 +57,9 @@ async function initMap(): Promise<void> {
6057 // [START maps_advanced_markers_collision_create_marker]
6158 const advancedMarker = new AdvancedMarkerElement ( {
6259 position : new google . maps . LatLng ( { lat, lng } ) ,
63- map : innerMap ,
6460 collisionBehavior : collisionBehavior ,
6561 } ) ;
62+ mapElement . appendChild ( advancedMarker ) ;
6663 // [END maps_advanced_markers_collision_create_marker]
6764 markers . push ( advancedMarker ) ;
6865 } ) ;
You can’t perform that action at this time.
0 commit comments