[MS4W-Users] dynamic line pattern
Brent Fraser
bfraser at GeoAnalytic.com
Wed Mar 27 16:22:31 EDT 2019
Sven,
My old notes on styling:
------ Mapserver Styling Strategies ------
1. Values hard-coded in mapfile
2. Values substituted from database attribute values (AKA "attribute
binding")
- not all values can use [attribute] as a value, eg PATTERN
3. Entire Style from attribute using STYLEITEM:
STYLEITEM "mystyleattribute" # Mapserver or OGR format
STYLEITEM AUTO # OGR driver only (useful for DXF,DWG, format data
etc)
- since STYLEITEM is a LAYER object, are multiple classes possible?
4. Entire STYLE block from Javascript (STYLEITEM
"javascript:///home/user/myscript.js" # absolute path)
5. Style from SLD [URL] reference
(&SLD=http://demo.mapserver.org/ogc-demos/map/sld/sld_line_simple.xml)
You could try #3 (I've never done it but it could work): STYLEITEM
<attribute>
Have a look at teh STYLEITEM at https://mapserver.org/mapfile/layer.html
Best Regards,
Brent Fraser
-------- Original Message --------
> From: "Sven Schroeter via MS4W-Users" <ms4w-users at lists.ms4w.com>
> Sent: Wednesday, March 27, 2019 10:57 AM
> To: MS4W-Users at lists.ms4w.com
> Cc: "Sven Schroeter" <schroeter at netgis.de>
> Subject: [MS4W-Users] dynamic line pattern
>
> Hi,
>
> I have a line Layer and want to change the pattern dynamicly from the
> attribute table.
> Is it possible?
>
>
> e.g. I have this working:
>
> CLASS
> NAME "buslines"
> STYLE
> COLOR [linecolor]
> WIDTH 4
> PATTERN 40 10 END
> END
> END # CLASS
>
>
> and I want to get the pattern from an attribute:
>
>
> CLASS
> NAME "buslines"
> STYLE
> COLOR [linecolor]
> WIDTH 4
> PATTERN [pattern] END
> END
> END # CLASS
>
> but this dont work. Any hint?
>
> Thanks
> Sven
>
> _______________________________________________
> MS4W-Users mailing list
> MS4W-Users at lists.ms4w.com
> https://lists.ms4w.com/mailman/listinfo/ms4w-users
More information about the MS4W-Users
mailing list