Tile image with polygons got vertical line at the edge

Stephen Woodbridge woodbri at SWOODBRIDGE.COM
Tue Apr 17 11:07:15 EDT 2007


Hello Ei,

Have you looked at ka-map or preferably openLayers? OpenLayers allows 
you to easily merge mapserver and Google into a single application and 
does all the heavy lifting.

Regarding your extra lines, this is might be cause by the fact that the 
polygon is getting clipped to the extents of your tile. You might try 
setting the OUTLINECOLOR -1 -1 -1 for the polygon layer so that it is 
not draw. I do not think you would run into these problems with OpenLayers.

-Steve W


Ei Fujioka wrote:
> Hello experts,
> 
> I have a weird problem that Mapserver images get one pixel wide vertical 
> lines when they contain shapefiles that extend beyond the images 
> (shapefiles are cut at the edge of the images).
> 
> I'm developing a Google Maps application in which Mapserver layers are 
> overlaid. As Google Map requests tiles of the map image, Mapserver sends 
> them back. This usually works excellent. But when a tile has a shapefile 
> extending beyond it, the tile got a kind of border line visible.
> 
> Please see the screen shot. You'll see two vertical lines 256-pixel 
> apart (which is the tile size).
> http://seamap.env.duke.edu:8888/dev/cache/misc/tile_edge_lines.jpg
> 
> 
> I tried PNG and GIF with the same results. This should have nothing to 
> do with Google Maps because I still see the line when pulling the tile 
> image directly onto the browser.
> Polygons are added to the map with PHP/Mapscript. Transparency, fill 
> color and outline color are set.
>   $layer->set('transparency',"30");
>   ...
>   $poStyle = ms_newStyleObj($class_tmp);
>   $poStyle->outlinecolor->setRGB(255,0,0);
>   $poStyle->color->setRGB(200, 100, 0);
> 
> Any workaround?
> 
> 
> MapServer version 4.2.2 OUTPUT=GIF OUTPUT=PNG OUTPUT=JPEG OUTPUT=WBMP 
> OUTPUT=PDF SUPPORTS=PROJ SUPPORTS=FREETYPE SUPPORTS=WMS_SERVER 
> SUPPORTS=WMS_CLIENT SUPPORTS=WFS_SERVER SUPPORTS=WFS_CLIENT 
> INPUT=POSTGIS INPUT=OGR INPUT=GDAL INPUT=SHAPEFILE
> 
> Thanks,
> 
> 
> Ei
> 
> 



More information about the mapserver-users mailing list