[mapserver-dev] testing CLUSTER object

Tamas Szekeres szekerest at gmail.com
Thu May 5 09:11:56 EDT 2011


2011/5/5 Jeff McKenna <jmckenna at gatewaygeomatics.com>

>
> Hmm, yes I think this is related to a point I made to the mapserver-dev
> list when I initially tested the cluster object (see below).  I could only
> ever receive one result when querying a cluster object (I assumed all
> features inside the cluster object would be returned by a query). Hopefully
> this generates some discussion on the mapserver-dev list.
>
>
Hi Jeff,

The term "all features inside the cluster object would be returned by a
query" would imply that the cluster provider should behave differently
according to the query and the drawing operations. Currently there's no
reliable mechanism to identify a purpose of a particular feature access so
this cannot be implemented in this form. We have been talking about (with
Steve) to use the query object of the map for this purpose, however it is
not handled consistently throughout MapServer (for example in drawQuery) so
it cannot be utilized here.

What I have already mentioned to workaround the problem, is to use an union
layer (with cluster setting) to provide the drawing and use the source
layer(s) to provide the query results, something like:

LAYER  # non queryable, might not be exposed in WMS
    NAME "cluster-layer"
    CONNECTIONTYPE UNION
    CONNECTION "source-layer"
    STATUS default
    CLUSTER
        REGION "ellipse"
        MAXDISTANCE 40
    END
    CLASS
        ....
    END
END

LAYER
    NAME "source-layer"
    TEMPLATE "query"  #queryable
    CONNECTIONTYPE OGR
    CONNECTION ...
    STATUS default
    CLASS
        STATUS off  # do not draw this layer but expose in legend
        ...
    END
END


Best regards,

Tamas
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/mapserver-dev/attachments/20110505/aa0c841a/attachment-0001.html


More information about the mapserver-dev mailing list