Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] TripsLayers has strange artifacts if curves are almost 180 degrees #9332

Open
7 tasks
Fabioni opened this issue Jan 6, 2025 · 0 comments
Open
7 tasks
Labels

Comments

@Fabioni
Copy link
Contributor

Fabioni commented Jan 6, 2025

Description

If the curve of waypoints is so sharp that it is almost 180 degrees, the curves from jointRounded create weird artifacts. The artifacts flicker and change by zooming or panning the map.

Screenshot 2025-01-06 at 15 32 05
deckglissuetripslayer.mp4

Flavors

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

Expected Behavior

No artifacts, just a rounded curve

Steps to Reproduce

const { DeckGL, TripsLayer } = deck;

const layer = new TripsLayer({
  id: "TripsLayer",
  data: [
    {
      waypoints: [
        {
          coordinates: [-122.4003, 37.7003],
        },
        {
          coordinates: [0,0], // just a point far away to simulate sharp curves
        },
        {
          coordinates: [-122.4002, 37.7002],
        },
        {
          coordinates: [0,0], // point far away
        },
        {
          coordinates: [-122.4001, 37.7001],
        },
        {
          coordinates: [0,0], // point far away
        },
        {
          coordinates: [-122.4000, 37.7000],
        },
      ]
    }
  ],

  getPath: (d) => d.waypoints.map((p) => p.coordinates),
  jointRounded: true,
  widthMinPixels: 40,
});

new DeckGL({
  mapStyle: "https://basemaps.cartocdn.com/gl/positron-gl-style/style.json",
  initialViewState: {
    longitude: -122.4,
    latitude: 37.7,
    zoom: 19,
    maxZoom: 20,
    pitch: 0,
    bearing: 0
  },
  controller: true,

  layers: [layer]
});

Environment

Logs

No response

@Fabioni Fabioni added the bug label Jan 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant