Modify

Opened 2 years ago

Last modified 2 years ago

#21702 new enhancement

Add option to load geotagged image via RC into existing image layer

Reported by: jose1711 Owned by: team
Priority: normal Milestone:
Component: Core image mapping Version:
Keywords: remote control image load reuse layer Cc:

Description

Currently whenever a user executes https://josm.openstreetmap.de/wiki/Help/RemoteControlCommands#open_file giving a path to an image file as a parameter a new image layer is created in JOSM. Personally I would welcome an option that would only do this if there was no previous image layer available. By default the image would be added to an existing image layer (e. g. the one with the lowest index if there are multiple found).

Attachments (0)

Change History (4)

comment:1 by Don-vip, 2 years ago

Component: CoreCore image mapping

comment:2 by Don-vip, 2 years ago

Milestone: 22.01
Owner: changed from team to Don-vip
Status: newassigned

comment:3 by Don-vip, 2 years ago

This ImageLoader block should support reuse of existing image layer by passing new arguments to ImageLoader constructor:

        if (Boolean.TRUE.equals(PROP_ONE_LAYER_PER_FOLDER.get())) {
            entries.entrySet().stream().map(e -> new GeoImageLayer(e.getValue(), gpxLayer, e.getKey())).forEach(layers::add);
        } else {
            layers.add(new GeoImageLayer(entries.values().stream().flatMap(List<ImageEntry>::stream).collect(Collectors.toList()), gpxLayer));
        }

through these stacks:

	GeoImageLayer.create(Collection<File>, GpxLayer) line: 245	
	ImageImporter.importData(List<File>, ProgressMonitor) line: 111	
	ImageImporter(FileImporter).importDataHandleExceptions(List<File>, ProgressMonitor) line: 152	
	OpenFileAction$OpenFileTask.importData(FileImporter, List<File>) line: 394	
	OpenFileAction$OpenFileTask.realRun() line: 350	
...
	OpenFileAction.openFiles(List<File>, Options...) line: 127	
...
	OpenFileHandler.handleRequest() line: 56	

comment:4 by Don-vip, 2 years ago

Milestone: 22.01
Owner: changed from Don-vip to team
Status: assignednew

Modify Ticket

Change Properties
Set your email in Preferences
Action
as new The owner will remain team.
as The resolution will be set. Next status will be 'closed'.
to The owner will be changed from team to the specified user.
Next status will be 'needinfo'. The owner will be changed from team to jose1711.
as duplicate The resolution will be set to duplicate. Next status will be 'closed'. The specified ticket will be cross-referenced with this ticket.
The owner will be changed from team to anonymous. Next status will be 'assigned'.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.