<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40"><head><meta http-equiv=Content-Type content="text/html; charset=us-ascii"><meta name=Generator content="Microsoft Word 12 (filtered medium)"><style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri","sans-serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
span.EmailStyle17
        {mso-style-type:personal-compose;
        font-family:"Calibri","sans-serif";
        color:windowtext;}
.MsoChpDefault
        {mso-style-type:export-only;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:72.0pt 72.0pt 72.0pt 72.0pt;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]--></head><body lang=EN-GB link=blue vlink=purple><div class=WordSection1><p class=MsoNormal>Hi list<o:p></o:p></p><p class=MsoNormal><o:p>&nbsp;</o:p></p><p class=MsoNormal>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 &#8216;Clustering Railway Stations&#8217; 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&#8217;t get the clustered output to appear with Mapscript when I try the usual construction along the lines of:<o:p></o:p></p><p class=MsoNormal><span style='font-size:14.0pt'><o:p>&nbsp;</o:p></span></p><p class=MsoNormal style='text-autospace:none'>$map = ms_newMapobj(&quot;/var/www/vhosts/mysite/httpdocs/test.map&quot;);<o:p></o:p></p><p class=MsoNormal style='text-autospace:none'>$layer1=$map-&gt;getLayerByName(&quot;test1&quot;);<o:p></o:p></p><p class=MsoNormal style='text-autospace:none'>..<o:p></o:p></p><p class=MsoNormal style='text-autospace:none'>..<o:p></o:p></p><p class=MsoNormal style='text-autospace:none'>..<o:p></o:p></p><p class=MsoNormal style='text-autospace:none'>$image=$map-&gt;draw();<o:p></o:p></p><p class=MsoNormal style='text-autospace:none'>$image_url=$image-&gt;saveWebImage();<o:p></o:p></p><p class=MsoNormal><o:p>&nbsp;</o:p></p><p class=MsoNormal>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&#8217;t find any information on how to construct a clusterObj and several hours of trial and error yesterday didn&#8217;t get me very far. Can someone tell me how I should set up and use clusterObj?<o:p></o:p></p><p class=MsoNormal><o:p>&nbsp;</o:p></p><p class=MsoNormal><o:p>&nbsp;</o:p></p><p class=MsoNormal>Chris &nbsp;<o:p></o:p></p><p class=MsoNormal><o:p>&nbsp;</o:p></p><p class=MsoNormal><o:p>&nbsp;</o:p></p></div></body></html>