Re: [OpenMap Users] Multiple EditToolLoader for same class

From: Stéphane Wasserhardt <>
Date: Tue, 18 Jul 2006 11:14:06 +0200

Hi Don,

In OMCircleLoader, there are two different EditClassWrappers : one for
OMCircle and one for OMRangeRings. That's ok.
In my case, I would also like to have multiple EditClassWrappers, but this
time, using the same class name ! That is not possible since the
graphicInfo HashMap in AbstractToolLoader uses the EditClassWrapper's class
name as its key.
I think I can workaround this problem by simply switching to a new
EditToolLoader implementation, where EditClassWrappers are stored by ID
instead of class name...
I'll give it a try ;)

Thanks for your help !

Le 00:23 18/07/2006,Don Dietrick écrit:
>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
>The EditorLayer and all those components should be able to handle
>your custom EditToolLoader and OMGraphic.
>- 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
>>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
>>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 !
>>[To unsubscribe to this list send an email to ""
>>with the following text in the BODY of the message "unsubscribe

[To unsubscribe to this list send an email to ""
with the following text in the BODY of the message "unsubscribe openmap-users"]
Received on Tue Jul 18 2006 - 05:14:58 EDT

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