Google Maps Api Airport Search - google-maps-api-3

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.

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.

Google has started highlighting search areas in Pink color. Is this feature available in Google Maps API 3?

Since Jan 2012, Google has started highlighting search areas in pick color. See the details here:
http://googlesystem.blogspot.in/2012/01/highlight-areas-in-google-maps.html
Does anyone know if this can be programmatically done using google maps API 3? I would want to show my cities in the map highlighted as shown in the link above.
I have already tried the Geocode API where I search for a city. That API only gives me the lat and long information. It does not help me in plotting the city boundaries.
No. It's not available in the API.
(It may be available in the future. Features of Google Maps do migrate into the API, but Google don't make announcements in advance and no-one has a crystal ball.)
You would need to find the city boundaries and draw the line yourself. Boundary data is almost certainly public-domain for the US. Other jurisdictions may not be so forthcoming.
Although a very old post my answer might help somebody out there as am landing on this post every time I query for bounding box:
Yes we can get the bounding box coordinates that google is using to highlight a region using Googles geocoding service. check for the response of the API call in the below sample from Google.
https://developers.google.com/maps/documentation/javascript/examples/geocoding-simple?refresh=1

How to handle mixed Google Places queries that contain both place name and location?

I need to develop a Point of Interest search application. I would like to allow users to enter queries like "Starbucks in San Diego" or "San Diego Starbucks". I'm able to do this on map.google.com, but I'm not sure if any such heuristic capability is provided by the Google Maps API.
I'm already using Google Places to look for places within a specific area. And I can use Geocoding API to locate addresses on the map.
Is this possible at all with the current API? Any suggestion for doing this?
I would recommend using the Google Places Autocomplete API to perform a request with the input parameter as "San Diego Starbucks", this will return a list of predictions:
https://maps.googleapis.com/maps/api/place/autocomplete/json?input=San%20Diego%20Starbucks&sensor=false&key=your_api_key
You can then use the returned reference parameter from a prediction to perform a Place Details Request which will provide you with more information about the selected place, including address and geographical location:
https://maps.googleapis.com/maps/api/place/details/json?reference=ClREAAAA2UwUUGS85fmru6jzwcSS6fcaMgPItqqLPB-cyTTJm6dMSX0IPmpHAqUR6JWiWoZWrtk6sPI_TJzlfoHma4m0kk3VAoDMu21gebdIdtaMnscSEDDjFLZ5iCC-W1iiAvbZM3caFJuU7TIwS6vj9T77wk24BfpeObSB&sensor=true&key=you_api_key

Calculate distances using Google Maps

I am creating a business directory website which has street addresses stored in the database. I would like to calculate the distance from a given zipcode to the street address using google maps in ASP.Net.
I don't even know where to begin. Can someone please help?
please see the links below
http://briancray.com/2009/04/01/how-to-calculate-the-distance-between-two-addresses-with-javascript-and-google-maps-api/
http://briancray.com/2009/06/23/calculate-driving-distance-google-maps-api/
http://www.ehow.com/how_5142324_calculate-distance-google-maps.html

Resources