How to add Place Autocomplete input to a map in React

preview_player
Показать описание
Learn how to add a Place Autocomplete input field with React. In this Geocast, Leigh Halliday builds on his 5-minute quickstart to demonstrate using an open-source React component built on the Place Autocomplete service in Maps JavaScript API.

Chapters:
0:00 - Intro and code overview
1:18 - Defining the Place Autocomplete component
2:20 - Defining the Combobox element
5:44 - Handle user selection of a prediction from the list
7:09 - Geocode the selected place
8:05 - Generate a marker on the map at the selected place

#Geocasts #React

product: Maps Platform - General; fullname: _Not Listed;
Рекомендации по теме
Комментарии
Автор

Do you have video how to get auto relocation for address that is typed in search field?

UCIVzXLNWqWIexEn
Автор

hi guys. I have a question about google_api_key it is a public key and we can use it on SPA, correct?

asta_dev
Автор

Instead of Places, is it possible to make them cities?

ushelloworld
Автор

I followed the steps and it works fine. BUT when I select a place, the input is cleared, and it is required in my form....

mariajosecastria
Автор

Why in my case combobox is appearing disabled?

geraldoagohoue
Автор

can we make google map move on the location which we type

rajdeepjadav
Автор

Hello. Could you please provide guidance on how to implement regional restriction for autocomplete suggestions in the Google Places API within the context of this React application?

MrEmgeomap
Автор

why do i need to add the initMaps function? i came across this video because i needed to implement the autocomplete for an adress field. but i have no use for google maps. it seems like such a waste of resources to enforce you to add it.

gs
Автор

Nice video, is there a way to add the Autocomplete component a restriction to only suggest address within US for example?

FargKlee
Автор

Reach combobox not supported with React 18 :/

likeabird
Автор

@Google Maps Platform, whats the name of the extension that shows the last change time please

epigie
Автор

`This API project is not authorized to use this API. Places API error: ApiNotActivatedMapError`, help me!!!!

adrianfernandez
Автор

When I go to google credentials dashboard it's asking me to enter billing details .. credit card etc. why is this? I thought the google maps api was free? any way to follow the instructions of this tutorial without entering the credit card details?

abhishes
Автор

react/combobox does not install with npm. problem with that.

zamanEhsani
Автор

Dropdown not working of places not working

richardbentil
Автор

Places API error: BillingNotEnabledMapError

AmeerHamza-cykm
Автор

Nice viedio, but I have a question, isn't the api key public, and also you can't restrict the api key for geolocation api and places api so how do you protect yourself, because you also have to pay for every use.

vpbwzou
Автор

I try to enable Javascript API but Google said me that give me money)) Do you have free something??

LearnITify
Автор

please don't do this please don't make this type of video you don't need to teach how to code, just show how you enabled google api? that's the issue,

webtpoint
Автор

@reach/combobox --react18 does't support --😪

birukmengistu