I am using Mapserver-wms-openlayers for publishing maps. But there are some issues came across related to duplicate labeling for same feature in adjacent tiles, unwanted breaks in line features along tile borders, labels cut along tile boarders.
Not much documentations to clear this anywhere.
Can I create single tile using mapserver wms? Just increasing the tile-size to container (map-div) size is enough?
My code is:
map = new OpenLayers.Map('map',
{zoomDuration: 1,projection: 'EPSG:3857'}
);
var mymap_all = new OpenLayers.Layer.WMS("EOL",
"http://192.168.0.233/cgi-bin/mapserv?map=/var/www/mstest/test_plant.map",
{'layers':"map_outline",
'transparent':true,
'format':'image/png'},
{isBaseLayer: false,opacity: 100},
{singleTile: true, ratio: 1}
);
var gmap = new OpenLayers.Layer.Google("Google Streets", // the default
{numZoomLevels: 25,visibility: false},
{isBaseLayer: true}
);
map.addLayers([mymap_all,gmap]);
Best Answer
This is a comparison between multiple tiles and single tile using WMS in OpenLayers:
Here is the example:
Since you are also dealing with Google basemaps, you need to add mercator projections to your mapfile, these posts can guide you to do so:
with WFS:
Basically you need to adapt your projection settings (in OL and MS) to allow the correct display of your layers together.
Since MapServer understands WMS, you just need to pass your map file data as WMS like here. About your labels, using PARTIALS may solve your issue.