vy/pathlopedia — Issue #5: Sample PolyLine
Author: vy
Created: 2011-11-14 15:06:06+00:00
State: open

In this sample, goal is to implement a `PolyLine` demonstration to form a base for the will be build path functionality. For this purpose, create a `/samples/polyline.html` with following requirements.

[As a starting point, see [Interactive Polyline Encoder Utility](http://code.google.com/apis/maps/documentation/utilities/polylineutility.html) page. Note that marker images in the documentation are changeable by API calls. Also pay attention that, at this stage, design and appearance is unimportant, but make elements generic enough for future style changes.]

* Have a floating toolbox table with following tools. (By default, none of the tools is in selected state. Toolbox can be a plain table such that when a tool is clicked, select it; when a selected tool is clicked, unselect it. Selection of a tool can be highlighted with changing background colors.)
* Path
* Point

* While _Path_ tool is selected,
* Change the mouse cursor to "pen". (Find a suitable temporary cursor image from the web.)
* User will be able to add & move `Corner`s as in [Interactive Polyline Encoder Utility](http://code.google.com/apis/maps/documentation/utilities/polylineutility.html). (Don't use the images given in the documentation, assign different marker images for each state.)
* Make the right mouse button click to trigger the removal of the corresponding corner.
* When user clicks on a edge, popup a message with two latitude-longtitude pairs belonging to the two points connected by the selected edge.

* While _Point_ tool is selected,
* Change the mouse cursor to "point". (Use your imagination.)
* When user clicks on a corner, popup a message with following variables:
* Cursor latitude-longtitude.
* Does it overlap with a corner?