Hi, If you use WMS layer, don't forget to fill up the mandatory attributes for it in your mapfile.
Regardless of what is in your mapfile, your OpenLayers map lacks of several settings, like resolutions, projection, maxExtent... Have a look at the rich collection of example to make it up : http://www.openlayers.org/dev/examples/example-list.html Regards, Guillaume MeLv1n wAuRaN a écrit : > Hi Guillaume, > > Thanks for the quick reply..so basically the two are much the same? i > see, so i will use the wms then. by the way, can you take a look at my > script below? this does not want to display my map. I'm trying to > display a basemap (which is the background layer) and 6 overlays where > each overlay represents a single ESRI shapefile (POINT). > > <html> > <head> > <title>Minahasa Utara</title> > <script src="http://localhost/openlayers/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.MapServer( "Background Layer", > "http://localhost/cgi-bin/mapserv.exe", {map: > 'C:\ms4w\Skripsi\coba.map'} ); > var overlay = new OpenLayers.Layer.WMS("Overlays", > "http://localhost/cgi-bin/mapserv.exe", > {layers: ['atm','bank','polisi','rumah > sakit','terminal','universitas'], format: "image/png"}, > {singleTile: true, minResolution: 1000}); > map.addLayer(wms); > map.addLayers([overlay]); > map.setBaseLayer(wms); > map.zoomToMaxExtent(); > > map.addControl(new > OpenLayers.Control.LayerSwitcher({'ascending':false})); > </script> > > </body> > </html> _______________________________________________ Users mailing list [email protected] http://openlayers.org/mailman/listinfo/users
