Producing dynamic classes within a layer

David Shorthouse dps1 at UALBERTA.CA
Sun Oct 9 17:22:10 PDT 2005


>>> filling in
>>> individual States or Provinces with one colour while the 
>>remaining States
>>> or Provinces do not receive the fill colour. These select States or
>>> Provinces must be chosen via a SQL Server query.
>>
>>Hi David,
>>If I understand correctly what you need, all you want is to 
>>have multiple 
>>CLASS sections, asper the p. 161 example here:
>>http://examples.oreilly.com/webmapping/
>>
>>FYI - to all others, most of the map file code examples from 
>>my book (some 
>>still remaining) are on that website.
>>
>>Hope that helps.
>>Tyler
>
>This is certainly getting closer, but let me see if I 
>understand this. The
>mapfile you pointed me to above looks like it has an 
>Expression associated
>with the 'Bulgaria' class as:
>
>CLASS
>	EXPRESSION ( ' [NAME] ' ne 'Bulgaria' )
>	STYLE
>		OUTLINECOLOR 100 100 100
>		COLOR 200 200 200
>	END
>END
>
>Whereby I assume the [NAME] gets pulled from the URL such that 
>'Bulgaria'
>may or may not receive that color depending on what's in the 
>URL. What I
>want to do is fill [NAME] from a recordset obtained from SQL 
>Server. At the
>moment, I have a series of Classes associated with my 
>State/Province layer.
>So, does this mean all I have to do is add expressions as you 
>showed like
>[NAME1], [NAME2], ....., [NAMEx] for all the State/Province classes and
>somehow figure out how to fill these from a SQL Server recordset?

OK, now I see that 'ne' above means not equal...my mistake. But, I think I
can phrase my question more clearly now that I see what you have here. Can
one use ORG to populate expressions associated with classes in a manner
similar to what you can do with point data?

Dave



More information about the MapServer-users mailing list