0

I have marker (to example lat: 48.363, lng: 17.044) and i need to find road from it in google maps API.

This is my marker:

enter image description here

I need to change position to this:

enter image description here

This is just example. I need to change position for every marker which isnt on road in javascript. I searched in google how to find nearby road but i didn't find answer. I can find place from my position but i need the road. Has google maps any method for this??

user1951618
  • 131
  • 12
  • Like [this](http://stackoverflow.com/questions/16696502/google-maps-api-snap-marker-to-nearest-road)? – pushkin Jan 02 '16 at 17:30
  • it is similar but in directionsService.route i need to wait to return result. This method its async and i need sync method. For some reason i need to add marker outside from directionsService.route. – user1951618 Jan 02 '16 at 17:46
  • You won't find a synchronous method. You might try the [Roads API](https://developers.google.com/maps/documentation/roads/intro) – geocodezip Jan 02 '16 at 18:41

0 Answers0