@Fred, for vector layers it is indeed as straightforward as you described.
It gets more interesting with vector tile layers, where tiles do not know
about each other. That would need to change - label points would need to be
collected for the whole viewport, so a label engine can make decisions for
the whole visible map.

Andreas.

On Mon, Apr 3, 2017 at 4:04 PM, Frédéric Junod via OpenLayers Dev <
openlayers-dev+apn2wqfjdcwggszdyt_yyqt9eygxji54p9e8aioqmtzfhq...@googlegroups.com
> wrote:

> Hello Oliver,
>
> I think it wouldn't be hard to implement this in OpenLayers:
>  - add a rbush in ol.render.canvas.Replay
>  - compute the text bounding box (in ol.render.canvas.Replay.
> prototype.replay_)
>  - if this bounding box collides an other item; don't draw the text.
>  - otherwise draw the text and add the bounding box in the rbush.
>
> Do I miss something ?
>
> Regards,
>
> fredj
>
> On Monday, April 3, 2017 at 2:57:00 PM UTC+2, Bart van den Eijnden wrote:
>>
>> Hey Olivier,
>>
>> are you aware of Labelgun already?
>>
>> https://github.com/Geovation/labelgun
>>
>> Best regards,
>>
>> Bart
>> On 03-04-17 13:42, Olivier Terral via OpenLayers Dev wrote:
>>
>> Hi all,
>>
>>
>> We are currently, at swisstopo, investigating how could we improve the
>> display of labels with vector tiles.
>> One of the best feature of competitor like MapboxGLJS  or TangramJS is
>> the label collision detection  [1] .
>>
>>
>> Does it something we could implement in OL ?
>>
>> We would be glad to have your opinion about this.
>>
>>
>>
>> [1]https://www.mapbox.com/blog/label-collisions/
>> --
>> You received this message because you are subscribed to the Google Groups
>> "OpenLayers Dev" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to openlayers-de...@googlegroups.com.
>> To post to this group, send email to openlay...@googlegroups.com.
>> Visit this group at https://groups.google.com/group/openlayers-dev.
>> To view this discussion on the web visit https://groups.google.com/d/ms
>> gid/openlayers-dev/16f86667-245a-475f-b3ca-b5076955cf3f%40go
>> oglegroups.com
>> <https://groups.google.com/d/msgid/openlayers-dev/16f86667-245a-475f-b3ca-b5076955cf3f%40googlegroups.com?utm_medium=email&utm_source=footer>
>> .
>> For more options, visit https://groups.google.com/d/optout.
>>
>>
>> --
>> Bart van den Eijnden
>> JavaScript developer | Boundless
>> bar...@boundlessgeo.com
>>
> --
> You received this message because you are subscribed to the Google Groups
> "OpenLayers Dev" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to openlayers-dev+unsubscr...@googlegroups.com.
> To post to this group, send email to openlayers-dev@googlegroups.com.
> Visit this group at https://groups.google.com/group/openlayers-dev.
> To view this discussion on the web visit https://groups.google.com/d/
> msgid/openlayers-dev/b04e23bf-8446-43e5-9e74-60a48e993344%
> 40googlegroups.com
> <https://groups.google.com/d/msgid/openlayers-dev/b04e23bf-8446-43e5-9e74-60a48e993344%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"OpenLayers Dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to openlayers-dev+unsubscr...@googlegroups.com.
To post to this group, send email to openlayers-dev@googlegroups.com.
Visit this group at https://groups.google.com/group/openlayers-dev.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/openlayers-dev/CAOiJ94g44NQ%3DLyeGkALvdVzL-RE6AzmVyKbM7d2w31VVZya3Tg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
  • [openlayers-dev]... Olivier Terral via OpenLayers Dev
    • Re: [openla... OpenLayers Dev on behalf of Bart van den Eijnden
      • Re: [op... Frédéric Junod via OpenLayers Dev
        • Re:... OpenLayers Dev on behalf of Andreas Hocevar
          • ... Olivier Terral via OpenLayers Dev
            • ... OpenLayers Dev on behalf of Emmanuel Belo - Camptocamp SA

Reply via email to