Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -1274,6 +1274,13 @@ Supports markers of either either "legacy" or "advanced" types.
<code>google.maps.<a href="#marker">Marker</a> | google.maps.marker.AdvancedMarkerElement</code>


#### Marker

Supports markers of either either "legacy" or "advanced" types.

<code>google.maps.<a href="#marker">Marker</a> | google.maps.marker.AdvancedMarkerElement</code>


### Enums


Expand Down
6 changes: 2 additions & 4 deletions plugin/src/web.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ import type {
} from './implementation';

export class CapacitorGoogleMapsWeb extends WebPlugin implements CapacitorGoogleMapsPlugin {
private gMapsRef: typeof google.maps | undefined = undefined;
private gMapsRef: google.maps.MapsLibrary | undefined = undefined;
private AdvancedMarkerElement: typeof google.maps.marker.AdvancedMarkerElement | undefined = undefined;
private PinElement: typeof google.maps.marker.PinElement | undefined = undefined;
private maps: {
Expand Down Expand Up @@ -125,12 +125,10 @@ export class CapacitorGoogleMapsWeb extends WebPlugin implements CapacitorGoogle
const loader = new lib.Loader({
apiKey: apiKey ?? '',
version: 'weekly',
libraries: ['places'],
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why was this line removed?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I thought that the places library is not needed anywhere, so I just referenced the maps library.

language,
region,
});
const google = await loader.load();
this.gMapsRef = google.maps;
this.gMapsRef = await loader.importLibrary('maps');

// Import marker library once
const { AdvancedMarkerElement, PinElement } = (await google.maps.importLibrary(
Expand Down