<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><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">----- Forwarded Message ----<br><b><span style="font-weight: bold;">From:</span></b> Saka Royban &lt;sakaroyban@yahoo.com&gt;<br><b><span style="font-weight: bold;">To:</span></b> Stephen Woodbridge &lt;woodbri@swoodbridge.com&gt;<br><b><span style="font-weight: bold;">Sent:</span></b> Wed, June 8, 2011 5:38:17 PM<br><b><span style="font-weight: bold;">Subject:</span></b> Re: [mapserver-users] Problem in extent using openlayers with Mapserver<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>Thanks stephen for ur help (and sorry for bit abit latency in reply)<br>I've already tried that, i.e. constructing map object without any argument but no result.<br>In fact, in first step i created map without any extra argument and faced that problem and after that i added some arguments to maybe solve the problem.<br>Any idea now?<br></div><div style="font-family: times new roman,new york,times,serif; font-size: 12pt;"><br><div style="font-family: arial,helvetica,sans-serif; font-size: 13px;"><font face="Tahoma" size="2"><hr size="1"><b><span style="font-weight: bold;">From:</span></b> Stephen Woodbridge &lt;woodbri@swoodbridge.com&gt;<br><b><span style="font-weight: bold;">To:</span></b> mapserver-users@lists.osgeo.org<br><b><span style="font-weight: bold;">Sent:</span></b> Sat, June 4,
 2011 10:04:29 PM<br><b><span style="font-weight: bold;">Subject:</span></b> Re: [mapserver-users] Problem in extent using openlayers with Mapserver<br></font><br>
try just using:<br><br>map = new OpenLayers.Map( 'map' );<br><br>-Steve<br><br>On 6/4/2011 1:21 PM, Saka Royban wrote:<br>&gt; Hi all.<br>&gt; I've really got stuck in this problem and need some help as i'm a newbie<br>&gt; using openlayers with mapserver.<br>&gt; In mapfile i've set output to be:<br>&gt; EXTENT -180 -90 180 90 # Geographic<br>&gt; SIZE 800 400<br>&gt; IMAGECOLOR 128 128 255<br>&gt;<br>&gt; when i request mapserver through URL, i recieve a complete 800*400<br>&gt; image, but when i use openlayers i get a 800*400 image which original<br>&gt; map fills 512*256 of the center and other pixels are filled with IMAGECOLOR.<br>&gt; this is my code:<br>&gt; map = new OpenLayers.Map( 'map',{'tileSize': new<br>&gt; OpenLayers.Size(400,400)} );<br>&gt; layer = new OpenLayers.Layer.MapServer( "World Map",<br><span><span>&gt; "<a target="_blank" href="http://localhost/cgi-bin/mapserv.exe">http://localhost/cgi-bin/mapserv.exe</a>",
 {map:</span></span><br>&gt;
 '/ms4w/apps/ms101/htdocs/ms101.map',layers: 'world_poly', height: 400,<br>&gt; width: 800}, {singleTile: true} );<br>&gt;<br>&gt; map.addLayer(layer);<br>&gt; map.zoomToMaxExtent();<br>&gt;<br>&gt; I asked this question in openlayers mailing list with no success. It<br>&gt; sounds it is related to mapserver.<br>&gt; Any help would be greatly appreciated<br>&gt;<br>&gt; Regards (also sorry if my english is not very good)<br>&gt;<br>&gt;<br>&gt;<br>&gt; _______________________________________________<br>&gt; mapserver-users mailing list<br>&gt; <a rel="nofollow" ymailto="mailto:mapserver-users@lists.osgeo.org" target="_blank" href="mailto:mapserver-users@lists.osgeo.org">mapserver-users@lists.osgeo.org</a><br><span><span>&gt; <a target="_blank" href="http://lists.osgeo.org/mailman/listinfo/mapserver-users">http://lists.osgeo.org/mailman/listinfo/mapserver-users</a></span></span><br><br>_______________________________________________<br>mapserver-users
 mailing list<br><a rel="nofollow" ymailto="mailto:mapserver-users@lists.osgeo.org" target="_blank" href="mailto:mapserver-users@lists.osgeo.org">mapserver-users@lists.osgeo.org</a><br><a rel="nofollow" target="_blank" href="http://lists.osgeo.org/mailman/listinfo/mapserver-users">http://lists.osgeo.org/mailman/listinfo/mapserver-users</a><br></div></div>
</div><meta http-equiv="x-dns-prefetch-control" content="on"></div></div>
</div></body></html>