views:

17

answers:

1

How can I get the cross street names of one particular street?

Lets say I am on a street name B and I want to get two street either side of street B. I also have co-ordinates for the street B.

I think this can be achieved using calculation over co-ordinates. How?

If B street has Lon: 40.4325342 and Lat: -72.5346344, can I get the nearest street of one side of street B by making arithmetic operations to Lon and Lat?

+1  A: 

You can use Googles Reverse Geocoding API to get the next street to given coordinates:

http://googlegeodevelopers.blogspot.com/2008/10/geocoding-in-reverse.html

This however would be a client side solution with JavaScript.

JochenJung
oh.. its also availible on the server side: http://code.google.com/apis/maps/documentation/geocoding/index.html#GeocodingRequests
JochenJung
Google also has a general API for that: http://code.google.com/apis/maps/documentation/geocoding/#ReverseGeocoding
deceze
LOL, beat me... ;-P
deceze
are you guys sure I can get the Cross Streets by this API?
Umair Ashraf
You can get the Streetname to the coordinates. To get the next street you can do something like increasing lat/lon and see if you hit a new streetname. If not, increase a little more.
JochenJung