[mapserver-users] Calling WMS layer via openlayers when STATUS ON
Rahkonen Jukka
Jukka.Rahkonen at mmmtike.fi
Wed Oct 14 07:16:27 PDT 2009
Hi,
I do believe that layer name must not start with a number. Try renaming it to "test" or something.
-Jukka Rahkonen-
________________________________
Lähettäjä: mapserver-users-bounces at lists.osgeo.org [mailto:mapserver-users-bounces at lists.osgeo.org] Puolesta Paul Curran
Lähetetty: 14. lokakuuta 2009 17:13
Vastaanottaja: punkish at eidesis.org; mapser all users
Aihe: RE: [mapserver-users] Calling WMS layer via openlayers when STATUS ON
Thanks for the reply. Yes my layer is called '250'. Do you think this could be a problem?
My mapfile layer looks as follows:
LAYER
NAME "250"
METADATA
'250' "wms_demo"
END
STATUS ON
TYPE raster
TILEINDEX "250K"
TILEITEM "Location"
PROJECTION
'proj=longlat'
'ellps=WGS84'
'datum=WGS84'
'no_defs'
''
END
CLASS
STYLE
COLOR 0 0 0
END
LABEL
COLOR 0 0 0
SIZE SMALL
END
END
END
As i mentioned it displays fine when status DEFAULT but does not display when Status ON. Any ideas where i am going wrong?
Thanks
> Date: Tue, 13 Oct 2009 20:21:08 -0500
> Subject: Re: [mapserver-users] Calling WMS layer via openlayers when STATUS ON
> From: punk.kish at gmail.com
> To: mapserver-users at lists.osgeo.org
>
> 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
> _______________________________________________
> mapserver-users mailing list
> mapserver-users at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/mapserver-users
________________________________
Chat to your friends for free on selected mobiles. Learn more. <http://clk.atdmt.com/UKM/go/174426567/direct/01/>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20091014/1af40260/attachment.htm>
More information about the MapServer-users
mailing list