[mapserver-users] PHP-Mapscript - clusterObj ?

Chris Green chris.green at ibstv.co.uk
Mon Jun 20 07:02:41 PDT 2011


Hi Tamas

 

Thanks for your comment. My first thought was that it should be available from layerObj, and I spent quite a while trying variations like:

$map = ms_newMapobj("/var/www/vhosts/mysite/httpdocs/test.map");

$layer1=$map->getLayerByName("test1");

$cluster1=$layer1->getClusterByName(“cluster1”);

But unfortunately I couldn’t make anything like that work. Anyone know how this clusterObj works in php-Mapscript?

 

Chris

From: Tamas Szekeres [mailto:szekerest at gmail.com] 
Sent: 20 June 2011 08:41
To: Chris Green
Cc: mapserver-users at lists.osgeo.org
Subject: Re: [mapserver-users] PHP-Mapscript - clusterObj ?

 

Chris,

clusterObj should not be constructed from scratch, it is an existing member of layerObj. Not sure how is that working in PHP, however.


Best regards,

Tamas





2011/6/20 Chris Green <chris.green at ibstv.co.uk>

Hi list

 

I am running Mapserver 6.0 under Ubuntu 10.04 with PHP-Mapscript and I have been trying to get clustering to work with Mapscript. Actually it works fine when using a mapfile very similar to the ‘Clustering Railway Stations’ example given in the 6.0 documentation if I use the mapfile to generate a WMS layer without Mapscript. However using the same mapfile I can’t get the clustered output to appear with Mapscript when I try the usual construction along the lines of:

 

$map = ms_newMapobj("/var/www/vhosts/mysite/httpdocs/test.map");

$layer1=$map->getLayerByName("test1");

..

..

..

$image=$map->draw();

$image_url=$image->saveWebImage();

 

This structure works on a non-clustered layer in the same mapfile. I can see in the documentation for MS RFC 69 that the idea is to use a new Mapscript object called clusterObj, but I can’t find any information on how to construct a clusterObj and several hours of trial and error yesterday didn’t get me very far. Can someone tell me how I should set up and use clusterObj?

 

 

Chris  

 

 


_______________________________________________
mapserver-users mailing list
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/20110620/2fa11e9a/attachment.htm>


More information about the MapServer-users mailing list