2

I am a Student..and right now trying to develop code for android..that shows nearby hospital locations to user's current location.. i know how to get kml file for that..and know that i need to parse that file..to get different Placemark attribute value.. but couldn't succeed .. so if any of my friends have small guide,tutorial,code,example regarding how to parse the kml file for fetching value of multiple placemark..please please let me know..

Thank You.

Hanry
  • 5,481
  • 2
  • 40
  • 53

1 Answers1

0

fire a html query for a url like this :

http://maps.google.co.uk/maps?f=q&source=s_q&hl=en&geocode=&q=hospitals&aq=&sll=54.89517,-1.866302&sspn=0.323796,0.811615&ie=UTF8&hq=hospitals&hnear=&ll=54.902277,-1.800385&spn=0.323738,0.811615&z=11&output=kml

note these

hq=hospitals

and

output=kml

You will receive a kml. Next you will need a sax parser. This code is sufficiently awesome. Use it only as a reference.

Community
  • 1
  • 1
Reno
  • 33,594
  • 11
  • 89
  • 102
  • Thanks....I have used this previously. But really i want to use placemark in my application to show on map. Also I have used intent but it shifts controls to google maps, I want to show in my app... – Hanry Feb 23 '11 at 06:04
  • @hanry Read my answer carefully, the last line has a link. – Reno Feb 23 '11 at 06:05
  • I have used that link to load kml.....But I want to parse placemarks to show on map or list..... – Hanry Feb 23 '11 at 06:08
  • If thats what you want then do it. I believe that link covers it as well. – Reno Feb 23 '11 at 06:13