visualize my wms file
---------------------
Key: GEOS-1222
URL: http://jira.codehaus.org/browse/GEOS-1222
Project: GeoServer
Issue Type: Wish
Components: WMS
Affects Versions: 1.5.1
Environment: S.O.:windows XP
Reporter: Dario
Assignee: Gabriel Roldán
Fix For: 1.5.1
Hi everybody,
I am trying to visualize from geoserver my two new wms files.
I have created them and now I want to visualize a map which contains both wms.
I started from an example file that was in Openlayers folder ("overviewmap.html") and I want to visualize my wms files instead of the two layers there are in the original file.
How can I do?? I attach my file code...
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Overview Map Example</title>
<script src="./lib/OpenLayers.js" type="text/javascript"></script>
<style>
#map{
width:100%;
height:500px;
border:1px solid;
}
</style>
</head>
<body>
<div id="map"></div>
<script defer="defer" type="text/javascript">
var map = new OpenLayers.Map('map');
// my city
var constantina = new OpenLayers.LonLat(-5.6165,37.8623);
var d_wms = new OpenLayers.Layer.WMS( "ita_prov",
"http://127.0.0.1:8080/geoserver/wms?bbox=-180.0,-90.0,180.0,90.0&styles=&Format=application/openlayers&request=GetMap&layers=province&width=800&height=375&srs=EPSG:4326", {layers: 'basic'} );
var d_nasa_wms = new OpenLayers.Layer.WMS( "reg2001_s",
"http://127.0.0.1:8080/geoserver/wms?bbox=-180.0,-90.0,180.0,90.0&styles=&Format=application/openlayers&request=GetMap&layers=regioni&width=800&height=375&srs=EPSG:4326", {layers: "modis,global_mosaic"} );
map.addLayers([
d_nasa_wms,
d_wms
]);
map.addControl(new OpenLayers.Control.LayerSwitcher());
var options = {
layers: [d_wms.clone()],
minRatio: 8,
maxRatio: 128
};
var overview = new OpenLayers.Control.OverviewMap(options);
map.addControl(overview);
map.setCenter(constantina, 4);
overview.maximizeControl();
</script>
</body>
</html>
Dario
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira