[mapserver-users] Remove CLUSTER definition

Moretti Edmar edmar.moretti at gmail.com
Tue Feb 16 05:09:03 PST 2016


I solved the problem of CLUSTER removal with the following code :

$layer->updatefromstring("LAYER CLUSTER END END");

Here is an example of the operation :

https://youtu.be/UtlvTWyoH2M

2016-02-03 23:14 GMT-02:00 Moretti Edmar <edmar.moretti at gmail.com>:

> I used your suggestion but did not work as expected.
> I used PHP to create the cluster on a Layer. After creation, the mapfile
> contains the code:
>
>     CLUSTER
>       MAXDISTANCE 5
>       REGION "rectangle"
>       GROUP ('[TIPO]')
>     END # CLUSTER
>
> After applying your sugestion, the mapfile looks like
>
>     CLUSTER
>       REGION ""
>     END # CLUSTER
>
> but the Cluster still remains, now with the default values
>
> My PHP to remove cluster:
>
> $cluster->setFilter(NULL);
> $cluster->setGroup(NULL);
> $cluster->maxdistance = 10;
> $cluster->region = NULL;
>
> Any idea?
>
> Thank you for your help.
>
> 2016-02-02 13:30 GMT-02:00 Tamas Szekeres <szekerest at gmail.com>:
>
>> Looks like you need to set the following default parameters to prevent
>> from writing to the mapfile:
>>
>>       cluster->maxdistance == 10 &&
>>       cluster->buffer == 0.0 &&
>>       cluster->region == NULL &&
>>       cluster->group.string == NULL &&
>>       cluster->filter.string == NULL
>>
>> Best regards,
>>
>> Tamas
>>
>>
>>
>> 2016-02-02 13:48 GMT+01:00 Moretti Edmar <edmar.moretti at gmail.com>:
>>
>>> How do I remove the CLUSTER definition of a mapfile using PHP-MapScript?
>>> I try to use the code below, but without success
>>>
>>> $cluster = $layer->cluster;
>>> $cluster->updateFromString("GROUP END");
>>>
>>> --
>>> Para tirar dúvidas sobre o i3Geo utilize a lista:
>>> https://lists.osgeo.org/cgi-bin/mailman/listinfo/i3geo
>>>
>>> Edmar Moretti
>>> http://www.edmarmoretti.com.br
>>> Skype: edmar.moretti
>>> gTalk: edmar.moretti
>>>
>>> _______________________________________________
>>> mapserver-users mailing list
>>> mapserver-users at lists.osgeo.org
>>> http://lists.osgeo.org/mailman/listinfo/mapserver-users
>>>
>>
>>
>
>
> --
> Para tirar dúvidas sobre o i3Geo utilize a lista:
> https://lists.osgeo.org/cgi-bin/mailman/listinfo/i3geo
>
> Edmar Moretti
> http://www.edmarmoretti.com.br
> Skype: edmar.moretti
> gTalk: edmar.moretti
>



-- 
Para tirar dúvidas sobre o i3Geo utilize a lista:
https://lists.osgeo.org/cgi-bin/mailman/listinfo/i3geo

Edmar Moretti
http://www.edmarmoretti.com.br
Skype: edmar.moretti
gTalk: edmar.moretti
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20160216/1cf19572/attachment.htm>


More information about the MapServer-users mailing list