<!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><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) => resolution =
0.45.</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=358181521-08062011><FONT color=#0000ff
size=2 face=Arial></FONT></SPAN> </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> </DIV>
<DIV>map.zoomToMaxExtent() uses the re<SPAN
class=358181521-08062011>s</SPAN>olution = <FONT
face=Arial>0.703125, because that is the best resolution to display maxExtent (-180,-90,180,90). For the next resolution the map would not display in whole.</FONT></DIV>
<DIV><FONT face=Arial><FONT color=#0000ff><FONT
size=2></FONT></FONT></FONT> </DIV>
<DIV><FONT face=Arial><FONT color=#0000ff><FONT size=2>Y<SPAN
class=358181521-08062011>ou can set 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> </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
<sakaroyban@yahoo.com><BR><B><SPAN
style="FONT-WEIGHT: bold">To:</SPAN></B> Stephen Woodbridge
<woodbri@swoodbridge.com><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 content=off http-equiv=x-dns-prefetch-control>
<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
<woodbri@swoodbridge.com><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>> Hi
all.<BR>> I've really got stuck in this problem and need some help as i'm a
newbie<BR>> using openlayers with mapserver.<BR>> In mapfile i've set
output to be:<BR>> EXTENT -180 -90 180 90 # Geographic<BR>> SIZE 800
400<BR>> IMAGECOLOR 128 128 255<BR>><BR>> when i request mapserver
through URL, i recieve a complete 800*400<BR>> image, but when i use
openlayers i get a 800*400 image which original<BR>> map fills 512*256 of the
center and other pixels are filled with IMAGECOLOR.<BR>> this is my
code:<BR>> map = new OpenLayers.Map( 'map',{'tileSize': new<BR>>
OpenLayers.Size(400,400)} );<BR>> layer = new OpenLayers.Layer.MapServer(
"World Map",<BR><SPAN><SPAN>> "<A href="http://localhost/cgi-bin/mapserv.exe"
target=_blank>http://localhost/cgi-bin/mapserv.exe</A>",
{map:</SPAN></SPAN><BR>> '/ms4w/apps/ms101/htdocs/ms101.map',layers:
'world_poly', height: 400,<BR>> width: 800}, {singleTile: true}
);<BR>><BR>> map.addLayer(layer);<BR>>
map.zoomToMaxExtent();<BR>><BR>> I asked this question in openlayers
mailing list with no success. It<BR>> sounds it is related to
mapserver.<BR>> Any help would be greatly appreciated<BR>><BR>> Regards
(also sorry if my english is not very good)<BR>><BR>><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><SPAN><SPAN>>
<A href="http://lists.osgeo.org/mailman/listinfo/mapserver-users"
target=_blank>http://lists.osgeo.org/mailman/listinfo/mapserver-users</A></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>
<META content=on
http-equiv=x-dns-prefetch-control></DIV></DIV></DIV></BODY></HTML>