deck.gl icon indicating copy to clipboard operation
deck.gl copied to clipboard

[Bug] PathStyleExtension getOffset not working for PathLayer with vertical path (billboard: true)

Open joelugh opened this issue 1 year ago • 1 comments

Description

The sides of offset paths get aliased at weird angles (vertical path)

image

Flavors

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

Expected Behavior

Sides should all be in line like this (horizontal path - no altitude difference)

image

Steps to Reproduce

  • PathLayer
  • vertical path (same long, lat, but different altitude)
  • billboard: true (per https://github.com/visgl/deck.gl/issues/2302)
  • PathStyleExtension with offset true
  • getOffset of 1 applied to vertical path

https://codepen.io/joelugh/pen/YzgKmGj

Environment

  • Framework version: https://unpkg.com/deck.gl@latest/dist.min.js AND 8.8.27
  • Browser: Chrome
  • OS: Mac

Logs

No response

joelugh avatar Dec 21 '23 11:12 joelugh

Context is that I'm trying to create little bar charts at multiple points on a map.

I have achieved this using a ColumnLayer/PathLayer by creating the bars for each chart at adjacent lat/long coordinates.

But what I would really like is for it to be a billboard style (hence why I think I need to use offset).

I thought I might also be able to achieve this with IconLayer's billboarding and offset, by using a rectangular icon and then transforming it's height -- but I haven't been able to find any way to dynamically transformer the icons height independent of its width.

joelugh avatar Dec 21 '23 11:12 joelugh