Hi Jeff I'd be happy to go down that path and document examples along the way as you suggest, but I have a feeling that there may be something about the way that the cluster algorithm works that makes it incompatible with the regex filtering that I would also like to do. If that turns out to be the case then I will need to restructure the way that I access my data, in effect to filter it myself before presenting it to the layer to be displayed with clustering. This will be quite a task - before I decide which way to go on this is there someone out there who can confirm (at least in principle) that it should be possible to simultaneously filter and cluster the data in a layer if I can only find the right mapscript syntax to make it happen?
Chris -----Original Message----- From: [email protected] [mailto:[email protected]] On Behalf Of Jeff McKenna Sent: 20 June 2011 22:30 To: [email protected] Subject: Re: [mapserver-users] PHP-Mapscript - clusterObj ? Hi Chris, Let's plan this for our next phase of attack. As you travel down this cluster-php-mapscript path, document your full examples in the MapServer wiki: - login to the wiki (use your osgeo ID, which you can create at http://www.osgeo.org/osgeo_userid) - goto http://trac.osgeo.org/mapserver/wiki/PHPMapScript - create a new page there, in the "Examples" section - add as many examples as you wish for the Cluster object - be sure to add "this was added by [yourname] [email]" - when you are satisfied with that, email the mapserver-dev mailing list - then I will change the CLUSTER example in http://www.mapserver.org/mapfile/cluster.html#php-mapscript-usage to point to your page And you get all the glory! :) thanks! -jeff -- Jeff McKenna MapServer Consulting and Training Services http://www.gatewaygeomatics.com/ On 11-06-20 4:47 PM, Chris Green wrote: > Hi Jeff > > Thanks. Fame at last...! > > However I am still struggling with the combination of clustering and regex > filtering. What I can say for sure is that clustering works if no regex > filter is applied, and filtering works (using a regex filter in the form > "/target/") with no clustering. But I have so far failed to make the two work > together. > > This is where I am currently (which does not work for me): > > $map = ms_newMapobj("/var/www/vhosts/mysite/httpdocs/test.map"); > $layer1=$map->getLayerByName("test1"); > $layer1->cluster; > $layer1->set("filteritem", "attribute 1"); > $layer1->setFilter("/target/"); > > Any ideas? > > > Chris > > > -----Original Message----- > From: [email protected] > [mailto:[email protected]] On Behalf Of Jeff McKenna > Sent: 20 June 2011 20:31 > To: [email protected] > Subject: Re: [mapserver-users] PHP-Mapscript - clusterObj ? > > Hi Chris, > > I've added your PHP MapScript example to the mapfile's CLUSTER page: > http://www.mapserver.org/mapfile/cluster.html > > Thanks! > > -jeff > > > _______________________________________________ mapserver-users mailing list [email protected] http://lists.osgeo.org/mailman/listinfo/mapserver-users _______________________________________________ mapserver-users mailing list [email protected] http://lists.osgeo.org/mailman/listinfo/mapserver-users
