[mapserver-users] Creating legend

Steve Lime Steve.Lime at dnr.state.mn.us
Tue Oct 7 09:31:49 EDT 2008


There's nothing you have to do on the MapServer side. Looks like your OL config is wrong
though. I think 'singleTile' is set in the wrong configuration object, perhaps others are in
the wrong place too.

Steve

>>> Subha Ramakrishnan <subha at gslab.com> 10/07/08 1:30 AM >>>
Hi,

I am using mapserver 5.0.2 with openlayers.
I've a problem while creating a legend for a map from mapserver.When i 
try to overlay the image from the mapserver on openlayers' base map, the 
images are rendered in tiles, and every tile has a legend and is limited 
by the size of the tile. So, i see lots of legends on the map and only 
half of them are visible as it is restricted by the tile size.

This is my request to mapserver from openlayers

var mapfile = layer_tablename+'.map';
twms1 = new OpenLayers.Layer.WMS( 
layer_tablename,"http://localhost/cgi-bin/mapserv?",
{ map: mapfile,
   transparent: 'true', layers:layer_tablename,
   format: 'image/png',
   projection:"EPSG:4326",reproject:false,
   units: "m",
   singleTile: true
},{numZoomLevels : MaxZoomLevel});
map.addLayer(twms1);

I am using the option of singleTile. Is there any setting to be done in 
the map file or mapserver for it render a single tile/single legend per 
image?

Thank you.

Regards,
Subha

_______________________________________________
mapserver-users mailing list
mapserver-users at lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users



More information about the mapserver-users mailing list