Re: [OpenMap Users] Multiple EditToolLoader for same class

From: Don Dietrick <dietrick_at_bbn.com>
Date: Mon, 17 Jul 2006 18:23:07 -0400

Hi Stephane,

I think you just need to create a new EditToolLoader that does what
you want. See the OMCircleLoader code, it handles OMCircles and
OMRangeRings.

The EditorLayer and all those components should be able to handle
your custom EditToolLoader and OMGraphic.

Regards,

- Don


On Jul 17, 2006, at 12:48 PM, Stéphane Wasserhardt wrote:

> Hello !
>
> I am using an EditorLayer and i'm facing a problem with
> EditToolLoaders.
>
> In my application, I need to create different kinds of points,
> differents kinds of polygons, etc.
> I mean OMPoint, OMPoly, etc. with different "appData". The reason
> is that when an item is created on the map, a custom dialog should
> pop-up, asking for information to fill the corresponding appData
> object fields.
>
> That's why I would like to have one Tool (MouseMode) for creating
> each kind of item.
> For example, one tool to edit OMPoints with appData of type A, and
> one tool to edit OMPoints with appData of type B. (I could then
> link a dialog for editing objects of type A to the first tool, and
> another dialog for editing objects of type B to the second one).
>
> It seems that the way I want to do this is wrong :
> My idea (for this example) was to create two different
> EditToolLoaders : APointLoader, and BPointLoader in order to have
> two different MouseModes (and have these loaders handle the objects
> creation).
> But these loaders use the same "graphicClassName" : "OMPoint".
> So when the OMDrawingTool searches for the loader handling
> OMPoints, it always returns the first loader which handles OMPoints
> in its loaders list.
> The idea would be to map the loaders with something else than an
> OMGraphic class name, but in order to do this, it seems that I'll
> have to re-write everything (EditorLayer, EditorTool,
> OMDrawingTool, EditToolLoader, etc.)...
>
> Maybe there's an other way to have multiple tools for the same
> class of OMGraphic in an EditorLayer... But I didn't find it !
>
> Thanks in advance for your help !
> Stephane
>
> --
> [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 Mon Jul 17 2006 - 18:24:07 EDT

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