Why do calls to the Google Maps API return different results than what I see in my browser?
This one returns hundreds of items :
https://www.google.com/maps/search/new+york+hotels/#40.7543024,-74.0025302,14z?hl=en
This one returns Around 30 items :
http://maps.googleapis.com/maps/api/geocode/xml?new+york+hotels&sensor=false
The geocoder returns postal addresses mainly. If you want "places" (like hotels), use the places API.
Related
Sometimes the Web Detection API is not able to detect multiple objects in an image, hence I'm considering using Object Localiser. But Object Localiser essentially returns the bounding box co-ordinates (as shown in the documentation example). So how can I take the results from Object Localiser and send to Web Detection API so that I can get a list of individual web entities/products?
It's basically similar to the use case 'Vision Product Search' mentioned on the Cloud Vision landing page except would want to reference products indexed by Google instead of our own products.
I am new to Google Maps API and I have a requirement to integrate Google Maps API with an ASP.Net application. Is there a Google service where in I can input a UK postcode and radius as input parameters and get results only, without the map.
For example if I search for solicitors in a particular area like Z1 1XY (not real post code) with a radius of 5 mi, can I get the results of all solicitors with the postcodes 5 mile radius? Is there any service that would return the result set only? I know GeoCoding does something similar but can I provide radius as one of the input parameter and get results.
Any help would be appreciated. Thanks in advance.
Seaton
The Geocoding API may only be used in conjunction with a Google map; geocoding results without displaying them on a map is prohibited. For complete details on allowed usage, consult the Maps API Terms of Service License Restrictions.
Source: https://developers.google.com/maps/documentation/geocoding/#Limits
yes, you can use the Google Geocoding API to do address lookups (in this case postcodes). The response contains lat/lon co-ordinates which you can then subsequently use as the epicenter of your search to find items within a radius. Have a look at this blog post on how to use the DbGeography in .NET to perform radius queries based on lat/lon co-ordinates.
I have successfully used Google Places Api and was able to retrieve business establishments (shops) given a latlongbound and a keyword. But I cant stop wondering why it returns lesser shops than when you go to maps.google.com and type the keyword. Google Places does not even return those with a name and icon drawn on the map itself.
I want to retrieve a json with a similar result when typing a keyword on maps.google.com and I don't really mind if Google Places is not used.
Sounds like you may have additional filtering preventing you from querying all the results. Make sure you aren't restricting the 'bounds' or 'region' around your lat/long.
https://developers.google.com/maps/documentation/geocoding/
Good luck!
I search for "ankara polis karakolları" on maps.google.com and google returned me more than 10 results as seen from the link:
http://tinyurl.com/cssna5v
When I use this link http://maps.googleapis.com/maps/api/geocode/json?address=ankara+polis+karakollar%C4%B1&sensor=true to get the same result, I can only get 10 results which is same as the number of results shown on google maps page
Is there a way of getting all the search results using Google Maps API ?
The results on maps.google.com are different from those returned by the geocoder, they include other search results as well ("Places", see the Google Places API and others).
Also (for what it is worth) see this entry in the FAQ
I need all locations of type cafe, gas_station, and restaurant using Google Places Api. Here is my query via the API:
https://maps.googleapis.com/maps/api/place/search/json?location=41.104805,29.024291&radius=50000&sensor=true&key=AIzaSyAVH0qHD6BPxRlnck3rIqcxC5TTwOTyfds&types=gas_station||shopping_mall
This returns mosque location types only. I'm not getting shopping_mall, gas_station, or restaurant types. here i am checking type in google place api
How can i get all these types?
Unfortunately, Google Places API does not appear to have anything under those categories in that area.
Use types=establishment to get a more complete list of businesses etc. in that area.
Unfortunately, you will have to find some other way to determine what is a gas station, etc. Google Places API does not appear to have that data, at least at this time.
It may be possible to contribute that data yourself.
Since the answer above was posted, Google has added support for additional location types.
https://developers.google.com/places/documentation/supported_types
It was suggested in other SO thread, that you use 'keyword' instead of 'types' in your query to Google. Related SO thread:
How can I search places with specific types using Google Places API?