简体   繁体   中英

Google Maps geocoder for venues

I'm searching for a way to geocode venues with google maps. The Geocoder API only provides the ability to use addresses for geocoding. But what if don't know the address and only the city and the name of the restaurant? Or I want to retrieve results for "Mc Donalds Berlin" or just "Bar Berlin"?

I've found this post where he asks exactly what I need: Suggest list in google maps search input

And at his blog I found a solution

This works very well and its incredible fast! I've checked out the source code and saw that he is using this URL:

http://maps-api-ssl.google.com/maps/suggest?hl=en&gl=us&v=2&json=b&auth=4c8b041euWw4-3h2-Ty2fD3D1BKVQqJCEcU&src=1,2&num=5&numps=5&callback=handleResponse&q=........

Btw, it's the same URL that maps.google.com uses to get their ajax autocompletion.

My questions now are:

  • Is it allowed to use this URL for my own website?
  • Do I need a special API key? (because of the auth= var in the URL above)
  • Or is it sth like a paid service?
  • Are there any other ways to get the problem solved? eg with the standard Geocoder API from google?

You might want to take a look into Google Places API for Venues:

Google Places API

Another way to do it is through YQL, but i am not 100% sure on the accuracy of it. Go to YQL Console and try the following query:

select * from local.search where query="outback steakhouse" and location="atlanta, ga"

This would give you locations of Outback steakhouse in Atlanta, GA. Also you can query resturants near a zipcode:

select * from local.search where zip='30045' and query='restaurant'

I am sure there are ways to query venues around a given point using YQL.

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