[mapserver-users] Calling WMS layer via openlayers when STATUS ON
P Kishor
punk.kish at gmail.com
Tue Oct 13 18:21:08 PDT 2009
On Tue, Oct 13, 2009 at 6:37 PM, Paul Curran <paul_everton at hotmail.com> wrote:
> Hi, Ive been struggling with this problem for a little while now.
>
> My WMS layer will only display if STATUS is set to DEFAULT within the
> mapfile. If status is set to ON, i get following error message within OL Map
> window. "WMSLoadGetMapParams(): WMS Server Error". What am i missing to call
> the layer within openlayers?
>
> My Code is as follows:
>
> var bounds = new OpenLayers.Bounds(0, 0, 660046, 1229782);
> var map, layer1, layer2;
> var options = { maxExtent: bounds, maxResolution: 1000, numZoomLevels:
> 10};
>
>
>
> function init(){
> map = new OpenLayers.Map('map', options);
>
> layer1 = new OpenLayers.Layer.WMS("OpenLayers WMS",
>
> "http://localhost/cgi-bin/mapserv.exe?map=c:/ms4w/apps/openlayers-2.8/data/uk2.map",
> { layers: "250" },
> {gutter: 15});
>
> map.addLayer(layer1);
> map.zoomToMaxExtent();
>
>
What is the name of your layer? Is it "250"? Is that a valid name?
> Thanks for any help in advance
>
> Paul
>
--
Puneet Kishor http://www.punkish.org
Carbon Model http://carbonmodel.org
Charter Member, Open Source Geospatial Foundation http://www.osgeo.org
Science Commons Fellow, http://sciencecommons.org/about/whoweare/kishor
Nelson Institute, UW-Madison http://www.nelson.wisc.edu
-----------------------------------------------------------------------
Assertions are politics; backing up assertions with evidence is science
=======================================================================
Sent from Madison, WI, United States
More information about the MapServer-users
mailing list