Re: [OpenMap Users] Extend statusbar information (info delegator) when drawing polygons?

From: Don Dietrick <dfdietrick_at_gmail.com>
Date: Tue, 18 Jan 2011 11:53:57 -0500

Hi Carsten,

There is a CoordFormatter object in any CoordMouseMode (which is the
parent class of most mouse modes) that formats the information
presented in that part of the InformationDelegator (distance,
coordinates,etc). You can update the CoordFormatter in the
DrawingToolMouseMode of the drawing tool that is being used to draw
the polygons.

The EditorLayerMouseMode is different than the DrawingToolMouseMode,
it handles MouseEvents for the EditorLayer when they need to be
directed to the layer, and it does it in a way so that it can't be
seen by the user. It's a proxy object. So you'd need to work with
the CoordFormatter for the DrawingToolMouseMode.

You can design that new
CoordFormatter.createCoordinateInformationLine(...) method so it
figures out information about the current OMGraphic and update that
information accordingly. The DrawingToolMouseMode has a handle on the
drawing tool, so you should be able to get all the info you need.

Hope this helps,

Don

On Thu, Jan 13, 2011 at 7:59 AM, "Carsten Ø. Madsen" <com_at_navicon.dk> wrote:
> Hello
>
> I would like to extend the status bar information to behave like the
> distance tool when polygons are drawn/created so that the distance between
> the current location of the mouse and the last node added to the polygon (if
> any) is printed in the statusbar.
>
> I guess I have to do something with EditorLayerMouseMode but I have no clue
> on how to proceed. Any hints will be appreciated.
>
> BR
> Carsten
>
> --
> [To unsubscribe to this list send an email to "majdart_at_bbn.com"
> with the following text in the BODY of the message "unsubscribe
> openmap-users"]
>

--
[To unsubscribe to this list send an email to "majdart_at_bbn.com"
with the following text in the BODY of the message "unsubscribe openmap-users"]
Received on Tue Jan 18 2011 - 11:56:18 EST

This archive was generated by hypermail 2.3.0 : Tue Mar 28 2017 - 23:25:10 EDT