Google geocode address resolution - geocoding

Why is it that certain common addresses won't resolve using the API but they show up fine in google maps?
1400 Welton Street, Denver, CO
http://maps.googleapis.com/maps/api/geocode/json?sensor=false&address=1400+Welton+Street, Denver,+CO
Google places doesn't find it either. This is a common location seems strange..

Seems like an error in Google's map data. When you put in that address to Google maps it does zoom in to the general location, but you'll notice that it does not show an exact point on the map. If you play with the street numbers it looks like other addresses around that - 1399 and 1401 for example - do in fact return relevant results with the API call, and show a dot in Google Maps.
Bing maps says there's a "Pi Kitchen and Bar" at this location, so I assume it's a real location and this is just wrong map data.
I suggest reporting it to Google so they can fix: https://support.google.com/maps/answer/3094088

Related

Why does the Zomato API have issues searching by zipcode?

Inside of Zomato's API documentation, you can utilize the q parameter to input practically anything. With the url below, I have been testing this with zipcodes in my area and it works like a charm.
However, when I venture out and search zipcodes from different states, it finds no results. Now the weird thing is, if I go on Zomato.com and start trying to find restaurants in their website within those different states and return back to my api call, it starts to work with those zipcodes and no longer with zipcodes from my area! What's the deal? Is there like a cookies issue or something. Any advice would be greatly appreciated!
API CALL
https://developers.zomato.com/api/v2.1/search?q= + zipcode + &apikey=[API-KEY]
I found a workaround solution that should help anyone else who runs into this issue. I extracted the lat/lon coordinates from the Google Maps API based on the zip code typed in, and then I ran those lat/lon coordinates through the Zomato API. It's one extra step, but it definitely prevents the Zomato API from having geographic restrictions.

Why I got ZERO_RESULTS for valid addresses in Sweden?

I send this request https://maps.googleapis.com/maps/api/geocode/json?components=country:SE|locality:Huddinge|postal_code:14158&address=Sm%C3%A5brukets+Backe+30%2C+14158+Huddinge but I got zero result.
If I removed "postal_code:14158" it will work but It won't return the right postal code.
I got the same result for many valid addresses.
The Google Geocoding API is designed to help people create maps. Google doesn't do address verification or validation.
Geocoding is the process of converting addresses (like a street address) into geographic coordinates (like latitude and longitude), which you can use to place markers on a map, or position the map. (Google Geocoding API Getting Started)
In your case, it is best to simplify your search terms (drop the postal code, since that seems to work). You will still get fairly accurate results for placing markers on maps.
Also, you could report the information problem to Google Maps. They are responsive: they might update the service so the search returns something valid for your address search term.
If you need exact addresses or you need the postal code in all cases, try an address validation service, such as SmartyStreets. Here is a demo.
Full disclosure: I worked for SmartyStreets.

Google Places API: supported types for tram/cable car/light-rail?

I'm taking my first steps at using Google Places API am currently experimenting with different types. I was wondering, what kind of type I have to use, if I want to search for tram/cable car/light-rails stations?
What I want is get a list of subway, bus and tram stations inside an defined radius for an arbitrary coordinate.
Subway and bus seem to be easy (types=subway_station or types=bus_station) but there does not seem to be an equivalent for trams.
Just for experimenting:
Search for the tram station "Agnes-Bernauer-Platz" at Munich (coordinates: 48.1398418,11.496119, good example because there are not subway or bus stations in direct vicinity.) If you interactively browse Google Maps, the station is found (with a "tram icon"), but Places API does not find it:
https://maps.googleapis.com/maps/api/place/nearbysearch/xml?location=48.1398418,11.496119&radius=100&key=....
Any ideas?
Thanks in advance!
Update:
types=light_rail_station
Ok, it seems there is already a type which is not yet documented at developers.google.com/places/supported_types: types=light_rail_station does the job.

google maps ios sdk geocoding query returns only 1 result

I have integrated google maps sdk for ios in my application.
I am trying to implement the functionality where user can search for a location by address.
When the query is not specific enough , the returned result should contain more than 1 result (which is the case with google maps application on ios).
But i am getting a single result for all my searches.
Any pointers in this direction will be really helpful.
P.S I am using the google maps ios sdk geocoding example code.
What GMSGeocoder offers is actually reverse geocoding service , that is it takes a lat-lon coordinates of a point on the map and then returns the address for the same. So unlike any partial search for geocoding, this search is based on a specific point and so the response will mostly have an accurate answer as the firstResult. The response class gives option to retrieve just firstResult (as you will see in the google maps ios sdk demo app) and also a results array. But the further results in the array are will be mostly less specific versions of the location like city address, state address, country address, etc and are not likely to give very different addresses

Does Yahoo's PlaceFinder API always return 0 or 1 result for a reverse (lat/lng) lookup?

I'm familiar with the geonames API, whose findNearbyPlaceName resource takes an optional radius parameter and can return multiple places for a given lat/lng pair.
When doing a similar lookup in YDN PlaceFinder, using the R gflag to do a reverse lookup from a lat/lng, will there ever be more than 1 result returned? I have not found any instances yet, and from what I can tell, the PlaceFinder API doesn't allow for radius (though you can request offset from street).
Yes, the PlaceFinder service will only return a single location. (In the case of an error or location not found, you would get 0 results.) It's designed to go between a place description and location (e.g., street address to lat/long).
I'm not sure what your needs are, but you could also check out the Yahoo GeoPlanet API which provides more hierarchical data around the point of interest. PlaceFinder and GeoPlanet can be used together in this way.
Here are a couple of hack projects that help demonstrate each of these APIs:
Placefinder Explorer
GeoPlanet Explorer