开发者

google suggested city name autocomplete

开发者 https://www.devze.com 2023-04-07 20:25 出处:网络
I\'m trying to build a web page in which I want to use google suggested city/state name combinations when user starts typing their address, it auto completes the city and state just like in google map

I'm trying to build a web page in which I want to use google suggested city/state name combinations when user starts typing their address, it auto completes the city and state just like in google maps.

For reference visit this URL:

Google Maps

When 开发者_如何学Gosomeone start typing in top left green A box. it gives you auto suggested list.

Can any one help me do the same thing for my web site? Or is there such google api exist that I can use?

Thanks


Job for the Places AutoComplete API :-)

http://code.google.com/apis/maps/documentation/javascript/places.html

http://code.google.com/apis/maps/documentation/places/autocomplete.html


Is there a reason it has to be google suggested names?

Here's an api that provides autocomplete for city names plus a lot of extra data you can squeeze out about the city (population, life quality data, even photo)

http://developers.teleport.org/api/

more specifically the widget http://developers.teleport.org/api/autocomplete_widget/


google does not provide such a service for autosugest, google does have a service for getting the geocodes and more, when you have the full address.

take a look in this post, where i had the same issue, i'm looking for a service that gives me the city names and addresses

there was a suggestion from someone to use geonames.com as a service, but i'm not sure they have streetnames as well...

0

精彩评论

暂无评论...
验证码 换一张
取 消