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

Zoom VectorObject out of screen didSelect not called #1592

Open
yyakun opened this issue Jul 5, 2023 · 5 comments
Open

Zoom VectorObject out of screen didSelect not called #1592

yyakun opened this issue Jul 5, 2023 · 5 comments

Comments

@yyakun
Copy link

yyakun commented Jul 5, 2023

IMG_0756

NSDictionary *vectorDict1 = @{
                             kMaplyColor: [UIColor redColor],
                             kMaplySelectable: @(true),
                             kMaplyVecWidth: @(5),
};
const MaplyCoordinate pts[] = { MaplyCoordinateMakeWithDegrees(50, -65), MaplyCoordinateMakeWithDegrees(150, -65) };
MaplyVectorObject * vec = [[MaplyVectorObject alloc] initWithLineString:pts numCoords:2 attributes:nil];
[baseVC addWideVectors:@[vec] desc:vectorDict1];

hello
When I add a VectorObject, if all the VectorObjects are on the screen, I can receive a click event. If the two endpoints of the VectorObject are not on the screen after zooming in on the map, I cannot receive a click event

@sjg-wdw
Copy link
Collaborator

sjg-wdw commented Jul 5, 2023

That's interesting. Which version of WhirlyGlobe-Maply?

@yyakun
Copy link
Author

yyakun commented Jul 6, 2023

Version 3.5

@sjg-wdw
Copy link
Collaborator

sjg-wdw commented Jul 6, 2023

To debug this, my suggestion is to set a breakpoint in ComponentManager::findVectors and see what happens.
In particular, is the pointNearLinear getting called and if it is, does it return something reasonable.

@yyakun
Copy link
Author

yyakun commented Jul 6, 2023

Pasted Graphic 1
Pasted Graphic 2

When converting screen coordinate points, it will determine whether the points are within the screen. If this judgment is removed, will there be any other bugs?

@sjg-wdw
Copy link
Collaborator

sjg-wdw commented Aug 31, 2023

Seems like that ought to work.

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

No branches or pull requests

2 participants