@@ -125,12 +125,14 @@ export class CapacitorGoogleMapsWeb extends WebPlugin implements CapacitorGoogle
125125 } ) ;
126126 const google = await loader . load ( ) ;
127127 this . gMapsRef = google . maps ;
128-
128+
129129 // Import marker library once
130- const { AdvancedMarkerElement, PinElement } = await google . maps . importLibrary ( 'marker' ) as google . maps . MarkerLibrary ;
130+ const { AdvancedMarkerElement, PinElement } = ( await google . maps . importLibrary (
131+ 'marker'
132+ ) ) as google . maps . MarkerLibrary ;
131133 this . AdvancedMarkerElement = AdvancedMarkerElement ;
132134 this . PinElement = PinElement ;
133-
135+
134136 console . log ( 'Loaded google maps API' ) ;
135137 }
136138 }
@@ -416,7 +418,7 @@ export class CapacitorGoogleMapsWeb extends WebPlugin implements CapacitorGoogle
416418 const mapInstance = this . maps [ _args . id ] ;
417419 if ( mapInstance . markerClusterer ) {
418420 const markers = Object . values ( mapInstance . markers ) ;
419-
421+
420422 mapInstance . markerClusterer . setMap ( null ) ;
421423 mapInstance . markerClusterer = undefined ;
422424
@@ -531,7 +533,11 @@ export class CapacitorGoogleMapsWeb extends WebPlugin implements CapacitorGoogle
531533 } ) ;
532534 }
533535
534- async setMarkerListeners ( mapId : string , markerId : string , marker : google . maps . marker . AdvancedMarkerElement ) : Promise < void > {
536+ async setMarkerListeners (
537+ mapId : string ,
538+ markerId : string ,
539+ marker : google . maps . marker . AdvancedMarkerElement
540+ ) : Promise < void > {
535541 marker . addListener ( 'click' , ( ) => {
536542 const position = marker . position as google . maps . LatLngLiteral ;
537543 this . notifyListeners ( 'onMarkerClick' , {
@@ -638,7 +644,7 @@ export class CapacitorGoogleMapsWeb extends WebPlugin implements CapacitorGoogle
638644 }
639645
640646 let content : HTMLElement | undefined = undefined ;
641-
647+
642648 if ( marker . iconUrl ) {
643649 const img = document . createElement ( 'img' ) ;
644650 img . src = marker . iconUrl ;
@@ -651,7 +657,9 @@ export class CapacitorGoogleMapsWeb extends WebPlugin implements CapacitorGoogle
651657 const pinOptions : google . maps . marker . PinElementOptions = {
652658 scale : marker . opacity ?? 1 ,
653659 glyph : marker . title ,
654- background : marker . tintColor ? `rgb(${ marker . tintColor . r } , ${ marker . tintColor . g } , ${ marker . tintColor . b } )` : undefined ,
660+ background : marker . tintColor
661+ ? `rgb(${ marker . tintColor . r } , ${ marker . tintColor . g } , ${ marker . tintColor . b } )`
662+ : undefined ,
655663 } ;
656664
657665 const pin = new this . PinElement ( pinOptions ) ;
0 commit comments