Skip to content

[Bug] PathLayer segment colors misaligned when wrapLongitude: true #9782

@kahole

Description

@kahole

Description

When enabling wrapLongitude on PathLayer the coloring of segments shift.
Even in paths not crossing the anti-meridian.

With wrapping enabled the lines cross the anti-meridian correctly. However, I color the path segments based on attributes from data aligned with the positions I provide through getPath.
After applying wrapLongitude these attributes do not align with the path at all, leading to the path coloring not matching the originating data at all, even on paths that never cross the anti-meridian.

Seems to get worse the longer the path is.

Image of path with wrapLongitude: false

Image

Image of path with wrapLongitude: true

Image

Flavors

  • Script tag
  • React
  • Python/Jupyter notebook
  • MapboxOverlay
  • GoogleMapsOverlay
  • CARTO
  • ArcGIS

Expected Behavior

Same coloring of the segments independent of if wrapLongitude is enabled or not.

Steps to Reproduce

Minimal reproduction CodePen: https://codepen.io/KaHole/pen/ZYQEGrK
Flip const WRAP_LONGITUDE_ENABLED = true; to see the difference

Environment

  • Framework version: 9.1.14
  • Browser: Edge 140.0.3485.66 (Official build) (64-bit)
  • OS: Fedora 42

Logs

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions