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

2011-06-08 Thread Saka Royban




- Forwarded Message 
From: Saka Royban 
To: Stephen Woodbridge 
Sent: Wed, June 8, 2011 5:38:17 PM
Subject: Re: [mapserver-users] Problem in extent using openlayers with Mapserver


Thanks stephen for ur help (and sorry for bit abit latency in reply)
I've already tried that, i.e. constructing map object without any argument but 
no result.
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.
Any idea now?





From: Stephen Woodbridge 
To: mapserver-users@lists.osgeo.org
Sent: Sat, June 4,  2011 10:04:29 PM
Subject: Re: [mapserver-users] Problem in extent using openlayers with Mapserver

try just using:

map = new OpenLayers.Map( 'map' );

-Steve

On 6/4/2011 1:21 PM, Saka Royban wrote:
> 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)
>
>
>
> ___
> mapserver-users mailing list
> mapserver-users@lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/mapserver-users

___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


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

2011-06-04 Thread Stephen Woodbridge

try just using:

map = new OpenLayers.Map( 'map' );

-Steve

On 6/4/2011 1:21 PM, Saka Royban wrote:

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)



___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users