[mapserver-dev] Dynamic Cluster Labels
Conor McCauley
conor.mccauley at mapflow.com
Wed Jan 25 07:47:50 EST 2012
Hi all,
I have a quick query regarding labels on cluster items and how these can be
customized based on the attributes returned.
Currently I have clustering functioning where the label of the cluster is
the feature count, that's fine. I now want to change that label to be a sum
of attributes for all each features in that cluster. I have a "total_si"
number value being selected from my datasource, I want the cluster label to
be the sum of total_si for all features in a cluster.
I have looked into the GROUP and FILTER options but they do not seem to fit
the bill for what I want to achieve. Can anybody point me in the right
direction?
Please see my mapfile snippit below. Much appreciated.
Regards,
Conor.
LAYER
NAME cluster_by_tsi
TYPE POINT
CLUSTER
BUFFER 30
MAXDISTANCE 60
REGION "ellipse"
END
DUMP true
STATUS ON
CONNECTION 'XXXXXXXXXXXXXXXXX'
CONNECTIONTYPE oraclespatial
DATA "GEOM FROM (select geom,total_si from EXPOSURE_DEMO WHERE
CLIENT_ID = '%client%' and TYPE = 'QUOTE') USING SRID 4326"
PROCESSING "CLOSE_CONNECTION=DEFER"
PROJECTION
"init=epsg:4326"
END
METADATA
'client_validation_pattern' '^[a-zA-Z0-9_]*$'
'default_client' 'DEMO'
END
LABELITEM "Cluster:FeatureCount" >> I want this to be sum of total_si
for each cluster
CLASSITEM "Cluster:FeatureCount"
SIZEUNITS pixels
...
...
-end-
This email and its content/attachments are covered by Mapflow's email disclaimer, please see www.mapflow.com/disclaimer
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/mapserver-dev/attachments/20120125/8970d7c0/attachment-0001.html
More information about the mapserver-dev
mailing list