Getting No response from google direction api - google-maps-api-3

I am using google direction api to get direction/routes between two places.
When I query
http://maps.googleapis.com/maps/api/directions/json?origin=New%20York%20LaGuardia%20Airport%20Marriott,%20Queens,%20NY,%20United%20States&destination=200%20e%2057th%20st%20ny&sensor=false
Iam getting Status = NOT_FOUND.
But when I search this path from New York LaGuardia Airport Marriott, Queens, NY, United States to 200 e 57th st ny using https://maps.google.com/. Google display a direction path between these two places. You can see this via link: link
What should I do to get the reponse from google api.
Thanks.

Google Maps uses many sources of locations data including Places results. Look to me like the directions service can't find "New York LaGuardia Airport Marriott, Queens, NY, United States" (because it isn't an address). If I use the Places API, that can find it.
example using the javascript APIs

Related

Google Maps API - Get accurate coordinates with business/building name.

I am developing a website in ASP.NET in which I need accurate coordinates of properties and populate their markers on Google Maps. I read the Google Maps API documentation and it doesn't accept business names or house numbers. So if I add 5 properties on Moseley Road with postal code WR2 6NJ, they all receive the same coordinates at the beginning of the road, where as they're all separate properties with separate coordinates, for example: Arthur Amos Associates Ltd, Moseley Farms etc.
How can I increase the accuracy so each address gets it's own coordinates? I tried the ROOFTOP and street_address parameters but they didn't help. Do I need to get Google Maps API for Work to get this level of accuracy?
Thanks.

Using Google Maps API to geocode NYC high schools by BN code

I am trying to geocode NYC high schools by using the Maps Geocoding API and the unique BN code assigned to each high school. For example, typing K733 into Google Maps results in a marker on MESA Charter High School in Brooklyn, NY. However, when I use the API url like so:
https://maps.googleapis.com/maps/api/geocode/json?address=K733
I keep getting "ZERO_RESULTS". I've also tried using the Places API and I've gotten the same results. Can anyone point me in the right direction? Is it even possible to pull this information from Google Maps?
It not possible to use unique BN codes for Maps Geocoding API because the address component requires postal address
address — The street address that you want to geocode, in the format
used by the national postal service of the country concerned.
Additional address elements such as business names and unit, suite or
floor numbers should be avoided. Please refer to the FAQ for
additional guidance.

How can I get a street from a zipcode using google API

I want to use google API to get the street address from a zip code so that when a user fills out his zip code in my registration form I then can automatically fill the street of the user.
Thanks
You cannot, because there can be multiple street addresses for any ZIP code.
For example, look up "Beverly Hills, CA 90210" in Google Maps. You can see there are streets such as "Lomitas Avenue" and "Sunset Boulevard" for this ZIP code.

Google Maps Api Airport Search

I am trying to get a list of nearby airports, given a certain location.
You can do this through the google places api and using types=airport.
The problem is that Google Places is self-policing so any tom, dick and harry can call themselves an airport.
Is there any way to determine whether an airport is real - through google maps?
I know I could double check against an airports database but then I'd be best just using an external database and only use google maps to plot their locations!!
thanks
Geonames will give you airports eg. a search centred on Central Park New York with a radius of 25 kms.
http://api.geonames.org/findNearby?lat=40.776902&lng=-73.968887&fcode=AIRP&radius=25&maxRows=100&username=xxxxx`.
You will need to open a (free) Geonames account to make it work.
Such a search would be in your "external database" category but as far as I know, the entries are not self-certified, so are possibly more reliable than Google's from what you say.
To verify Google results against Geonames results would need to develop and code your own comparison algorithm.

Google Places returns wrong city

I am building an application using google autocomplete Places API.
If I use the predictive suggestion for the address "Pongal, New York, NY, United States", I get following items in the return place object:
locality: Manhattan
administrative_area_level_2: New York
administrative_area_level_1: New York
As per documentation of google Places at: https://developers.google.com/maps/documentation/geocoding/ For US, locality can be used to fetch the city or town and *administrative_area_level_1* can be used for State.
So, I get New York as state and Manhattan as city which is wrong since Manhattan is not the city, the city for this address is New York
May be I am asking too much from Google. But, Really appreciate any help on this since it breaks my system in later stages or Please correct me if I am doing something wrong.
Google Maps address link under the scanner: http://maps.google.com/maps?q=Pongal,+New+York,+NY,+United+States&hl=en&ll=40.748492,-73.976612&spn=0.017947,0.042014&sll=37.0625,-95.677068&sspn=38.365962,86.044922&oq=pongal&hq=Pongal,+New+York,+NY,+United+States&t=m&z=15&iwloc=A

Resources