<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META content="text/html; charset=us-ascii" http-equiv=Content-Type>
<STYLE type=text/css>DIV {
        MARGIN: 0px
}
</STYLE>

<META name=GENERATOR content="MSHTML 8.00.6001.19046"></HEAD>
<BODY>
<DIV dir=ltr align=left><FONT face=Arial><FONT color=#0000ff><FONT size=2><SPAN 
class=329460518-10062011>with </SPAN>'maxResolution': 'auto'<SPAN 
class=329460518-10062011> in the mapoptions, you should get what you 
want.</SPAN></FONT></FONT></FONT></DIV>
<DIV dir=ltr align=left><FONT face=Arial><FONT color=#0000ff><FONT size=2><SPAN 
class=329460518-10062011></SPAN></FONT></FONT></FONT>&nbsp;</DIV>
<DIV dir=ltr align=left><FONT face=Arial><FONT color=#0000ff><FONT size=2><SPAN 
class=329460518-10062011>Arnd</SPAN></FONT></FONT></FONT></DIV><BR>
<DIV dir=ltr lang=de class=OutlookMessageHeader align=left>
<HR tabIndex=-1>
<FONT size=2 face=Tahoma><B>Von:</B> mapserver-users-bounces@lists.osgeo.org 
[mailto:mapserver-users-bounces@lists.osgeo.org] <B>Im Auftrag von </B>Saka 
Royban<BR><B>Gesendet:</B> Donnerstag, 9. Juni 2011 17:04<BR><B>An:</B> 
MapServer<BR><B>Betreff:</B> Re: AW: [mapserver-users] Problem in extent using 
openlayerswithMapserver<BR></FONT><BR></DIV>
<DIV></DIV>
<DIV style="FONT-FAMILY: times new roman,new york,times,serif; FONT-SIZE: 12pt">
<DIV>Very very thanks. <BR>It worked fine.<BR>but one strange point: Why they 
don't easily compute this maxRsolution in their lib using with of map element 
(instead of supposing all map elements to be in 256*256 size)?<BR>Anyway, your 
helpful point is totally appreciated. <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> Arnd Wippermann 
&lt;arnd.wippermann@web.de&gt;<BR><B><SPAN 
style="FONT-WEIGHT: bold">To:</SPAN></B> Saka Royban 
&lt;sakaroyban@yahoo.com&gt;<BR><B><SPAN 
style="FONT-WEIGHT: bold">Cc:</SPAN></B> users@openlayers.org<BR><B><SPAN 
style="FONT-WEIGHT: bold">Sent:</SPAN></B> Thu, June 9, 2011 1:59:10 
AM<BR><B><SPAN style="FONT-WEIGHT: bold">Subject:</SPAN></B> AW: 
[mapserver-users] Problem in extent using openlayers 
withMapserver<BR></FONT><BR>
<META content=off http-equiv=x-dns-prefetch-control>
<STYLE type=text/css>DIV {
        MARGIN: 0px
}
</STYLE>

<DIV dir=ltr align=left><SPAN class=358181521-08062011><FONT color=#0000ff 
size=2 face=Arial>when you request MapServer via Url, then Mapserver delivers 
the image as defined by the mapfile (extent, imagesize) =&gt; resolution = 
0.45.</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=358181521-08062011><FONT color=#0000ff 
size=2 face=Arial></FONT></SPAN>&nbsp;</DIV>
<DIV dir=ltr align=left><SPAN class=358181521-08062011><FONT color=#0000ff 
size=2 face=Arial>If you request MapServer via OpenLayers.WMS, then the 
mapoptions are the point. By default is the maxResolution = 1.40625 and the 
other resolutions are maxResolution/2^zoom. (1.40625 , 0.703125, 0.3515625, 
...)</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=358181521-08062011><FONT color=#0000ff 
size=2 face=Arial></FONT></SPAN>&nbsp;</DIV>
<DIV>map.zoomToMaxExtent()&nbsp;uses&nbsp;the&nbsp;re<SPAN 
class=358181521-08062011>s</SPAN>olution&nbsp;= <FONT 
face=Arial>0.703125,&nbsp;because&nbsp;that&nbsp;is&nbsp;the&nbsp;best&nbsp;resolution&nbsp;to&nbsp;display&nbsp;maxExtent&nbsp;(-180,-90,180,90).&nbsp;For&nbsp;the&nbsp;next&nbsp;resolution&nbsp;the&nbsp;map&nbsp;would&nbsp;not&nbsp;display&nbsp;in&nbsp;whole.</FONT></DIV>
<DIV><FONT face=Arial><FONT color=#0000ff><FONT 
size=2></FONT></FONT></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial><FONT color=#0000ff><FONT size=2>Y<SPAN 
class=358181521-08062011>ou can set&nbsp;maxResolution=0.45 in the mapoptions. 
Then the layer should fill the whole map.</SPAN></FONT></FONT></FONT></DIV>
<DIV><FONT face=Arial><FONT color=#0000ff><FONT size=2><SPAN 
class=358181521-08062011></SPAN></FONT></FONT></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial><FONT color=#0000ff><FONT size=2><SPAN 
class=358181521-08062011>Arnd</SPAN></FONT></FONT></FONT></DIV>
<DIV><BR><BR></DIV>
<DIV dir=ltr lang=de class=OutlookMessageHeader align=left>
<HR tabIndex=-1>
<FONT size=2 face=Tahoma><B>Von:</B> mapserver-users-bounces@lists.osgeo.org 
[mailto:mapserver-users-bounces@lists.osgeo.org] <B>Im Auftrag von </B>Saka 
Royban<BR><B>Gesendet:</B> Mittwoch, 8. Juni 2011 15:10<BR><B>An:</B> 
MapServer<BR><B>Betreff:</B> Re: [mapserver-users] Problem in extent using 
openlayers withMapserver<BR></FONT><BR></DIV>
<DIV></DIV>
<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 
size=2 face=Tahoma>----- 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>
<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 
size=2 face=Tahoma>
<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><SPAN>&gt; "<A 
href="http://localhost/cgi-bin/mapserv.exe" 
target=_blank>http://localhost/cgi-bin/mapserv.exe</A>", 
{map:</SPAN></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 href="mailto:mapserver-users@lists.osgeo.org" rel=nofollow 
target=_blank 
ymailto="mailto:mapserver-users@lists.osgeo.org">mapserver-users@lists.osgeo.org</A><BR><SPAN><SPAN><SPAN>&gt; 
<A href="http://lists.osgeo.org/mailman/listinfo/mapserver-users" 
target=_blank>http://lists.osgeo.org/mailman/listinfo/mapserver-users</A></SPAN></SPAN></SPAN><BR><BR>_______________________________________________<BR>mapserver-users 
mailing list<BR><A href="mailto:mapserver-users@lists.osgeo.org" rel=nofollow 
target=_blank 
ymailto="mailto:mapserver-users@lists.osgeo.org">mapserver-users@lists.osgeo.org</A><BR><A 
href="http://lists.osgeo.org/mailman/listinfo/mapserver-users" rel=nofollow 
target=_blank>http://lists.osgeo.org/mailman/listinfo/mapserver-users</A><BR></DIV></DIV></DIV></DIV></DIV></DIV>
<META content=on 
http-equiv=x-dns-prefetch-control></DIV></DIV></DIV></BODY></HTML>