[josm-dev] MapMode, GeoImageLayer, mouseAdapter, Flags, Undo

colliar colliar4ever at aol.com
Mon Sep 16 22:30:08 UTC 2013


Hey Holger

Sorry, cannot tell you about code but I was thinking about the option to
move a picture the other day and only forgot to open a ticket.

Please, have this directly integrated into core as an enhancement of the
geoimage layer.

I do not think you need different mapmodes but need to activate the
geoimage layer and maybe use a modifer key as secure version or at least
display a warning on the first move of a picture.

Cheers

colliar


On 16.09.2013 22:31, Holger Mappt wrote:
> 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


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 259 bytes
Desc: OpenPGP digital signature
URL: <http://lists.openstreetmap.org/pipermail/josm-dev/attachments/20130917/9f02189a/attachment.pgp>


More information about the josm-dev mailing list