[Mapserver-users] Outlinecolor of a MS_LAYER_LINE Type
Yewondwossen Assefa
assefa at dmsolutions.ca
Mon Feb 2 07:03:46 PST 2004
Hi There,
The overlayxxx elements have been removed from php/mapscript since
version 4.0. They are still supported in mapserver while reading the map
file for backward compatibility.
Mapserver now allows you to have several styles in a class. The
styles object have basically all the rendering parameters (symbol,
color, backgroundcolor ...) that were inside the class object.
In your case you can define 2 styles in the class object to have the
desired effect. Php/mapscript provide functions to create and deal with
style objects.
Hope It helps.
Assefa,
woodbri at swoodbridge.com wrote:
> Daniel,
>
> Does not look like any of the OVERLAY* attributes of the CLASS object
> are documented in the PHP/Mapscript. Can you tell Nicol if they are
> supported in the code?
>
> Nicol,
>
> You might try to just set them in mapscript like any other object
> attribute:
>
> $classObj->set("OVERLAYCOLOR", $colorObj);
> $classObj->set("OVERLAYSIZE", 3);
>
> It may just work and not be documented.
>
> -Steve
>
> On 2 Feb 2004 at 10:31, Nicol Hermann wrote:
>
>
>>Hi Steve,
>>thanks for your mail. Your example works fine for me with a map-file but
>>how do i achieve the same effect only with phpmapscript? I coundn't find
>>the overlaycolor-keyword in the mapscript documentation neither in the
>>style- nor the class object. Do you have a further tip for me?
>>
>>Thanks
>>Nicol
>>
>>
>>Am Sam, 2004-01-31 um 02.16 schrieb woodbri at swoodbridge.com:
>>
>>>There is a different strategy for rendering lines like you want.
>>>
>>>SYMBOL "circle"
>>>COLOR 0 0 0
>>>SIZE 5
>>>OVERLAYCOLOR 255 0 0
>>>OVERLAYSIZE 3
>>>
>>>This will draw a 5 pixel wide black line and then draw a 3 pixel wide
>>>red line on top of it. Which will leave one pixel of black on each
>>>side of the red line.
>>>
>>>You can adjust the colors and widths for different effects.
>>>
>>>Hope this helps,
>>> Steve W. (one of the other Steve's :)
>>>
>>>On 30 Jan 2004 at 22:49, Nicol Hermann wrote:
>>>
>>>
>>>>Hi Steve,
>>>>
>>>>i hoping to achieve the same effect like it appears with point and
>>>>polygon layers. I would like to see a line which is enclosed which the
>>>>two lines of the outline color. The 'size' parameter only affects the
>>>>thickness of the line.
>>>>
>>>> || Line||
>>>> ^ ^
>>>> |Line with the Outlinecolor
>>>>
>>>>Is there's a special cause that the outline color is ignored by the
>>>>line rendering code?
>>>>
>>>>Thanks
>>>>Nicol
>>>>
>>>>
>>>>Am Fr, den 30.01.2004 schrieb Steve Lime um 21:49:
>>>>
>>>>>It's be awhile since I've looked at that source code but my guess is
>>>>>that outline colors are ignored by the line rendering code. What sort of
>>>>>an effect are you hoping to achieve?
>>>>>
>>>>>Steve
>>>>>
>>>>>
>>>>>>>><mapserver at geochem.de> 1/30/2004 7:52:01 AM >>>
>>>>>
>>>>>Hi List,
>>>>>
>>>>>i want to set the outlinecolor within the StyleObj of a layer with the
>>>>>type MS_LAYER_LINE. I use the following code but the outlinecolor do
>>>>>not
>>>>>appear:
>>>>>
>>>>>$Layer -> set("type", MS_LAYER_LINE );
>>>>>$poClass = ms_newClassObj($Layer);
>>>>>$styleObj = ms_newStyleObj($poClass);
>>>>>$styleObj -> color -> setRGB ( 0, 0, 255 );
>>>>>$styleObj -> outlinecolor -> setRGB ( 0 , 0, 50);
>>>>>$styleObj -> set ("symbolname", "kreis");
>>>>>$styleObj -> set ("size", 8);
>>>>>$poClass -> set("name", "Germany");
>>>>>
>>>>>The same code works with MS_LAYER_POINT and MS_LAYER_POLYGON.
>>>>>
>>>>>Do i miss something?
>>>>>Thanks in advance.
>>>>>Nicol
>>>>>_______________________________________________
>>>>>Mapserver-users mailing list
>>>>>Mapserver-users at lists.gis.umn.edu
>>>>>http://lists.gis.umn.edu/mailman/listinfo/mapserver-users
>>>>
>>>>--
>>>>Nicol Hermann <mapserver at geochem.de>
>>>>
>>>>_______________________________________________
>>>>Mapserver-users mailing list
>>>>Mapserver-users at lists.gis.umn.edu
>>>>http://lists.gis.umn.edu/mailman/listinfo/mapserver-users
>>>>
>>>
>>>
>>>_______________________________________________
>>>Mapserver-users mailing list
>>>Mapserver-users at lists.gis.umn.edu
>>>http://lists.gis.umn.edu/mailman/listinfo/mapserver-users
>>>
>>>
>>
>>
>>_______________________________________________
>>Mapserver-users mailing list
>>Mapserver-users at lists.gis.umn.edu
>>http://lists.gis.umn.edu/mailman/listinfo/mapserver-users
>>
>
>
>
> _______________________________________________
> Mapserver-users mailing list
> Mapserver-users at lists.gis.umn.edu
> http://lists.gis.umn.edu/mailman/listinfo/mapserver-users
>
--
----------------------------------------------------------------
Assefa Yewondwossen
Software Analyst
Email: assefa at dmsolutions.ca
http://www.dmsolutions.ca/
Phone: (613) 565-5056 (ext 14)
Fax: (613) 565-0925
----------------------------------------------------------------
More information about the MapServer-users
mailing list