WMSManager Control set
This page shows a set of OpenLayers Controls to add a WMS direct interface to OpenLayers.
WMSManager Control
- Create a map taking images from different WMS servers
- Choose the WMS layer/layers you prefer from a remote or local server.
- Choose the image type (ex: GIF, JPEG, PNG) for each layer
- Automatically assignment to queryable layers
- Enhanced legend functions
WMSQuery Control
- Perform a query by point (GetFeatureInfo) of all queryable layers.
WMSPermalink Control
- Send in a unique URL the map view you have in front (enhancement of the original one).
WMSExporter Control
- Copy and paste the OpenLayers configuration code for the map view you have in front.
Project Status
- Code
- Code is at Beta state (June 11, 2007)
- The code is available for download at OpenLayers Dev SVN sandbox (ominiverdi).
- WMS Manager Ticket on OL Trac.
- Tests
- no test yet available.
- Example
- see Demos section below
- Documentation
- actually only this page
Demos
You can have a test here:
- WMS Manager demo site
- Saved view (WMSPermalink)
- Exported view (same view as above)
Development Status
Browser Compatibility
- Firefox
- version 2.0.0.x, fully compatible
- IE
- version 6, mostly compatible
- Safari
- version 2.0.4, compatible but selects accept only keyboards commands
Author
Code Sample
Please Note: A proxy for OpenLayers is needed to do GetCapabilties requests. So if you want to install it in your web server and connect to remote WMS servers you'll need to use a copy of proxy.cgi that you can find in OpenLayers example dir. Put the proxy in your CGI executable dir. Finally edit proxy.cgi and add your listed server to the allowedHosts var.
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<style type="text/css">
#map {
width: 800px;
height: 475px;
border: 1px solid black;
}
#queryOut {
width:800px;
height: 200px;
border: 1px solid black;
position:absolute;
left:10px;
top:500px;
overflow:auto;
}
</style>
<script src="http://www.openlayers.org/api/OpenLayers.js"></script>
<script src="http://www.ominiverdi.org/openlayers/nightly/openlayers/build/WMSManager.js"></script>
<script type="text/javascript">
<!--
var map;
function init(){
OpenLayers.ProxyHost = "/cgi-bin/proxy.cgi?url=";
map = new OpenLayers.Map( $('map') );
var aWMSServers=new Array(
['OpenLayers WMS (UMN mapserver)','http://labs.metacarta.com/cgi-bin/mapserv?map=/www/labs/map/vmap0.map'],
['NASA Blue Marble (???)','http://wms.jpl.nasa.gov/wms.cgi?'],
['Demis World Map (UMN Mapserver)','http://www2.demis.nl/mapserver/Request.asp?'],
['FAO (UMN Mapserver)','http://193.43.36.137/ows/14110'],
['BR - Unidades de Conservacao do Brasil (dados preliminares)','http://mapas.mma.gov.br/cgi-bin/mapserv?map=/opt/www/html/webservices/ucs.map&'],
['SP - Comunidad Valenciana - Conselleria de Territori i Habitatge, GVA - Servici WMS: wms_senderos','http://orto.cth.gva.es/wmsconnector/com.esri.wms.Esrimap/wms_senderos?']
);
map.addControl( new OpenLayers.Control.WMSManager(aWMSServers ) );
//map.addControl(new OpenLayers.Control.NavToolbar());
var queryTarget = $('queryOut');
WMSToolbar = new OpenLayers.Control.WMSToolbar({queryTarget: queryTarget});
map.addControl(WMSToolbar);
map.addControl(new OpenLayers.Control.WMSPermalink());
map.addControl(new OpenLayers.Control.WMSExporter());
}
// -->
</script>
<link rel="stylesheet" type="text/css" href="http://www.ominiverdi.org/openlayers/nightly/openlayers/theme/default/style.css"></style>
</head>
<body onload="init()">
<div id="map"></div>
<div id="queryOut"></div>
</body>
</html>
