Custom shape changes color
Abe Gillespie
agillesp at VT.EDU
Mon Dec 13 07:02:07 PST 2004
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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: text/enriched
Size: 1112 bytes
Desc: not available
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20041213/49316eeb/attachment.bin>
More information about the MapServer-users
mailing list