<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body text="#000000" bgcolor="#ffffff">
Hi,<br>
we don't use the Ol.Layer.MapServer class for our MapServer layers
but OL.Layer.WMS and it works fine. <br>
I assume it would look like this with your parameters:<br>
<pre style="font-family: Consolas; font-size: 13px; color: black; background: none repeat scroll 0% 0% white;"><span style="color: blue;">new</span> OpenLayers.Layer.WMS("World Map", "<a class="moz-txt-link-freetext" href="http://localhost/cgi-bin/mapserv.exe">http://localhost/cgi-bin/mapserv.exe</a>?<span><span>map=C:/ms4w/apps/ms101/htdocs/ms101.map</span></span>", { <span style="color: maroon;">"layers"</span>: "continents", <span style="color: maroon;">"format"</span>: <span style="color: maroon;">"image/png"</span>}, {singleTile: true});
</pre>
As you see we tell the server which layers to request, maybe this is
what's missing in your code and you should use the whole path to the
mapfile or hide the mapserver behind a proxy which hides/masks the
path.<br>
I hope it helps.<br>
Regards<br>
Slawomir<br>
<br>
Am 23.05.2011 10:24, schrieb Saka Royban:
<blockquote cite="mid:772136.60143.qm@web121612.mail.ne1.yahoo.com"
type="cite">
<style type="text/css"><!-- DIV {margin:0px;} --></style>
<div style="font-family: times new roman,new york,times,serif;
font-size: 12pt;">
<div>Am i posting in wrong section? Should i post in mapserver
mailing list<br>
</div>
<div style="font-family: times new roman,new york,times,serif;
font-size: 12pt;"><br>
<div style="font-family: times new roman,new york,times,serif;
font-size: 12pt;"><font face="Tahoma" size="2">
<hr size="1"><b><span style="font-weight: bold;">From:</span></b>
Saka Royban <a class="moz-txt-link-rfc2396E" href="mailto:sakaroyban@yahoo.com"><sakaroyban@yahoo.com></a><br>
<b><span style="font-weight: bold;">To:</span></b>
<a class="moz-txt-link-abbreviated" href="mailto:openlayers-users@lists.osgeo.org">openlayers-users@lists.osgeo.org</a><br>
<b><span style="font-weight: bold;">Sent:</span></b> Thu,
May 19, 2011 11:42:48 PM<br>
<b><span style="font-weight: bold;">Subject:</span></b>
Mapserver untiled problem<br>
</font><br>
<meta http-equiv="x-dns-prefetch-control" content="off">
<div style="font-family: times new roman,new
york,times,serif; font-size: 12pt;">
<div>Hi all. <br>
I'm gonna use a mapserver untiled layer but the result
just fills heart of produced image and near borders it
is filled by background color. this is javascript code:<br>
function init(){<br>
map = new OpenLayers.Map("map");<br>
layer = new
OpenLayers.Layer.MapServer( "World Map",<br>
<span><span> "<a
moz-do-not-send="true" target="_blank"
href="http://localhost/cgi-bin/mapserv.exe">http://localhost/cgi-bin/mapserv.exe</a>",
{map: '/ms4w/apps/ms101/htdocs/ms101.map'}, </span></span>
{singleTile: true} );<br>
layer.ratio=1;<br>
map.addLayer(layer);<br>
map.zoomToMaxExtent();<br>
}<br>
<br>
It sounds the problem is with extent because FireBug
shows:<br>
<span class="">imgext</span><code class="focusRow
subFocusRow"> -281.25 -140.625 281.25 140.625<br>
</code>
<table class="netInfoParamsText netInfoText
netInfoParamsTable" cellpadding="0" cellspacing="0">
<tbody class="">
<tr class="">
<td class="netInfoParamName"><span class="">mapext</span><code
class="focusRow subFocusRow"> -281.25 -140.625
281.25 140.625</code></td>
<td class="netInfoParamValue"><br>
</td>
</tr>
</tbody>
</table>
<br>
while my mapfile is as follows:<br>
MAP<br>
NAME "MS101"<br>
EXTENT -180 -90 180 90 # Geographic<br>
SIZE 800 400<br>
IMAGECOLOR 128 128 255<br>
SHAPEPATH '../data'<br>
FONTSET '../fonts/fonts.list'<br>
<br>
IMAGETYPE png24<br>
PROJECTION<br>
"init=epsg:4326"<br>
END <br>
LEGEND<br>
STATUS on<br>
LABEL<br>
TYPE TRUETYPE<br>
FONT vera_sans<br>
COLOR 0 0 0<br>
SIZE 8<br>
ANTIALIAS TRUE<br>
END<br>
END<br>
<br>
LAYER # World polygon classified by continents
begins here<br>
NAME continents<br>
DATA 'shapefile/Countries_area'<br>
STATUS default<br>
TYPE POLYGON<br>
PROJECTION<br>
"init=epsg:4326"<br>
END<br>
<br>
<br>
CLASSITEM 'NA3DESC'<br>
LABELITEM 'NA3DESC'<br>
CLASS<br>
NAME 'Africa'<br>
EXPRESSION 'Africa'<br>
STYLE<br>
COLOR 255 128 128<br>
END<br>
LABEL<br>
COLOR 64 64 64<br>
OUTLINECOLOR 212 212 212<br>
TYPE TRUETYPE<br>
FONT vera_sans-bold-italic<br>
SIZE 12<br>
ANTIALIAS TRUE<br>
POSITION CC<br>
PARTIALS FALSE<br>
MINDISTANCE 250<br>
BUFFER 4<br>
END<br>
END<br>
CLASS<br>
NAME 'Antarctica'<br>
EXPRESSION /Antarctic./ #'Antarctic Area'<br>
STYLE<br>
COLOR 128 255 128<br>
END<br>
LABEL<br>
COLOR 64 64 64<br>
OUTLINECOLOR 212 212 212<br>
TYPE TRUETYPE<br>
FONT vera_sans-bold-italic<br>
SIZE 10<br>
ANTIALIAS TRUE<br>
POSITION CC<br>
PARTIALS FALSE<br>
MINDISTANCE 250<br>
BUFFER 4<br>
END<br>
END<br>
CLASS<br>
NAME 'Asia'<br>
EXPRESSION 'Asia'<br>
STYLE<br>
COLOR 0 0 255<br>
END<br>
LABEL<br>
COLOR 64 64 64<br>
OUTLINECOLOR 212 212 212<br>
TYPE TRUETYPE<br>
FONT vera_sans-bold-italic<br>
SIZE 10<br>
ANTIALIAS TRUE<br>
POSITION auto<br>
PARTIALS FALSE<br>
MINDISTANCE 250<br>
BUFFER 4<br>
END<br>
END<br>
CLASS<br>
NAME 'Oceania'<br>
EXPRESSION /Australia*/ #'Australian Area'<br>
STYLE<br>
COLOR 255 255 128<br>
END<br>
LABEL<br>
COLOR 64 64 64<br>
OUTLINECOLOR 212 212 212<br>
TYPE TRUETYPE<br>
FONT vera_sans-bold-italic<br>
SIZE 10<br>
ANTIALIAS TRUE<br>
POSITION CC<br>
PARTIALS FALSE<br>
MINDISTANCE 250<br>
BUFFER 4<br>
END<br>
END<br>
CLASS<br>
NAME 'Europe'<br>
EXPRESSION 'Europe'<br>
STYLE<br>
COLOR 255 128 255<br>
END<br>
LABEL<br>
COLOR 64 64 64<br>
OUTLINECOLOR 212 212 212<br>
TYPE TRUETYPE<br>
FONT vera_sans-bold-italic<br>
SIZE 10<br>
ANTIALIAS TRUE<br>
POSITION CC<br>
PARTIALS FALSE<br>
MINDISTANCE 250<br>
BUFFER 4<br>
END<br>
END<br>
CLASS<br>
NAME 'North America'<br>
EXPRESSION 'North America'<br>
STYLE<br>
COLOR 128 255 255<br>
END<br>
LABEL<br>
COLOR 64 64 64<br>
OUTLINECOLOR 212 212 212<br>
TYPE TRUETYPE<br>
FONT vera_sans-bold-italic<br>
SIZE 10<br>
ANTIALIAS TRUE<br>
POSITION CC<br>
PARTIALS FALSE<br>
MINDISTANCE 250<br>
BUFFER 4<br>
END<br>
END<br>
CLASS<br>
NAME 'South America'<br>
EXPRESSION 'South America'<br>
STYLE<br>
COLOR 255 192 96<br>
END<br>
LABEL<br>
COLOR 64 64 64<br>
OUTLINECOLOR 212 212 212<br>
TYPE TRUETYPE<br>
FONT vera_sans-bold-italic<br>
SIZE 10<br>
ANTIALIAS TRUE<br>
POSITION CC<br>
PARTIALS FALSE<br>
MINDISTANCE 250<br>
BUFFER 4<br>
END<br>
END<br>
END # World polygon classified by continents ends here<br>
<br>
LAYER # World polygon layer begins here<br>
NAME world_poly<br>
GROUP world<br>
DATA 'shapefile/Countries_area.shp'<br>
STATUS ON<br>
TYPE LINE<br>
PROJECTION<br>
"init=epsg:4326"<br>
END<br>
<br>
CLASS<br>
NAME 'The World'<br>
STYLE<br>
COLOR 220 220 220<br>
END<br>
END<br>
END # World polygon layer ends here<br>
<br>
END<br>
<br>
<br>
Thanks in advance<br>
</div>
</div>
<meta http-equiv="x-dns-prefetch-control" content="on">
</div>
</div>
</div>
<pre wrap="">
<fieldset class="mimeAttachmentHeader"></fieldset>
_______________________________________________
Users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Users@lists.osgeo.org">Users@lists.osgeo.org</a>
<a class="moz-txt-link-freetext" href="http://lists.osgeo.org/mailman/listinfo/openlayers-users">http://lists.osgeo.org/mailman/listinfo/openlayers-users</a>
</pre>
</blockquote>
<br>
</body>
</html>