Skip to content

fix: handle externally-loaded importLibrary in loader#1002

Open
mrMetalWood wants to merge 1 commit into
visgl:mainfrom
mrMetalWood:fix/external-api-loading
Open

fix: handle externally-loaded importLibrary in loader#1002
mrMetalWood wants to merge 1 commit into
visgl:mainfrom
mrMetalWood:fix/external-api-loading

Conversation

@mrMetalWood
Copy link
Copy Markdown
Collaborator

Fixes a warning from @googlemaps/js-api-loader when the Google Maps API was already loaded before APIProvider mounted.

Previously, APIProvider detected an existing google.maps.importLibrary and skipped its own loader setup. That meant setOptions() was never called, but the provider still used the loader’s importLibrary() wrapper, causing a dev warning about missing options.

This change makes APIProvider call setOptions() once before using the loader wrapper, even when the Maps API was loaded externally. The existing external-loader behavior is preserved.

Also adds a regression test for the externally loaded API case.

fixes #972

@mrMetalWood mrMetalWood requested a review from usefulthink June 8, 2026 06:54
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.

[Bug] "No options were set" warning when Google Maps API is loaded externally

2 participants