OpenLayers OpenLayers

Ticket #687 (assigned feature)

Opened 1 year ago

Last modified 5 months ago

WMS multiple Servers connector (aka WMSManager)

Reported by: ominiverdi Assigned to: ominiverdi (accepted)
Priority: minor Milestone: Future
Component: Control Version: 2.4 RC2
Keywords: wms server layerswitcher WMSManager Cc: ominiverdi
State:

Description

This is a first implementation of a connector for OL to add on the fly WMS layers from different servers.

A simple select shows WMS server list. Once a server is selected, GetCapabilities is asked and parsed (normally Proxy needed) and a new select appears with the list of title of each available layer.

Selecting a Layer will automatically add that layer to the legend and, once clicked, the layer will be shown.

More features have to come:

  • imagetype selector (dealing with overlays)
  • projection chooser
  • ecc.

suggestions are welcome.

live example

a demo is available here: http://www.ominiverdi.org/openlayers/examples/wms_manager.html

usage example

       var map;

        function init(){
			OpenLayers.ProxyHost = "/cgi-bin/proxy.cgi?url=";
            map = new OpenLayers.Map( $('map') );
           
			var aWMSServers=new Array(
				['Metacarta','http://labs.metacarta.com/wms/vmap0'],
				['NASA Blue Marble Next Generation','http://wms.jpl.nasa.gov/wms.cgi?']
			);

            map.addControl( new OpenLayers.Control.WMSManager(aWMSServers) );

Attachments

WMSManager.js (21.1 kB) - added by ominiverdi on 04/27/07 11:18:18.

Change History

04/27/07 11:18:18 changed by ominiverdi

  • attachment WMSManager.js added.

05/04/07 13:17:00 changed by openlayers

  • owner set to openlayers.
  • status changed from new to assigned.

Dev example moved here: http://www.ominiverdi.org/openlayers/sandbox/openlayers/examples/wms_manager.html

added features at date:

  • Overlay support. You can add an overlay using the checkbox.
  • WMS Exceptions control to avoid application/vnd.ogc.se_inimage forced if not supported by the server.
  • basic TileServer support (only Resolutions, Maxresolution, Minresolution params setted).

known bugs at date:

  • No IE and Safari compatibilty yet.
  • Overlay chekbox not cliccable, need to click the label.

05/04/07 13:17:38 changed by ominiverdi

  • owner changed from openlayers to ominiverdi.
  • status changed from assigned to new.

05/04/07 13:18:03 changed by ominiverdi

  • status changed from new to assigned.

05/05/07 06:39:31 changed by ominiverdi

Code (still alpha) available in OpenLayers SVN at ominiverdi's sandbox:

http://dev.openlayers.org/sandbox/ominiverdi/

05/24/07 14:40:54 changed by ominiverdi

some functions added (some bugs too)


May 06:

  • added switch layer system for overlays,
  • added drop layer function,
  • added opacity controllor for overlays

May 07:

  • added multiple layer select and 'add layer' button,
  • added Internet Explorer support (still some bugs).
  • safari still not working (select is not clickable)

May 13:

  • added:
    • WMS layer infos panel,
    • WMS select swith up and down to manager Layers WMS request,
    • extent control for multiple layers selection,
    • WMS legend images per OL layer
  • bugs: *IE support broken once again... the layers select is no more shown, *Layout problem: the maximize button for the panel disappears.

May 24:

  • added permalink function.
  • created indipendent ArgParser and Permalink Controls.
  • new tool call: map.addControl(new OpenLayers.Control.WMSPermalink());

still adding functions refining will come, be patient

05/29/07 13:31:21 changed by ominiverdi

  • Query system added
  • QueryToolbar added

the user will see a "(q)" symbol close the queryable layers. Once this layers are visible and the "i" tool form WMStoolbar is choosen the user can click the map and have query result to the queryTarget div otherwise a popup is coming out.

call:

 var queryTarget = $('queryOut');
 WMSToolbar = new OpenLayers.Control.WMSToolbar({queryTarget: queryTarget});
 map.addControl(WMSToolbar);

06/02/07 20:54:22 changed by ominiverdi

June 3

improvements:

  • added Query support to Permalink
  • added zoom to extent button for each layer
  • added legend toolbar expander/swicher
  • improved legend layout
  • IE working fine (layer panel has on offset to the left and less servers supported)

still missing:

  • compatibility with all WMS servers (needed during GetCapabilities parsing)
  • Safari support (due to inputs and select not clickable)
  • full compatibilty with multiple maps on same page (I've used some getElementById at the beginning)
  • documentation (at least wiki page)

other features on TODO list:

  • better "wait" massage
  • layer projection chooser (maybe will rest fix on EPSG4326)
  • add server on the fly (unsecure to add permissions on the proxy)

code status:

  • still on ALPHA phase

06/08/07 07:13:36 changed by ominiverdi

June 8

improvements:

  • added Exporter function to create HTML files that include OL configuration
  • Safari bugfixing. legend works fine, wmsmanager too but selects with mouse
  • added Sarissa to test XML parsing (need to be excluded soon)
  • documentation page: http://trac.openlayers.org/wiki/WMSManager

still missing:

  • fixing Safari select behavior to pass to beta phase
  • exclude Sarissa to pass to beta phase

other features on TODO list:

  • better "wait" massage
  • layer projection chooser (maybe will rest fix on EPSG4326)
  • add server on the fly (unsecure to add permissions on the proxy)

code status:

  • still on ALPHA phase

12/15/07 16:49:36 changed by crschmidt

  • state changed.
  • milestone set to Future.