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

Change marker-visibility logic from coordinate comparison to depth-buffer check #1134

Closed
prozessor13 opened this issue Mar 30, 2022 · 5 comments · Fixed by #3431
Closed

Change marker-visibility logic from coordinate comparison to depth-buffer check #1134

prozessor13 opened this issue Mar 30, 2022 · 5 comments · Fixed by #3431
Assignees
Labels
💰 bounty S Small Bounty, USD 100 enhancement New feature or request PR is more than welcomed Extra attention is needed Terrain 3D

Comments

@prozessor13
Copy link
Collaborator

In marker.ts the visibility check of a marker is done via:

  • get the screen-coordinate of the marker anchor
  • get the lnglat-coordinate in terrain for the marker screen-pixel
  • check if marker-lnglat & screen-lnglat are equal
  • if yes show, else hide the marker

this implementation is from a state before i implemented the depth-framebuffer. So this needs to be changed to the depth-buffer check as well. In my opinion a minor-task.

@prozessor13 prozessor13 mentioned this issue Mar 30, 2022
1 task
@HarelM
Copy link
Member

HarelM commented Apr 7, 2022

There's another question here related getBounds - in case of pitch > 60 this might return an area that is way too big, wouldn't it?
Maybe the marker logic can use this method to check for visibility, I.e. If the marker is within the map bounds, if this function is relatively accurate it can be very useful.

@HarelM
Copy link
Member

HarelM commented Mar 4, 2023

Assigned S bounty.
Link to parent Bounty: maplibre/maplibre#189

@SnailBones
Copy link
Contributor

@HarelM I'm interested in this too! Seems very related to #2870, I'm hoping the switch can solve that issue.

@HarelM
Copy link
Member

HarelM commented Dec 1, 2023

Yes, all these marker bugs are related to some extent, I believe.
Assigning to you.

@SnailBones
Copy link
Contributor

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
💰 bounty S Small Bounty, USD 100 enhancement New feature or request PR is more than welcomed Extra attention is needed Terrain 3D
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants