[mapserver-users] getfeatureinfo on clustered layer

Lassche, M.R. m.r.lassche at vu.nl
Wed May 21 05:25:03 PDT 2014


Hi all,

I try to get featureinfo on a layer which is clustered, What I want is to see all features in the cluster.

Here is the layer definition
LAYER
    METADATA
     WMS_TITLE "herkomst_lokaties"
     WMS_ABSTRACT "herkomst_lokaties"
     WMS_SRS "EPSG:28992"
     WMS_EXTENT "0 300000 300000 650000"
     WMS_ENABLE_REQUEST "*"
    gml_include_items "all"
      wms_include_items "all"
    END
    PROJECTION
     "init=epsg:28992"
    END
    NAME "rza_herkomst_lokaties"
    CONNECTION "xxx"
    CONNECTIONTYPE "xxx"
    DATA "geom from rza.vw_show_herkomst_lokaties USING UNIQUE id"
    STATUS ON
    DUMP TRUE
    TEMPLATE "templates/rza/rza_herkomst_lokaties.html"
    TOLERANCE 20
    TOLERANCEUNITS PIXELS
    TYPE POINT
    UNITS PIXELS
    SIZEUNITS PIXELS
    SYMBOLSCALEDENOM 100000
    CLUSTER
     MAXDISTANCE 20
     REGION "ellipse"
    END
    PROCESSING "CLUSTER_GET_ALL_SHAPES=ON"
CLASSITEM "Cluster:FeatureCount"
    CLASS
      NAME "< 5"
      EXPRESSION ([Cluster:FeatureCount]< 5)
      STYLE
        SYMBOL 'circle'
        COLOR 255 0 0
        MINSIZE 7
        MAXSIZE 15
        SIZE  10
      END
    END
    CLASS
      NAME "5 - 9"
      EXPRESSION ([Cluster:FeatureCount] >= 5 AND [Cluster:FeatureCount] < 10)
      STYLE
        SYMBOL 'circle'
        COLOR 255 0 0
        MINSIZE 12
        MAXSIZE 20
        SIZE  15
      END
    END
    CLASS
      NAME ">= 10"
      EXPRESSION ([Cluster:FeatureCount] >= 9 )
      STYLE
        SYMBOL 'circle'
        COLOR 255 0 0
        MINSIZE 17
        MAXSIZE 25
        SIZE  20
      END
    END
  END

The layer is displayed fine with correct clusters.

Here is my tenplate file
<!-- MapServer Template -->
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/transitional.dtd">
<html>
    <head>
        <title>MapServer Template Sample</title>
    </head>
  <body>
    Aantal: <b>[Cluster:FeatureCount]</b></br>
  </body>
</html>

When doing the request with featurecount=1 I get the number of elements. With a higher feature count Cluster:FeatureCount returns nothing.
All other fields are always empty.

How can I get all features in a cluster?

Thanks in advance
Ronnie




-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20140521/a21f3223/attachment.htm>


More information about the MapServer-users mailing list