visgl / visgl/react-google-maps
"As of March 1st, 2025, google.maps.places.Autocomplete is not available to new customers"
Open
Nobody has claimed this yet.
google maps issue
- Dominant language
- TypeScript
- Stars
- 1.9k
- Forks
- 193
- Avg merge
- 3d 16h
- Merged PRs (30d)
- 13
Description
Description
I noticed this in my console today trying to use the places library from the useMapsLibrary hook:
Steps to Reproduce
const places = useMapsLibrary('places');
useEffect(() => {
if (!places || !inputRef.current) return;
const options = {
fields: ['geometry', 'name', 'formatted_address']
};
const autocomplete = new places.Autocomplete(inputRef.current, options);
setPlaceAutocomplete(autocomplete);
// If we have an initial search, trigger a search
if (initialSearch && inputRef.current) {
inputRef.current.value = initialSearch;
// Use the Geocoding service to find the place
const geocoder = new google.maps.Geocoder();
geocoder.geocode({ address: initialSearch }, (results, status) => {
if (status === 'OK' && results?.[0]) {
onPlaceSelect(
results[0] as unknown as google.maps.places.PlaceResult
);
}
});
}
}, [places, initialSearch, onPlaceSelect]);
Environment
- Library version:
"@vis.gl/react-google-maps": "^1.5.1", - Google maps version: ???
- Browser and Version: Chrome
- OS: MacOS Sequoia 15.3.2 (24D81)
Logs
places.js:50 As of March 1st, 2025, google.maps.places.Autocomplete is not available to new customers.
Please use google.maps.places.PlaceAutocompleteElement instead. At this time, google.maps.places.Autocomplete is not scheduled to be discontinued, but google.maps.places.PlaceAutocompleteElement is recommended over google.maps.places.Autocomplete.
While google.maps.places.Autocomplete will continue to receive bug fixes for any major regressions, existing bugs in google.maps.places.Autocomplete will not be addressed. At least 12 months notice will be given before support is discontinued.
Please see https://developers.google.com/maps/legacy for additional details and https://developers.google.com/maps/documentation/javascript/places-migration-overview for the migration guide. Error Component Stack
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reviewing the useMapsLibrary('places') usage and the places.Autocomplete call shown in the report, then compare them with Google’s PlaceAutocompleteElement migration guidance. No repository file or test is named, so locate the relevant hook and examples before deciding the scope. Done should mean the supported places integration no longer produces the reported warning for new customers.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- react, typescript
- Domain
- api, frontend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100