-2

I have lat and long of some locations in JSON. I want to spot whether these locations are present in a route shown by google maps.

  • Welcome to Stack Overflow, please take a time to go through [the welcome tour](https://stackoverflow.com/tour) to know your way around here (and also to earn your first badge), read how to [create a Minimal, Complete, and Verifiable example](https://stackoverflow.com/help/mcve) and also check [How to Ask Good Questions](https://stackoverflow.com/help/how-to-ask) so you increase your chances to get feedback and useful answers. – Josef Adamcik Jul 20 '17 at 10:25
  • https://www.tutorialspoint.com/android/android_google_maps.htm. See this tutorial on how to place markers on maps. – sandy Jul 20 '17 at 11:21

1 Answers1

0

Here are the steps I'd consider to achieve the effect you want:

pscl
  • 3,322
  • 25
  • 29
  • Just noticed that you're doing this on Android. In this case JTS https://github.com/locationtech/jts could be useful. In particular, I believe you can test for perpendicular distance to `LineSegment`s. – pscl Jul 21 '17 at 00:33