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
Description
I noticed this in my console today trying to use the
placeslibrary from theuseMapsLibraryhook:Steps to Reproduce
Environment
"@vis.gl/react-google-maps": "^1.5.1",Logs