[OpenMap Users] Multiple EditToolLoader for same class

From: Stéphane Wasserhardt <swasserhardt_at_cls.fr>
Date: Mon, 17 Jul 2006 18:48:03 +0200

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"]
Received on Mon Jul 17 2006 - 13:23:20 EDT

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