Custom shape changes color

Stephen Woodbridge woodbri at SWOODBRIDGE.COM
Mon Dec 13 10:16:29 EST 2004


Abe,

Check out for the problem and a potential work around:
http://mapserver.gis.umn.edu/bugs/show_bug.cgi?id=306

-Steve W

Abe Gillespie wrote:
> I created a measure tool and use the following layer for the lines:
>
> LAYER
> NAME "custom_solid_line"
> STATUS ON
> TYPE LINE
> POSTLABELCACHE true
> CLASS
> SYMBOL "solid"
> COLOR 255 255 0
> SIZE 2
> END
> END
>
> I add lines to the map with code similar to the following:
>
> $line = ms_newLineObj();
> $line->addXY($x, $y);
> $shp = ms_newShapeObj(MS_SHAPE_LINE);
> $shp->add($line);
> $layer = $map->getLayerByName("custom_solid_line");
> $retVal = $layer->addFeature($shp);
> $shp->free();
> $line->free();
> // Draw the map later on ...
>
> The problem is the lines don't always stay yellow. I've seen them green
> and pinkish too. The color seems to depend on other visible layers. I've
> also seen the same phenomenon with the extents box in the reference map.
> In fact, the color of the lines and the extent box is always the same.
> I.e.: when one changes color the other does too. I do draw my reference
> map in a sort of nonstandard way though by drawing the map and ref. map
> separately and then pasting them together.
>
> Thanks for any help.
> -Abe



More information about the mapserver-users mailing list