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
Scale CoordinatesDisplayLayer latitude/longitude digits based on eye … #62
base: develop
Are you sure you want to change the base?
Conversation
Oh wait, do not accept this PR yet. |
Why do you not using lookAt.range instead of eye.altitude? LookAt.range is a distance to surface (including terrain elevation) of point in screen center. |
Done |
I have compared this feature with Java and Android code bases. They use constant amount of decimal places, e.g. 4 or 6. Why do we need this dynamic decimal places? Can we simply replace 2 with 6 for all case? |
I did this because having 6 decimal places doesn't make sense when a pixel is only a decimal place or two wide... |
953daf2
to
ace7dc4
Compare
9f65abc
to
6cad044
Compare
03d6318
to
4f2482f
Compare
7a03c94
to
48308ab
Compare
83ce1f6
to
76638e5
Compare
0a128e5
to
9917793
Compare
Description of the Change
Scale latitude/longitude decimal places based on eye altitude. For example, if zoomed in really close, show latitude/longitude with 6 decimal places. If zoomed way out, only show 1 or 2 decimal places.
Why Should This Be In Core?
To improve display and accuracy of latitude/longitude display.
Benefits
Better display.
Potential Drawbacks
None.
Applicable Issues
None. But there are a few of hardcoded values in CoordinatesDisplayLayer that need to be taken care of (that were there prior to this PR). These hardcoded values appear to assume character width and other values.