-
|
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 :( |
Beta Was this translation helpful? Give feedback.
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). |
Beta Was this translation helpful? Give feedback.

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:)