Grab and drag the marker left and right. It will "stick" to the polyline". If you manage to move it off the polyline somehow it should snap to the closest point on the line when you drop it
Integrating our custom Geolocation component with the Google maps API. Here we shall expose a new public function which will allow us to draw a map in to a HTML element centred around a longitude / latitude.