Skip to content
This repository has been archived by the owner on Aug 8, 2023. It is now read-only.

Symbol Layer with buffer has 'avoid-edges' behavior #15949

Closed
riastrad opened this issue Nov 20, 2019 · 4 comments
Closed

Symbol Layer with buffer has 'avoid-edges' behavior #15949

riastrad opened this issue Nov 20, 2019 · 4 comments
Labels
bug Core The cross-platform C++ core, aka mbgl Node.js node-mapbox-gl-native

Comments

@riastrad
Copy link
Contributor

Platform: Node.js
Mapbox SDK version: v5.0.2

When a symbol layer uses text-variable-anchor but the underlying data has a sizeable buffer value, I would expect it to be rendered even when it crosses a tile boundary. However, when text-variable-anchor is render treats it as if it also had avoid-edges=true set (which it does not). This results in important poi icons disappearing if they cross a tile boundary.

Steps to trigger behavior

  1. Create a style that uses text-variable-anchor for a symbol layer
  2. Render style in "tile" mode
  3. Note the absence of the icon & text label (compared to any other rendering mode)

Expected behavior

When the tiles are rendered client-side:

image

Actual behavior

When the tiles are rendered server-side using Tile mode:
image

cc/ @mapbox/gl-core @mapbox/static-apis

@riastrad riastrad added bug Node.js node-mapbox-gl-native Core The cross-platform C++ core, aka mbgl labels Nov 20, 2019
@chloekraw
Copy link
Contributor

chloekraw commented Nov 21, 2019

@riastrad this behavior was intentionally added in #15828, under the premise that "unpredictable labels" should have avoid edges automatically enabled, and a label that can be placed in multiple positions qualifies as an "unpredictable label." Is the suggested fix to resolve this ticket to revert #15828?

EDIT: I linked to the wrong pr. I meant #15854

@kkaefer
Copy link
Contributor

kkaefer commented Nov 21, 2019

I think we only need this when placement mode is MapMode::Tile
/cc @ansis

@chloekraw
Copy link
Contributor

Oh, I meant to link to this pr instead: #15854

@riastrad
Copy link
Contributor Author

riastrad commented May 6, 2020

This is no longer the case 👍

@riastrad riastrad closed this as completed May 6, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Core The cross-platform C++ core, aka mbgl Node.js node-mapbox-gl-native
Projects
None yet
Development

No branches or pull requests

3 participants