Skip to content

When ignoring collision boxes outside of visible screen map panning can get ugly #6489

Description

@watbywbarif

0.44.2 but then reproduced this with official streets-v9 and older 0.43.0:

Steps to Trigger Behavior

  1. Use https://api.mapbox.com/styles/v1/mapbox/streets-v9.html?title=true&access_token=pk.eyJ1IjoibWFwYm94IiwiYSI6ImNpejY4M29iazA2Z2gycXA4N2pmbDZmangifQ.-g_vE53SD2WrJ6tFX7QHmA#12.1/37.85635/-122.31402
  2. Pan map up and down between Oakland and Albany.
  3. You can get too many labels drawn that quickly disappear in fraction of second, but it looks ugly

Expected Behavior

I will not post images, as number of labels thins out obviously when tried.

Actual Behavior

image
image

I have achieved even worse results with my own data and style:
image

I guess this is example is overblown because data in .mvt contains too much data for that zoom level, but as this can be reproduced in streets-v9 i am posting it.

When used map.showCollisionBoxes = true it seams to me that collisions are ignored while labels are outside of visible rectangle, but then when panning occurs labels are drawn before collisions are reevaluated.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions