Special sub-class of LineOverlay which adds custom support for managing route ribbons. Ribbons exist in one of three states:
- 'none' The ribbon is displayed with no addornments
- 'hover' The ribbon is displayed with a drag dot projected onto it (this happens when the mouse enters the area of the ribbon)
- 'drag' The drag dot is being dragged and may be at any physical point on the map. This happens when the mouse is depressed on the drag dot and it is moved. The state will maintain the projection information about where the drag originated from.
- anchorLatLng: The lat/lng of the point projected onto the ribbon where the dot was hovering or where dragging started from
- anchorXY: The display coordinates of the anchor
- anchorShapeIndex: The index of the lowest numbered shape point starting the segment where the anchor is.
- anchorDistance: The ratio of the distance along the shape segment (0...1).
- dragLatLng: The lat/lng of the current location of the drag dot
- dragXY: The display coordinates of the drag dot
- dragCount: An integer representing how many times the dragLatLng has been updated since entering the 'drag' state. Used to quickly check that the point hasn't moved since an operation started.
- onState(ribbon, state) - Called when the state change. This is a good spot to update visual characteristics of the drag dot.
- onDragStart(ribbon) - Called when the gesture to initiate dragging occurs
- onDrag(ribbon) - Called on the first movement of the drag dot after entering the drag state
- onDrop(ribbon) - Called when the drag dot is released. When this method is called, the ribbon will still be in the 'drag' state but will transition to 'none' just following .
- onDragCancel(ribbon) - Called if the drag is cancelled for some reason.
_hoverState will be >0 if the mouse is hovering over the ribbon or the drag dot
Handle mouse down events
Handle mouse move events
Handle mouse out event
handle mouse overs
Project drag poi
true if projected, false if not
show drag poi