Opened 8 years ago

Last modified 7 years ago

#242 new enhancement

WMSBrowser widget

Reported by: adube Owned by:
Priority: minor Milestone:
Component: ux Version: trunk
Keywords: capabilities Cc: adube@…
State: None


WMSBrowser widget to add WMS layers to the map with GetCapabilities requests.

Attachments (1)

wmsbrowser.png (334.2 KB) - added by elemoine 7 years ago.

Download all attachments as: .zip

Change History (9)

Changed 7 years ago by elemoine

comment:1 Changed 7 years ago by elemoine

Thanks for your work on the WMS browser Alexandre.

We, at Camptocamp, would be interested in collaborating on the development of this component.

Here are our comments on the current user interface:

  • the form on the right gives the impression that the layer options can be changed prior to adding the layer to the map, so we would rather not have this form and rely on other ways to present information about the layer
  • we think that displaying the map preview when a row is double-clicked is not intuitive, so we'd rather see the map preview on the right of the layer list (in place of the form)

See wmsbrowser.png for the user interface we have come up with. I think the mockup is self-explanatory, but here are the main points:

  • to see the description of a layer the user expands the row
  • the map preview is displayed on the right when the user clicks on a row
  • multiple layers can be selected for addition to the map, in that case they are merged in the same OpenLayers.Layer.WMS object

Feel free to comment on this proposal. Thanks a lot,

comment:2 Changed 7 years ago by adube

Thanks for your comments Eric. They all make sense to me, but to be sure that is what my client also had in mind, I asked him to give me his comments. Here they are :

  • We should keep the right form but remove useless info, such as 'name, queryable and add'. The 'title' and 'description' should be kept as they are but made editable in order to let the user change the title which is going to appear in the layertree.
  • The map preview is not as important as the text info from the form.
  • Sometimes, the data is configured to be visible as certain scales only so having the preview right next to the grid could result in having blank maps sometimes.
  • Also, each click on the left would always create a map and make unnecessary requests (keeping in mind that the "text" data is more important than a "preview").
  • Having a tree on the left would be better than a grid. The nodes could be colored 'red' when not supporting the current SRS and hovering it could also display the 'SRS support missing' text, which is a good idea.
  • The 'image' type radio buttons are going to confusing for users. They won't know what to do with that. Not supported format should be disabled and a default value should be mandatory.

Here's my own few comments :

  • I think that the tree idea is the best one. With it and by having 'title' and 'description' only in the form, we could have enough space to have a mappreview as well. We could have plenty of space on the right to have 50% on top having the form and 50% on bottom having the small preview.

  • Since the preview could be sometimes unwanted, why not make it appear optionally ?
  • I agree that double-clicking on a row to have a preview is not user-friendly, but when the preview would not be automatically added, we could have a "preview" button added.
  • combining layers in order to have one single OpenLayers.Layer.WMS object is mandatory IMHO since it improves the performance. Adding such combined layers to the layer tree would mean to have one node (for the combination) having a title defined by the user in the 'title' textbox (left blank or automatically concatenate titles from multiple selected layers on the left) and having child nodes (representing the layers in PARAMS of the OpenLayers.Layer.WMS object).
  • In Bart's demo, you'll see some examples of 'blank' map previews and also the space available on the right that could have been used for a form.
  • The 'images' type radio buttons could appear optionally.

That's pretty much it. Thanks to everyone putting the efforts towards this ux widget !

comment:3 Changed 7 years ago by elemoine

Pierre, Alexandre, Julien-Samuel and I chatted on the IRC about the WMSBrowser. Here's what came out of our discussion:

  • a name can be given to the layer group before adding it the map, a textfield next to the "add" button is used for that
  • place the map preview in a fieldset
  • let's try to have a tree on the left, possibly using WMSCapabilitiesLoader and a MutliSelectionModel
  • we let the format chooser aside for now
  • add the description on the right, above the map preview, the last selected node is described, and if the last selected node is deselected the description box becomes empty (this may be revisited I think)
  • the description could also be displayed when hovering nodes on the tree on the left
  • after the "add" button is pressed we leave everything in place (no clearing of the selection, no closing of the window)

comment:4 Changed 7 years ago by adube

r2279 and r2280, featuring :

  • a textfield used for the layer group name that is automatically populated on row select/deselect
  • various validations
  • no format chooser yet (as mentioned above)
  • no tree yet
  • description on the right (only last one selected has its description shown. If deselected, it's left blank)
  • no description while hovering a row (it's already on the left)
  • after 'add', everything is left in place but that is configurable
  • a Ext.ux.StatusBar widget automatically added if the source is loaded (see example 1), else uses a standard 'alert' plugin (see example 2)
  • a map preview that can be hidden/shown on a click and that can be hidden/shown by default using some settings
  • i18n of the widget now using the "GeoExt" way (instead of OpenLayers)


known issues

  • the center panel has an 'absolute' layout and even though its two items both have 'anchor' set to 50%, the second one (on the right) isn't exactly covering the 50%. If you resize the window, you'll see that the percentage covered also changes. I've not been able to solve this issue yet...
  • When not using the Ext.ux.StatusBar, when trying to select a row that can't be selected (its srs is not supported or out of map bounds) the Ext.MessageBox is shown but is automatically hidden as well (so to the user's eye, it's not shown at all). The 'beforerowselected' returning 'false' may play a role. I've tried to dig more but couldn't find out why...

comment:5 Changed 7 years ago by adube

More about the 'disappearing' window : it's rather moved behind the other window (if you move it a little, you'll see what I mean). Maybe it's because the grid about to select things regains 'focus' and is moved back to front, hiding the error window behind...

comment:6 Changed 7 years ago by adube

r2436, fixing the first known issue above.

comment:7 Changed 7 years ago by adube

The 'tree' capability store is now possible :

We could use it instead of the grid.

comment:8 Changed 7 years ago by adube

r2437, fixing the second known issue above.

Note: See TracTickets for help on using tickets.