react-google-maps
react-google-maps copied to clipboard
docs(example): use externally loaded google maps api
This pull request adds support for using a Client ID in addition to the existing apiKey
for the APIProvider
component.
While Google recommends using an apiKey
for most users, there are specific scenarios and legacy systems where an enterprise clientId
is necessary or beneficial such as specific contractual or billing arrangements.
Component Changes:
- Modified
APIProviderProps
to support eitherapiKey
orclientId
, but not both simultaneously. - Updated
useGoogleMapsApiLoader
to handleclientId
in addition toapiKey
.
Documentation Updates:
- Updated
docs/api-reference/components/api-provider.md
to include information about the newclientId
prop and its usage.
Testing:
- Added a new test case to ensure
clientId
is correctly passed toGoogleMapsAPILoader
.