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

New Sandcastle Example: Parallels and Meridians #8677

Merged
merged 6 commits into from
Apr 4, 2020

Conversation

ptrgags
Copy link
Contributor

@ptrgags ptrgags commented Mar 12, 2020

This sandcastle is pretty simple, but it does a lot of neat things:

  • Clicking a point on the globe gives coordinates in decimal degrees, which is something useful I've been wanting to have more readily available
  • This gives an example of how to draw reference latitude/longitude arcs using rhumb polylines.
  • It generates lat/lon grids which might come in handy someday when debugging tileset locations by eye.
  • The "cross hairs" through the selected point allow you to see what points on the globe are at the same latitude/longitude. I added this mostly out of curiosity. However, it might be useful if you want a rough approximation of what countries might have similar climates or the same time zone.
  • I also noticed it was simple to add a second pair of crosshairs at the antipodal point (opposite point through the center of the globe). This way you can also compare points across hemispheres in any direction. Or you can plan a trip through the center of the earth. Spoiler alert: most of the time you'll end up in the ocean somewhere.

@lilleyse could you review when you get the chance?

@ptrgags ptrgags requested a review from lilleyse March 12, 2020 13:46
@cesium-concierge
Copy link

Thanks for the pull request @ptrgags!

  • ✔️ Signed CLA found.
  • CHANGES.md was not updated.
    • If this change updates the public API in any way, please add a bullet point to CHANGES.md.
  • ❔ Unit tests were not updated.
    • Make sure you've updated tests to reflect your changes, added tests for any new code, and ran the code coverage tool.

Reviewers, don't forget to make sure that:

  • Cesium Viewer works.
  • Works in 2D/CV.
  • Works (or fails gracefully) in IE11.

@lilleyse
Copy link
Contributor

@ptrgags thanks for opening this PR! It's already helped me debug misplaced datasets on the globe.

Few comments just from using the demo, I haven't looked deeply at the code yet:

There's an error if you click "Show antipodal point" before clicking on the globe.

Uncaught TypeError: Cannot set property 'show' of undefined (on line 185)

Can the labels be smaller or maybe just less decimals? Picking has a nice black background around the text which could help make it stand out.

decimals

We talked about it offline but it should be brought up here too. Can we improve the accuracy of the polyline when the viewer is closer to the surface?

Selection_479

@ptrgags
Copy link
Contributor Author

ptrgags commented Mar 31, 2020

@lilleyse sorry for the delay. I finished addressing your feedback!

@lilleyse
Copy link
Contributor

lilleyse commented Apr 4, 2020

Looks great @ptrgags. And now that polylines are fixed for log depth the demo looks all the better.

@lilleyse lilleyse merged commit 740ef62 into master Apr 4, 2020
@lilleyse lilleyse deleted the parallels-and-meridians branch April 4, 2020 21:27
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