Custom shape changes color

Abe Gillespie agillesp at VT.EDU
Mon Dec 13 11:42:50 PST 2004


The work-around with adding a layer with the necessary color works.
Thanks for the help!

-Abe

On Dec 13, 2004, at 10:16 AM, Stephen Woodbridge wrote:

> 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