invoke
Update marker for adding points IF start of track clicked : Position = FRONT (add to front of track on future clicks) IF end of track clicked : Position = BACK (add to back of track on future clicks) IF middle of track clicked : Position = MIDDLE (add waypoint next to clicked point)
Return
index of point if point has to be inserted in middle of track if not : null
Parameters
track Id
marker