<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 10pt;
font-family:Verdana
}
--></style>
</head>
<body class='hmmessage'>
Thanks for the reply. Yes my layer is called '250'. Do you think this could be a problem?<BR> <BR>My mapfile layer looks as follows:<BR>
<BR>
LAYER<BR> <BR> NAME "250"<BR> METADATA<BR> '250' "wms_demo"<BR> END<BR> STATUS ON<BR> TYPE raster<BR> TILEINDEX "250K"<BR> TILEITEM "Location"<BR> PROJECTION<BR> 'proj=longlat'<BR> 'ellps=WGS84'<BR> 'datum=WGS84'<BR> 'no_defs'<BR> ''<BR> END<BR> CLASS<BR> STYLE<BR> COLOR 0 0 0<BR> END<BR> LABEL<BR> COLOR 0 0 0<BR> SIZE SMALL<BR> END<BR> <BR> END<BR> <BR>
END<BR> <BR> As i mentioned it displays fine when status DEFAULT but does not display when Status ON. Any ideas where i am going wrong?<BR>
<BR>
Thanks<BR> <BR>> Date: Tue, 13 Oct 2009 20:21:08 -0500<BR>> Subject: Re: [mapserver-users] Calling WMS layer via openlayers when STATUS ON<BR>> From: punk.kish@gmail.com<BR>> To: mapserver-users@lists.osgeo.org<BR>> <BR>> On Tue, Oct 13, 2009 at 6:37 PM, Paul Curran <paul_everton@hotmail.com> wrote:<BR>> > Hi, Ive been struggling with this problem for a little while now.<BR>> ><BR>> > My WMS layer will only display if STATUS is set to DEFAULT within the<BR>> > mapfile. If status is set to ON, i get following error message within OL Map<BR>> > window. "WMSLoadGetMapParams(): WMS Server Error". What am i missing to call<BR>> > the layer within openlayers?<BR>> ><BR>> > My Code is as follows:<BR>> ><BR>> > var bounds = new OpenLayers.Bounds(0, 0, 660046, 1229782);<BR>> > var map, layer1, layer2;<BR>> > var options = { maxExtent: bounds, maxResolution: 1000, numZoomLevels:<BR>> > 10};<BR>> ><BR>> ><BR>> ><BR>> > function init(){<BR>> > map = new OpenLayers.Map('map', options);<BR>> ><BR>> > layer1 = new OpenLayers.Layer.WMS("OpenLayers WMS",<BR>> ><BR>> > "http://localhost/cgi-bin/mapserv.exe?map=c:/ms4w/apps/openlayers-2.8/data/uk2.map",<BR>> > { layers: "250" },<BR>> > {gutter: 15});<BR>> ><BR>> > map.addLayer(layer1);<BR>> > map.zoomToMaxExtent();<BR>> ><BR>> ><BR>> <BR>> What is the name of your layer? Is it "250"? Is that a valid name?<BR>> <BR>> <BR>> > Thanks for any help in advance<BR>> ><BR>> > Paul<BR>> ><BR>> <BR>> <BR>> <BR>> <BR>> -- <BR>> Puneet Kishor http://www.punkish.org<BR>> Carbon Model http://carbonmodel.org<BR>> Charter Member, Open Source Geospatial Foundation http://www.osgeo.org<BR>> Science Commons Fellow, http://sciencecommons.org/about/whoweare/kishor<BR>> Nelson Institute, UW-Madison http://www.nelson.wisc.edu<BR>> -----------------------------------------------------------------------<BR>> Assertions are politics; backing up assertions with evidence is science<BR>> =======================================================================<BR>> Sent from Madison, WI, United States<BR>> _______________________________________________<BR>> mapserver-users mailing list<BR>> mapserver-users@lists.osgeo.org<BR>> http://lists.osgeo.org/mailman/listinfo/mapserver-users<BR><BR> <br /><hr />Chat to your friends for free on selected mobiles. <a href='http://clk.atdmt.com/UKM/go/174426567/direct/01/' target='_new'>Learn more.</a></body>
</html>