-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
Add the isPointOnSurface
method
#12695
Conversation
const coord = this.pointCoordinate(p); | ||
return coord.y >= 0 && coord.y <= 1; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This check works well for the Mercator projection, but I need to figure out how to properly check this for alternate projections.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is there a way currently to use this method properly on globe projection?
Co-authored-by: Volodymyr Agafonkin <[email protected]>
Also needs a fix to the unit tests. |
Adds the
isPointOnSurface
map method to determine if the given point is located on a visible map surface.Launch Checklist
mapbox-gl-js
changelog:<changelog>Add the "isPointOnSurface" map method to determine if the given point is located on a visible map surface.</changelog>