I have implemented a code which draws certain lines (MapPolyline) on a RadMap element. How to determine if drawn polygon (MapPolygon) crosses the line?
2 Answers, 1 is accepted
0
Accepted
Dess | Tech Support Engineer, Principal
Telerik team
answered on 09 Mar 2020, 11:45 AM
Hello, Roman,
Determining whether a line crosses a polyline sounds more like a mathematical question than to a RadMap related one.
It shows a sample formula which allows you to detect whether a line, defined by two points, intersects a rectangle. Please give it a try with your coordinates and see whether it would fit your requirement.
Note that MapTileSystemHelper offers the LatLongToPixelXY method which allows you to convert any PointG to PointL which represents a point in Cartesian coordinates represented with Int64 values. Thus, you can use the formula from the above referred StackOverflow thread.
I hope this information helps. If you need any further assistance please don't hesitate to contact me.
Regards,
Dess | Tech Support Engineer, Sr.
Progress Telerik
Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers.Learn More.