<html><head><style type="text/css"><!-- DIV {margin:0px;} --></style></head><body><div style="font-family:times new roman,new york,times,serif;font-size:12pt"><div>hello again<br>I setup wms server but still i get 2 tile of 256*256 pixel via openlayers (as i was getting through OpenLayers.Layer.Mapserver). I've no idea what's wrong. this is at the time of specifying size paramater in mapfile to be 800*400.<br>When i test wms server using urls provided in mapserver manual, everything goes right i.e. an image output with size of 800*400.<br>Any idea?<br><br>Best regards<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 size="2" face="Tahoma"><hr size="1"><b><span style="font-weight: bold;">From:</span></b> Slawomir Messner <slawomir.messner@staff.uni-marburg.de><br><b><span style="font-weight: bold;">To:</span></b>
Saka Royban <sakaroyban@yahoo.com><br><b><span style="font-weight: bold;">Cc:</span></b> openlayers-users@lists.osgeo.org<br><b><span style="font-weight: bold;">Sent:</span></b> Mon, May 23, 2011 2:09:48 AM<br><b><span style="font-weight: bold;">Subject:</span></b> Re: [OpenLayers-Users] Re: Mapserver untiled problem<br></font><br>
<meta http-equiv="x-dns-prefetch-control" content="off">
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="background: white none repeat scroll 0% 0%; font-family: Consolas; font-size: 13px; color: black; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"><span style="color: blue;">new</span><span> OpenLayers.Layer.WMS("World Map", "<a target="_blank" href="http://localhost/cgi-bin/mapserv.exe">http://localhost/cgi-bin/mapserv.exe</a>?</span><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});<br></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 type="cite">
<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 size="2" face="Tahoma">
<hr size="1"><b><span style="font-weight: bold;">From:</span></b>
Saka Royban <a rel="nofollow" class="moz-txt-link-rfc2396E" ymailto="mailto:sakaroyban@yahoo.com" target="_blank" href="mailto:sakaroyban@yahoo.com"><sakaroyban@yahoo.com></a><br>
<b><span style="font-weight: bold;">To:</span></b>
<a rel="nofollow" class="moz-txt-link-abbreviated" ymailto="mailto:openlayers-users@lists.osgeo.org" target="_blank" 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>
<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 rel="nofollow" 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>
</div>
</div>
</div>
<pre><fieldset class="mimeAttachmentHeader"></fieldset>
_______________________________________________
Users mailing list
<a rel="nofollow" class="moz-txt-link-abbreviated" ymailto="mailto:Users@lists.osgeo.org" target="_blank" href="mailto:Users@lists.osgeo.org">Users@lists.osgeo.org</a><span>
<a target="_blank" href="http://lists.osgeo.org/mailman/listinfo/openlayers-users">http://lists.osgeo.org/mailman/listinfo/openlayers-users</a>
</span></pre>
</blockquote>
<br>
<meta http-equiv="x-dns-prefetch-control" content="on"></div></div>
</div></body></html>