Drawing Control

Mar 6, 2009 at 1:34 PM
Added Drawing Control

Freehand Drawing

Erase (not implemented)
Edit (not implemented)

Line thickness
Line colour
fill colour

This includes some updates to the Map.cs, MapEvents.cs and MouseControl.cs classes

Access the functionality from the side panel in the Prototype Project

Still alot things to update and tune up, but is a start :)

Mar 7, 2009 at 2:40 AM
This is great news. I look forward to trying it out!
Mar 12, 2009 at 3:58 PM
I just spent some time playing with this update and it looks like a great start. 

I have a question regarding the interaction model used to select and modify existing objects.  The prototype contains a hand icon in the navControl which is supposedly used to switch between pan and select modes.  I'm wondering if the Drawing Control will perpetuate this duality, or if the "enter select mode" button is going away.

I would prefer the latter.  In other products I've developed, I've used an approach where selection is a function of how the user interacts with the layer rather than a specific button to push or key + mouse button modifier.  This seems a simper approach for most uses.

Select object happens only if:

  a. the base layer wasn't scrolled, and
  b. the mouse position is within a specified distance from the geometry, and
  c. mouse up

So, effectively, if you click and release directly on an object without scrolling, it is selected.  Any other interaction maintains the existing selection. Another variation is: if you click and release away from any object, then the selection is removed.
Mar 15, 2009 at 12:57 AM
Edited Mar 15, 2009 at 12:58 AM
Right now, the way it works is...

in the side panel there is the drawing control setion, this has a number of toggle buttons along the top of it, when one of these toggle buttons in on/checked then it puts the map into that DrawMode, this overrides what ever is being displayed in the NavControl Hand/Select modes...

to start a shape like StringLine or Polygone, 
Single click to start the shape 
Single click to add a point to the shape
Double click will finish the shape

FreeDraw is just a Single clik and Drag to draw, the freedaw line finishes when you relese the mouse button