Addins/OWSManager

Version 1 (modified by ominiverdi, 5 years ago)

adding first draft of OWSManager profile

!OWSManager Control

Description

The !OWSManager is a set of controls aimed to:

  • parse OGC WMS getCapabilities request and add layers to the actual map and manage them from an updated legend.
  • Query WMS Servers if Layers are Queryables.
  • deal with WMC (OGC Web Map Context) to load or save a map.
  • edit SLD (unique symbol, unique values, equal interval, quantile interval) using GeoServer instances that offer SLDService add-on.
  • make remote CSW (OGC Catalogue Service for Web) searches to add layers from a Catalogue. (Not yet implemented)

All this features need the usage of proxy.cgi script available in the example dir. At date there's no public API, except for WMC, and everything is still merged with the User Interface.

Compatibility

Addin Version OpenLayers Version
 OWSManager sandbox  trunk > r5039 + OLON extension by Tim Schaub

note: the OLON Extension is actually compatible only inside OWSManager sandbox. The OLON extension is needed only for WMC support.

Code Status

this extension should be considered still as Beta release. Future development should offer a public API and a better compatibility with OpenLayer's trunk.

Examples

Installation and Use

  1. Use subversion to check out the  OWSManager addin.
  2. add this headers:
    	<script src="../lib/OpenLayers/Control/OWSManager.js"></script>
    	<script src="../lib/OpenLayers/Control/WMSToolbar.js"></script>
    	<script src="../lib/OpenLayers/Control/WMSQuery.js"></script>
            <script src="../lib/OpenLayers/Control/SLDManager.js"></script>
    	<script src="../lib/OpenLayers/Control/WMSQueryTool.js"></script>
    	<script src="../lib/OpenLayers/Format/SLD.js"></script>
    	<script src="../lib/OpenLayers/Format/WMC.js" type="text/javascript"></script>
    
    
    	<link href="../theme/OWSManager/owsmanager.css" rel="stylesheet" type="text/css" media="all" />
    
  3. create empty map in an body.onload function:
           map = new OpenLayers.Map( $('map'),{controls:[]} );
    
  4. add all controls you want:
            map.addControl(new OpenLayers.Control.PanZoomBar());
    	map.addControl(new OpenLayers.Control.MousePosition());
    	map.addControl(new OpenLayers.Control.OverviewMap());
    	map.addControl(new OpenLayers.Control.KeyboardDefaults());
    
  5. and an extra OWSManager's control:
            var queryTarget = $('output');//a div or textarea to target output text
    	WMSToolbar = new OpenLayers.Control.WMSToolbar({queryTarget: queryTarget});
    	map.addControl(WMSToolbar);
    
  6. Adding WMS Servers to the 'WMS Servers' selector

To add servers to !OWSManager, create an array like this with ['Server Name', 'WMS Server URL'] as this:

var aWMSServers=new Array(				
		['OpenLayers WMS','http://labs.metacarta.com/cgi-bin/mapserv?map=/www/labs/map/vmap0.map'],
		['Telascience','http://wms.telascience.org/cgi-bin/ngBM_wms?STYLES=&TIME=2004-09&'],		
		['World - NASA Blue Marble Next Generation','http://wms.jpl.nasa.gov/wms.cgi?']			
);

then add OWSManager controller:

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

Advanced Usage

...