Advertisement
Guest User

Untitled

a guest
Apr 19th, 2014
50
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.67 KB | None | 0 0
  1. Dim u1 As String = "https://maps.googleapis.com/maps/api/geocode/xml?address="
  2. Dim u2 As String = "&sensor=false&key=API-KEY"
  3. Dim addr As String = "1600 Amphitheatre Parkway, Mountain View, CA 94043, USA"
  4. Dim m_xmld As XmlDocument
  5. Dim m_nodelist As XmlNodeList
  6. Dim m_node As XmlNode
  7. addr = addr.Replace(" ", "+")
  8. u1 = u1 + addr + u2
  9.  
  10.  
  11. m_xmld = New XmlDocument()
  12. m_xmld.Load(u1)
  13. m_nodelist = m_xmld.SelectNodes("/GeocodeResponse/result/location")
  14.  
  15. For Each m_node In m_nodelist
  16. Dim lat = m_node.ChildNodes.Item(0).InnerText
  17. Dim lon = m_node.ChildNodes.Item(1).InnerText
  18. MsgBox("lat" + lat + " " + "long" + lon)
  19. Next
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement