Modify

Opened 11 years ago

Closed 8 years ago

#2961 closed defect (fixed)

Saving/Loading a WMS Layer: Usabilty is not quiet good

Reported by: vsandre Owned by: team
Priority: normal Milestone:
Component: Core imagery Version: latest
Keywords: wms saving loading Cc:

Description

WMS-Plugin: 16442 but also earlier

You can save a WMS-Layer via right-click. But in wich format is it saved?
The problem is that you are not able to load it back to JOSM neither via File -> Open nor the layer menu.

Attachments (0)

Change History (12)

comment:1 Changed 11 years ago by Landwirt

It works for me. Open a data layer, if there is none, load some data, open a new blank WMS layer, load the .wms file via the layer menu.

comment:2 in reply to:  1 Changed 11 years ago by anonymous

Summary: Saving/Loading a WMS Layer does not workSaving/Loading a WMS Layer: Usabilty is not quiet good
Type: defectenhancement

Replying to Landwirt:

It works for me. Open a data layer, if there is none, load some data, open a new blank WMS layer, load the .wms file via the layer menu.

Ok, you are right. Ok ignored the the menu entry "new blank WMS layer" and with a already opened WMS-Layer it did not work when I tried it. But now it does. :-)

I changed from defect to enhancement, because I think it would be more usable if you could load/save it directly with JOSM or via the WMS-Menu. Is the entry "new blank WMS layer" only for this circumstance? When yes it should be renamed/reprogrammed to "opene a new WMS layer from a file..." and the rightclick menu entry should be deleted.

comment:3 Changed 11 years ago by plaicy

see also #2502

comment:4 Changed 11 years ago by Gubaer

Resolution: fixed
Status: newclosed

Should be fixed in [o17397] (requires JOSM r2020)

comment:5 Changed 10 years ago by anonymous

Resolution: fixed
Status: closedreopened

this is still very confusing. as the op says: you can save a wms layer via right click on the wms layer in the layer list. but then:

  • you cannot open the saved file via file > open, even though the *.wms extension is listed there (there is a WMSLayerImporter, but it doesn't implement importData() (then why is it there?))
  • you can open the saved file via right click > "Load WMS layer from file" on a wms layer in the layer list. however,
    • you need a (empty) wms layer first to access this command. imagine that for opening a osm or gpx file, you have to create a empty osm or gpx layer first!
    • you can also do it on an existing, non-empty wms layer. but then this layer gets replaced with the content of the saved layer! what one would expect is that a new layer would be created; at least a warning should be given (every plain text editor does it like that).
  • you cannot save a wms layer via file > save, even though the *.wms extension is listed there (see first point - there also is a WMSLayerExporter class that does not implement exportData())

my suggestions to make this usable:

  • implement WMSLayerImporter::importData() and WMSLayerExporter::exportData() (the code is already there in WMSLayer::LoadWmsAction::actionPerformed() and WMSLayer::SaveWmsAction::actionPerformed())
  • remove "Load WMS layer from file" from the wms layer context menu

i've been trying to do this, but run into some problems when loading a saved wms layer into an empty workspace (WMSLayer() assumes that there is a Main.map.mapView already). i will try some more, but won't mind if someone beats me to it (also, getting any feedback on my other patches would help the motivation).

comment:6 Changed 10 years ago by ax

Priority: minornormal
Type: enhancementdefect
Version: latest

ha - logged out again! last comment is mine. also changing to defect again and setting priority to normal (because in the current state wms layer import / export is unusable for an average user).

comment:7 in reply to:  5 ; Changed 10 years ago by bastiK

Replying to ax:

(also, getting any feedback on my other patches would help the motivation).

Please be a little patient, sometimes everyone is busy with other stuff, you will definitely get a reaction sooner or later.

comment:8 in reply to:  7 Changed 10 years ago by ax

Replying to bastiK:

Please be a little patient, sometimes everyone is busy with other stuff, you will definitely get a reaction sooner or later.

sure, won't bother anymore. sorry if it came across like that, that was not my intention.

comment:9 Changed 10 years ago by bastiK

it's open source, so business hours is mainly at the weekend. :)

comment:10 Changed 9 years ago by Cobra

Component: Core imageryCore

Not fixed yet, moving to core.

comment:11 Changed 9 years ago by skyper

Component: CoreCore imagery

comment:12 Changed 8 years ago by Don-vip

Resolution: fixed
Status: reopenedclosed

In 5459/josm:

fix #2961 - Improve usability of WMS Layer Saving/Loading

  • Replaced the unconventional method of creating a blank layer, then loading a .wms file to a standard File->Open approach
  • Fixed memory leaks with some actions registered as listeners but never destroyed
  • Layer interface modified to allow a generic approach of layer saving in SaveActionBase rather than the previous one restricted to OSM and GPX data
  • FileImporters and FileExporters can now be enabled/disabled at runtime, for example when the active layer changes

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain team.
as The resolution will be set.
The resolution will be deleted.

Add Comment


E-mail address and name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.