[mapserver-users] PHP-Mapscript - clusterObj ?

Jeff McKenna jmckenna at gatewaygeomatics.com
Mon Jun 20 12:30:57 PDT 2011


Hi Chris,

I've added your PHP MapScript example to the mapfile's CLUSTER page: 
http://www.mapserver.org/mapfile/cluster.html

Thanks!

-jeff



-- 
Jeff McKenna
MapServer Consulting and Training Services
http://www.gatewaygeomatics.com/



On 11-06-20 12:58 PM, Chris Green wrote:
> Daniel
>
>
> This works....
>
> $map = ms_newMapobj("/var/www/vhosts/mysite/httpdocs/test.map");
> $layer1=$map->getLayerByName("test1");
> $layer1->cluster;
>
>
> Thanks very much for the help!
>
>
> Chris
>
>
> -----Original Message-----
> From: mapserver-users-bounces at lists.osgeo.org [mailto:mapserver-users-bounces at lists.osgeo.org] On Behalf Of Daniel Morissette
> Sent: 20 June 2011 15:26
> To: mapserver-users at lists.osgeo.org
> Subject: Re: [mapserver-users] PHP-Mapscript - clusterObj ?
>
> On 11-06-20 10:22 AM, Daniel Morissette wrote:
>> On 11-06-20 10:02 AM, Chris Green wrote:
>>> 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?
>>>
>>
>>
>> AFAIK there is only one cluster object per layer, and according to the
>> PHP MapScript source, you should be able to reach it as
>> $layer1->cluster. The same methods as in SWIG MapScript seem to be
>> implemented for the clusterObj in PHP MapScript. If that doesn't work
>> then please let us know and we'll look deeper.
>>
>
> ... and I see that clusterObj is documented in:
>
>     http://mapserver.org/mapscript/php/index.html#clusterobj
>
> ... and the ref to the clusterObj in the layerObj is listed in:
>
>     http://mapserver.org/mapscript/php/index.html#layerobj
>





More information about the MapServer-users mailing list