Does google maps api support "suggestions"? - google-maps

Does google maps api support "suggestions" ?
In other terms, can I receive from google maps the suggestions given a submitted query ?
thanks

You can use the Geocoding API, which according to the documentation will return multiple results:
Generally, only one entry in the
"results" array is returned for
address lookups, though the geocoder
may return several results when
address queries are ambiguous.

You should try using the maps api autocomplete which will return suggestions for locations
Google Maps API Places Auto Complete

Related

Get all geolocations by partial name using google maps api

I have signed up with the Google Maps API. I can geolocate locations using the following query
url = f"https://maps.googleapis.com/maps/api/geocode/json?address={city}&key={api_key}"
I need to do a search for towns by partial name.
For example 'MyTown' is a town , but there are also towns with names which include 'MyTown' in the title, such as MyTown-By-Sea, MyTown-SomethingElse and even NiceMyTown
The above query using the API returns just the city MyTown, not the others
Is there some option I have missed to get the Google Maps API to be less specific in the response returned ?
You can use Places Autocomplete API web service. This API will return places suggestions or predictions, based on your given input.
https://maps.googleapis.com/maps/api/place/autocomplete/json
?input=MyTown (based on your example)
&location=latitude,longitude
&key=YOUR_API_KEY

Google Maps API V3 difference vs Google Maps page [duplicate]

Why do calls to the Google Maps Geocoder API return different results than what I see in my browser?
This one returns many items :
http://maps.google.fr/maps?q=McDonald,+paris
This one returns a ZERO_RESULT :
http://maps.googleapis.com/maps/api/geocode/xml?McDonald,+paris&sensor=false
FAQ: https://developers.google.com/maps/faq#geocoder_differences
The API geocoder finds postal addresses. The Maps geocoder uses lots of data, including business data, to find results.
There is the Places API which can find locations based on type/class, but it may not work for business names. Documentation

Google Maps Geocoding API not returning all results

I was typing "macys" as the search item in here (google maps website) which gives me around 30 to 40 results marked on the map.
Where as when I use their API with query term "macys" then it returns only 2 to 3 results. I am using the following api:
http://maps.googleapis.com/maps/api/geocode/json?address=macys&sensor=false
I am possibly using the wrong API because it says as 'address' in the query parameter. Which API should I be using for getting all macys locations in the US / World?
I want it to return all the lat and lng objects as if its done in their own website (google maps website). If they have not exposed the API then is there a way around?
You should use the Places API:
https://developers.google.com/places/documentation/
Geocoding is not designed to return POIs, it might return some, but you should not depend on it.

Google Maps v3 geocoding w/ misspelled address

Does the Google Maps API v3 provide a way to access alternate suggestions if the address has typos in it? For example, I am processing a file containing some misspelled street names and getting 0 results back in the JSON from Google for those addresses. If I manually search for that address, Google Maps presents me with alternate suggested addresses. Is there a way to access those with the API in the geocoding response?
Thanks in advance,
Chris

Use Google maps for reverse geocoding

Can I use Google maps instead of blackberry apis to do reverse geocoding?
Yes, you can use the Google Geocoding API.
Then, the follow-up question is How do I read the JSON data returned by Google's API?
Yes, you can. However, you should be careful with this Terms & Conditions statement:
Note: 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.
More info: Google Geocoding API Limits