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

Keep midpoint on the line #1141

Open
wants to merge 8 commits into
base: main
Choose a base branch
from
Open

Keep midpoint on the line #1141

wants to merge 8 commits into from

Conversation

zhangchn
Copy link
Contributor

@zhangchn zhangchn commented Jan 9, 2023

With the average of Mercator coordinates of the two endpoints, the middle points were drawn off from the line.

By project/unproject the Mercator latitudes to and from screen space, the screen location for midpoints would be fixed onto the line.

zhangchn and others added 8 commits January 9, 2023 18:18
With the average of Mercator coordinates of the two endpoints, the middle points were drawn off from the line.

By project/unproject the Mercator latitudes to and from screen space, the screen location for midpoints would be fixed onto the line.
As simple_select sometimes renders lines as `MultiLineString` geometry, sort ranking should handle this type or midpoint click would not work.
As simple_select sometimes renders lines as `MultiLineString` geometry,
sort ranking should handle this type or midpoint clicking would fail.
@stepankuzmin
Copy link
Contributor

Hi @zhangchn,

Thanks for the PR! Could you please review the failing tests in the CI?

@zhangchn
Copy link
Contributor Author

IMHO, my patch changed the way midpoints were located. Test cases which assume the midpoints were located the old way failed.

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.

2 participants