[mapserver-users] Expressions on Cluster Objects
Fawcett, David (MPCA)
David.Fawcett at state.mn.us
Wed Oct 12 14:05:22 PDT 2011
Thanks Tamas.
Here is the layer snippet:
LAYER
NAME "sites"
STATUS default
DATA 'sites'
TYPE POINT
CLUSTER
MAXDISTANCE 50
REGION "ellipse"
END
LABELITEM "Cluster:FeatureCount"
CLASS
NAME "small"
EXPRESSION ("[Cluster:FeatureCount]" < "11")
STYLE
COLOR 255 0 0
SYMBOL "circle"
SIZE 20
END
LABEL
FONT "arial"
TYPE TRUETYPE
SIZE 8
COLOR 255 255 255
END
END
CLASS
NAME "medium"
EXPRESSION ("[Cluster:FeatureCount]" < "100")
STYLE
COLOR 255 0 0
SYMBOL "circle"
SIZE 35
END
LABEL
FONT "arial"
TYPE TRUETYPE
SIZE 8
COLOR 255 255 255
END
END
CLASS
NAME "large"
STYLE
COLOR 255 0 0
SYMBOL "circle"
SIZE 50
END
LABEL
FONT "arial"
TYPE TRUETYPE
SIZE 8
COLOR 255 255 255
END
END
END
From: mapserver-users-bounces at lists.osgeo.org [mailto:mapserver-users-bounces at lists.osgeo.org] On Behalf Of Tamas Szekeres
Sent: Wednesday, October 12, 2011 2:53 PM
To: Fawcett, David (MPCA)
Cc: mapserver-users at lists.osgeo.org
Subject: Re: [mapserver-users] Expressions on Cluster Objects
David,
I think that option should indeed work in the class expressions. Do you have a more complete example (map file)?
Best regards,
Tamas
2011/10/12 Fawcett, David (MPCA) <David.Fawcett at state.mn.us<mailto:David.Fawcett at state.mn.us>>
I have been playing around with the new cluster functionality a little bit.
I am looking for way to classify the clusters based on their feature counts. E.g. larger circles for clusters of > 10 features and even larger circles for clusters of > 100 features.
Because Cluster:FeatureCount returns a string, the below expression can evaluate to True for values like "109"
("[Cluster:FeatureCount]" < "11")
Does anyone have any suggestions?
Maybe I am just misusing Clusters...
Thanks,
David.
_______________________________________________
mapserver-users mailing list
mapserver-users at lists.osgeo.org<mailto:mapserver-users at lists.osgeo.org>
http://lists.osgeo.org/mailman/listinfo/mapserver-users
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20111012/b360e969/attachment.htm>
More information about the MapServer-users
mailing list