File tree Expand file tree Collapse file tree 1 file changed +2
-4
lines changed Expand file tree Collapse file tree 1 file changed +2
-4
lines changed Original file line number Diff line number Diff line change @@ -30,7 +30,7 @@ import type {
3030} from './implementation' ;
3131
3232export class CapacitorGoogleMapsWeb extends WebPlugin implements CapacitorGoogleMapsPlugin {
33- private gMapsRef : typeof google . maps | undefined = undefined ;
33+ private gMapsRef : google . maps . MapsLibrary | undefined = undefined ;
3434 private AdvancedMarkerElement : typeof google . maps . marker . AdvancedMarkerElement | undefined = undefined ;
3535 private PinElement : typeof google . maps . marker . PinElement | undefined = undefined ;
3636 private maps : {
@@ -119,12 +119,10 @@ export class CapacitorGoogleMapsWeb extends WebPlugin implements CapacitorGoogle
119119 const loader = new lib . Loader ( {
120120 apiKey : apiKey ?? '' ,
121121 version : 'weekly' ,
122- libraries : [ 'places' ] ,
123122 language,
124123 region,
125124 } ) ;
126- const google = await loader . load ( ) ;
127- this . gMapsRef = google . maps ;
125+ this . gMapsRef = await loader . importLibrary ( 'maps' ) ;
128126
129127 // Import marker library once
130128 const { AdvancedMarkerElement, PinElement } = ( await google . maps . importLibrary (
You can’t perform that action at this time.
0 commit comments