[mapserver-users] How avoid overlapping of label between two distinct layers

Lime, Steve D (MNIT) Steve.Lime at state.mn.us
Tue Aug 9 05:31:21 PDT 2016


Are you setting a fixed position (e.g. CC)? You can try AUTO and MapServer will try different placements to avoid collisions. --Steve 
________________________________________
From: mapserver-users [mapserver-users-bounces at lists.osgeo.org] on behalf of Andrea Peri [aperi2007 at gmail.com]
Sent: Tuesday, August 09, 2016 7:28 AM
To: thomas bonfort
Cc: mapserver-users at lists.osgeo.org
Subject: Re: [mapserver-users] How avoid overlapping of label between two distinct layers

HI Thomas,
Yes, I put the FORCE=true.
But setting
FORCE=false,
mapserver will remove the label overlapping.

http://www502.regione.toscana.it/ows2/com.rt.wms.RTmap/wms?map=owscacciapesca&version=1.3.0&TRANSPARENT=true&LAYERS=rt_cacciapesca.sottoambito_atc_2015.rt%2Crt_cacciapesca.atc_2015.rt&STYLES=default%2Cdefault&CRS=EPSG%3A25832&SERVICE=WMS&REQUEST=GetMap&FORMAT=image%2Fpng&BBOX=672896.00367533,4847223.6202292,680026.94491189,4849534.2528872&WIDTH=824&HEIGHT=267


2016-08-09 14:10 GMT+02:00 thomas bonfort <thomas.bonfort at gmail.com>:
> Mapserver will prevent label coliding by default unless you force it
> to do otherwise. I suspect that in your case one of the layers is
> either not using a labelcache, set to FORCE, or is a client WMS layer
> for which your own mapserver has no control/knowledge of label
> positions.
>
> --
> thomas
>
> On 9 August 2016 at 14:06, Andrea Peri <aperi2007 at gmail.com> wrote:
>> Hi,
>> I need to avoid the overlapping of labels between two layers.
>>
>> To do this I try to set the BUFFER option in both layers, but I see it
>> seem don't work as I expected.
>> Perhaps the buffer is working only for label of same layers ?
>>
>> This is a sample of actual overlapping:
>>
>> http://www502.regione.toscana.it/ows2/com.rt.wms.RTmap/wms?map=owscacciapesca&version=1.3.0&map_resolution=91&TRANSPARENT=true&LAYERS=rt_cacciapesca.sottoambito_atc_2015.rt%2Crt_cacciapesca.atc_2015.rt&STYLES=default%2Cdefault&CRS=EPSG%3A25832&SERVICE=WMS&REQUEST=GetMap&FORMAT=image%2Fpng&BBOX=672896.00367533,4847223.6202292,680026.94491189,4849534.2528872&WIDTH=824&HEIGHT=267
>>
>> In both layers I set:
>>     LABELCACHE on
>>    ...
>>   LAYER
>>    ...
>>     CLASS
>>      .....
>>       LABEL
>>         TEXT 'Sottoambito [sottoambit]'
>>         TYPE TRUETYPE
>>         BUFFER 5
>>        ....
>>
>> Thx.
>>
>>
>> --
>> -----------------
>> Andrea Peri
>> . . . . . . . . .
>> qwerty àèìòù
>> -----------------
>> _______________________________________________
>> mapserver-users mailing list
>> mapserver-users at lists.osgeo.org
>> http://lists.osgeo.org/mailman/listinfo/mapserver-users



--
-----------------
Andrea Peri
. . . . . . . . .
qwerty àèìòù
-----------------
_______________________________________________
mapserver-users mailing list
mapserver-users at lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


More information about the mapserver-users mailing list