简体   繁体   中英

Get Google Map Place id using Place

I have 100 place names and I need to collect Google Maps place ids of these place names using automated JavaScript.

I found this Google Example to get place_id using place names.

But, I need to collect place_id 's programmatically. Suggest me how to get this.

Referring to my comment above and my current understanding of your question described in there, here is my suggestion.

You cannot access and control the "Autocomplete"-gui-object in an obvious manner. Instead you should use the "AutocompleteService"-object and its getPlacePredictions() method.

You should read up on the AutocompleteService reference and i suggest you also take a close look at the AutocompletionRequest (right below AutocompleteService on the same page) which is an important parameter needed for the method getPlacePredictions() which you will want to use.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM