1

In an application I'm currently developing, I allow the user to draw his own way on a Google Map Android v2.

For that, I capture the onTouch / action_move event and I convert the x and y of the event to a Google Map LatLng. Then, with these LatLng I build a PolylineOptions that I finally add on the map.

Now, I would like to know if there is an intersection in this polyline and if it is the case, I would like to obtain the coordinate of this point.

Is there a way to do that ? Maybe by converting Polyline into Path and Region ?

I have try the latest proposition without success.

Thank you in advance for you help :)

rolandl
  • 1,769
  • 1
  • 25
  • 48
  • 1
    is there a built in method? no you have to do the math yourself – tyczj Mar 18 '14 at 17:52
  • Perhaps this can help you http://www.mathopenref.com/coordintersection.html. Using latitude as 'x' and longitude as 'y', looping through the LatLng's in an AsyncTask for instance. – cYrixmorten Mar 18 '14 at 17:57
  • Check this https://stackoverflow.com/questions/49535476/how-to-find-intersect-between-two-polylines-in-android/49550178#49550178 – AmitCharkha Mar 29 '18 at 08:59

0 Answers0