[mapserver-users] Problem in extent using openlayers with Mapserver

Saka Royban sakaroyban at yahoo.com
Sat Jun 4 13:21:14 EDT 2011


Hi all.
I've really got stuck in this problem and need some help as i'm a newbie using 
openlayers with mapserver.
In mapfile i've set output to be:
  EXTENT        -180 -90 180 90 # Geographic
  SIZE           800 400
  IMAGECOLOR     128 128 255

when  i request mapserver through URL, i recieve a complete 800*400 image,  but 
when i use openlayers i get a 800*400 image which original map fills  512*256 of 
the center and other pixels are filled with IMAGECOLOR.
this is my code:
    map = new OpenLayers.Map( 'map',{'tileSize': new OpenLayers.Size(400,400)} 
);
  layer = new OpenLayers.Layer.MapServer( "World  Map",
                        "http://localhost/cgi-bin/mapserv.exe", {map: 
'/ms4w/apps/ms101/htdocs/ms101.map',layers: 'world_poly', height: 400, width: 
800}, {singleTile: true} );

    map.addLayer(layer);
    map.zoomToMaxExtent();

I asked this question in openlayers mailing list with no success. It sounds it 
is related to mapserver.
Any help would be greatly appreciated

Regards (also sorry if my english is not very good)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/mapserver-users/attachments/20110604/3e46be64/attachment.html


More information about the mapserver-users mailing list