[OpenLayers-Users] how to add a non-base layer?

MeLv1n wAuRaN melvinnesta at gmail.com
Thu Mar 5 18:37:41 EST 2009


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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20090306/851f2a02/attachment.html


More information about the Users mailing list