0

I am currently working on an android application.

I am trying to set up an proximity alert based on a set of coordinates that are stored in a kml file, parsed and displayed on a google map. I want to be able to track the users location and then when they get within a certain distance of one of these points for an alert to pop up. I have worked through an example using hard coded points successfully but now would like to adapt this to use the points in the KML.

I have looked extensively for examples of this, and have found nothing.

If anyone could tell me if this were possible, or where i might be able to find examples of how to do it i would be most grateful! I am new to programming and I am finding it hard to know where to start.

Thanks in advance for any help!!

rkosegi
  • 14,165
  • 5
  • 50
  • 83

1 Answers1

0

Definitely possible, but you'll need to manually extract the points from the KML. Take a look at http://code.google.com/p/javaapiforkml/, or just read the KML spec and parse it with any convenient XML parser. If you want to use the first library you can wander through the source for the tests and see how it is used.

Femi
  • 64,273
  • 8
  • 118
  • 148
  • Thank you for your reply. I have already parsed the KML and displayed the points on a google map, this works. So is there a way to manually extract the data that has already been parsed? I know this is all probably obvious stuff but I am new at this!! – user1342261 Apr 18 '12 at 21:04