[josm-dev] MapMode, GeoImageLayer, mouseAdapter, Flags, Undo
Holger Mappt
holgerosm at gmx.net
Mon Sep 16 20:31:12 UTC 2013
Hi,
I have a proof of concept for my ticket 7712. Until now I changed the
GeoImageLayer directly to keeps things simple. Now I want to move the
additional code into a plug-in. That raises a few questions.
The GeoImageLayer uses a MouseAdapter that is added and removed by a
MapModeChangeListener. But what exactly is a MapMode? I can click on a
photo whenever it is displayed. How is that related to the MapMode?
I want to be able to move photos of the active GeoImageLayer. Can I use
a LayerChangeListener to register my MouseMotionAdapter or do I need a
MapModeChangeListener too? Right now I do the same what the
GeoImageLayer does, i.e. use the MapModeChangeListener.
What is the best way to add a MouseMotionAdapter to the active
GeoImageLayer from a plug-in? Do I just implement the right
ChangeListener and use it to add/remove the MouseMotionAdapter? Or
would I register the MouseMotionAdapter in the GeoImageLayer? Or
something else? What plug-in would be a good example?
I want to mark an image as moved to be able to save the new coordinates
afterwards. What is the recommended way to implement such a flag? Is
there a type for flags, how do I name the set/get methods?
The undo/redo seems to work with OSM data only. Is there a way to have
a separate undo buffer for the GeoImageLayer? How would it work?
Thanks,
Holger
More information about the josm-dev
mailing list