[mapserver-dev] mapscript_csharp: using STYLEITEM "AUTO"

Tamas Szekeres szekerest at gmail.com
Thu Apr 16 15:47:23 EDT 2009


Prakash,

Setting the color at class level is deprecated, it internally sets the color
of the first style of the class in fact.

Best regards,

Tamas



2009/4/16 Prakash Tilhoo <prakashtilhoo at astuntechnology.com>

>  Tamas,
>
> Thank you very much for your usual reply.
>
> When I do classObj cls = new classObj(layer), I get default Label style
> sections created in map file.
>
> 1) Example 1
>
> STYLEITEM "AUTO"
> CLASS
>        NAME "Elevation Poly 5"
> END
> END # Layer
>
> I understand that cls.name = "Elevation Poly 5"; will give the above,
> along with other things mentioned above.
>
> 2) Example 2
>
> STYLEITEM "AUTO"
> CLASS
>     color 255 255 255
> END
> END # Layer
>
> Doing
>
> styleObj style = new styleObj(cls);
> style.setRGB(255,255,255);
>
> will give something like below in map file:
>
> STYLEITEM "AUTO"
> CLASS
>     Style
>         color 255 255 255
>         ...
>        ...
>    END
> END
> END # Layer
>
> QUESTION:
>
> Will these additional entries in the map file affect the 'mapserver'
> rendering or will it be same as it would be with two plain above examples ?
>
>
>
>
> Tamas Szekeres wrote:
>
> Hi,
>
> You can do something like:
>
> layer.styleitem = "AUTO";
> classObj cls = new classObj(layer);
> cls.name = "Elevation Poly 5";
> styleObj style = new styleObj(cls);
> style.setRGB(255,255,255);
>
>
> Best regards,
>
> Tamas
>
>
>
> 2009/4/16 prak <prakashtilhoo at astuntechnology.com>
>
>>
>> Hello everyone,
>>
>> I am using mapscript_csharp to provide user with ability to edit map file.
>>
>> However, for a layer with setting 'STYLEITEM "AUTO"', there is no
>> 'classobj', but can have entries in map file that look like;
>>
>> 1) Example 1
>>
>> STYLEITEM "AUTO"
>> CLASS
>>        NAME "Elevation Poly 5"
>> END
>> END # Layer
>>
>> 2) Example 2
>>
>> STYLEITEM "AUTO"
>> CLASS
>>     color 255 255 255
>> END
>> END # Layer
>>
>> Using map script, if I do classObj ocls = new classObj(layerObj), the map
>> file will get a 'class' section, but then how can entries like in above
>> examples be 'insertted' using  mapscript_csharp ?
>>
>> Look forward to your usual and kind advice and help.
>>
>> Kind Regards
>> --
>> View this message in context:
>> http://n2.nabble.com/mapscript_csharp%3A-using-STYLEITEM-%22AUTO%22-tp2642811p2642811.html
>> Sent from the Mapserver - Dev mailing list archive at Nabble.com.
>>
>> _______________________________________________
>> mapserver-dev mailing list
>> mapserver-dev at lists.osgeo.org
>> http://lists.osgeo.org/mailman/listinfo/mapserver-dev
>>
>
>
>
> --
> Regards
>
> Prakash Tilhoo
>
>
> Astun Technology Ltd
> Cadogan House, 4-6 High Street
> Epsom, Surrey, KT19 8AD, UK
> t:+44 1372 440 143
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/mapserver-dev/attachments/20090416/feabce09/attachment.html


More information about the mapserver-dev mailing list