I am calculating the distance between two cities in kilometers using their latitude and longitude. According to the Google map, the distance is 33 km but the number I am getting is 1038 km. I understand Google gives the actual distance whereas the haversine formula used in my code tells the distance as the crow flies. Can someone please help
Tag: geocoding
not able to consume thezipcodes.com search api data
I am new in nodejs and I want to use www.thezipcodes.com /api/v1/search api to search the zip code to locatioin. I am not able to use the location returned by the API. Output is In curl it is giving the output but in nodeapi I am not able to use the location array. Answer You should follow the example given
How can I get city name from a latitude and longitude point?
Is there a way to get a city name from a latitude and longitude point using the google maps api for javascript? If so could I please see an example? Answer This is called Reverse Geocoding Documentation from Google: http://code.google.com/apis/maps/documentation/geocoding/#ReverseGeocoding. Sample Call to Google’s geocode Web Service: http://maps.googleapis.com/maps/api/geocode/json?latlng=40.714224,-73.961452&sensor=true&key=YOUR_KEY