Google Maps API
has any way to get the street coordinates of an location?
Is simple: I just want to get the nearest street coordinate. To got this i nee
I found this (ReverseGeocoding in v3): https://developers.google.com/maps/documentation/javascript/geocoding#ReverseGeocoding
Since this thread is old I suppose this could be useful.
You may use the directionService.
Pass the given address(or location) as origin and destination to directionsService.route()
and use the travelMode DRIVING
. The response should contain the nearest street.
Demo: http://jsfiddle.net/doktormolle/W3VGN/
These answers are all old, and Google has rearranged the maps API significantly since the answers. In 2018, the best way to turn a location (long, lat) into a "point on road," is to use the snap-to-road or nearest-road service: https://developers.google.com/maps/documentation/roads/snap
Note that this API charges a cent per API call, and can take up to 100 distinct points per call. If latency and complexity aren't problems, if you need to answer this question on a client, you could build a server that collects up to 100 requests from different clients, makes one request to Google, and then returns the request data back to the appropriate clients. (For this use, make sure to use nearest-road, not snap-to-road.)
Also, currently, Google Maps has a $200 per-month statement credit available, which may make smaller uses of this API not actually end up costing much (or anything at all.)