Hi Melvin
 
Just include them in the layers parameter with commas between in your WMS call 
eg:
 
var topowms = new OpenLayers.Layer.WMS( "Topos",
                          "http://10.64.20.120/cgi-bin/gsswms.exe?";,
                          {layers: 
['nzislands','nznoaa','nz1mtm','nz250ktm','nz50ktm','linz_orthos'], format: 
"image/png"},
                          {singleTile: true, minResolution: 1000} );
 
Cheers,
 
Robert

>>> MeLv1n wAuRaN <melvinne...@gmail.com> 6/03/2009 12:37 p.m. >>>
hi all,

how do you add an overlay layer to openlayers? i have 7 ESRI shapefiles (POINT) 
that i want to display. So far i only get examples on google map layers, but i 
don't see examples on how to add more than 1 non-base layers in a shapefile 
format. Below is my simple code:

<html>
<head>
<title>OpenLayers Example</title>
<script src="http://openlayers.org/api/OpenLayers.js";></script>
</head>
<body>
<div style="width:100%; height:100%" id="map"></div>
<script defer="defer" type="text/javascript">
var map = new OpenLayers.Map('map');
var wms = new OpenLayers.Layer.WMS( "Background Layer",
"http://localhost/cgi-bin/mapserv.exe";, {map: 'C:\ms4w\Skripsi\coba.map'},
{isBaseLayer: true} );
map.addLayer(wms);
map.zoomToMaxExtent();
</script>

</body>
</html>



Cheers,
Melvin



Click here ( https://www.mailcontrol.com/sr/wQw0zmjPoHdJTZGyOCrrhg== ) to 
report this email as spam.
------------------------------------------------------------------
The contents of this email are confidential to AsureQuality. If you have 
received this communication in error please notify the sender immediately and 
delete the message and any attachments. The opinions expressed in this email 
are not necessarily those of AsureQuality. This message has been scanned for 
known viruses before delivery. AsureQuality supports the Unsolicited Electronic 
Messages Act 2007. If you do not wish to receive similar communications in 
future, please notify the sender of this message.
------------------------------------------------------------------


This message has been scanned for malware by SurfControl plc. 
www.surfcontrol.com
_______________________________________________
Users mailing list
Users@openlayers.org
http://openlayers.org/mailman/listinfo/users

Reply via email to