Skip to content

Conversation

AE1NS
Copy link
Contributor

@AE1NS AE1NS commented Jun 18, 2024

Closes #22

@AE1NS AE1NS changed the title feat(google-maps): Optimize @googlemaps/js-api-loader to use importLibrary method feat: Optimize @googlemaps/js-api-loader to use importLibrary method Jun 18, 2024
@AE1NS AE1NS force-pushed the api-instance-check branch from 00456ef to 7ade34e Compare February 24, 2025 10:59
@medbenmakhlouf
Copy link

Hi @OS-pedrogustavobilro ,
Would it be possible to merge this as well? The Capacitor Google Maps plugin is causing a conflict when the loader is used elsewhere in the application, due to a strict check that prevents the loader from being initialized more than once:
https://github.com/googlemaps/js-api-loader/blob/6ec1cf0968f73bf4a25c8d6522a353b5c76c0518/src/index.ts#L315

Thank you for your time and support!

@djabif
Copy link

djabif commented Sep 29, 2025

Hi @AE1NS thanks for this PR.
Do you happen to have a repo that demonstrates the fix?
I spoke with the Ionic team, and providing a repo would help get the PR merged more quickly.
If not, let me know and I’ll create one.

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.

@A1Jan
Copy link
Contributor

A1Jan commented Sep 29, 2025

Hi @AE1NS thanks for this PR. Do you happen to have a repo that demonstrates the fix? I spoke with the Ionic team, and providing a repo would help get the PR merged more quickly. If not, let me know and I’ll create one.

Unfortunately I dont have a public accessible example for this. You can see more details in the linked discussion inside the issue.

@ItsChaceD ItsChaceD merged commit 43f7625 into ionic-team:main Oct 7, 2025
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

@googlemaps/js-api-loader: Refactor to importLibrary method

6 participants