|
Hello! Could someone please share with me some advice or example about how to implement intersection cheking for two annotations? Idk is it posiblle out-of-the-box in v3 annotorious? I just found a getAnnotationsIntersecting in v2 and trying to use it in my App and it not exactly what I want :( |
Answered by
Clasen00
Apr 11, 2025
Replies: 1 comment 2 replies
|
Hi, depends on what it is you want to do. If you are trying to simply check if two annotations touch or overlap each other, that's not a function that Annotorious provides, I'm afraid. You'd need to implement your own 2 geometry intersection checking (e.g. using something like flatten.js). Any intersection methods in Annotorious are for the purpose of detecting mouse over: i.e. intersection between an annotation and a point (or bounding box). |
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment

I made it using PNPOLY algorithm. https://wrfranklin.org/Research/Short_Notes/pnpoly.html
In short, I just cheking maxX, maxY, minX and minY coords and search if they in my new annotation. That's enough for me at the moment:)