0

How do I make a marker in Google Maps API that can be dragged only along a specified path? I only need to do it in the shape of a circle. Can't find anything specifically related on SO.

Like this: http://jsfiddle.net/geocodezip/oh4v583t/1/

maybe using marker.setpath function?;
MRDJR97
  • 818
  • 2
  • 10
  • 27
  • Checked `SnapToRoute` implementation in the example? – sabithpocker Jun 01 '17 at 14:14
  • The example has everything you need. –  Jun 01 '17 at 14:16
  • I havent the first clue though how to implement this from the DirectionsRenderer to a polyline/shape. I know it should be far simpler but I haven't the first clue about any of the functions used in that example. – MRDJR97 Jun 01 '17 at 14:45
  • [Fiddle](http://jsfiddle.net/geocodezip/oh4v583t/1/) is from the question: [Google Maps API v3 - Draggable Marker Along a Polyline](https://stackoverflow.com/questions/31816185/google-maps-api-v3-draggable-marker-along-a-polyline) – geocodezip Jan 10 '18 at 00:53

0 Answers0