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

Fix projectPosition in CARTESIAN coordinate system #4335

Merged
merged 1 commit into from
Mar 3, 2020

Conversation

Pessimistress
Copy link
Collaborator

The CPU projectPosition to GPU project_position parity was broken when using CARTESIAN coordinate system with Web Mercator projection (#4140).

Change List

  • projectPosition and getUniformsFromViewport now share the same logic
  • Additional unit tests

@coveralls
Copy link

Coverage Status

Coverage decreased (-2.5%) to 80.246% when pulling 15d8308 on x/project-fix into 296e117 on master.


if (offsetMode) {
const positionCommonSpace = viewport.projectPosition(
geospatialOrigin || shaderCoordinateOrigin
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Might be missing a usage, but could this be simplified by having the value of geospatialOrigin default to shaderCoordinateOrigin instead of null? And then having getOffsetOrigin just return one offsetOrigin value.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

geospatialOrigin is always in lnglat and used later to calculate units per pixel. I'd leave it as is for now for readability.

@Pessimistress Pessimistress merged commit 20d2fec into master Mar 3, 2020
@Pessimistress Pessimistress deleted the x/project-fix branch March 7, 2020 02:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants