Cool Stuff

Try Market Samurai now for free!

Think Outside Inc Stowaway Keyboard
The Solution To Bloging on Your Smartphone

Now Add This - GREAT PRICE!
Cingular 8525 Smartphone

SimpleTech External Hard Drives
Elegant Backup Solutions

Acronis True Image Server
Server Backup Solutions When You Gotta Keep Going

postheadericon Parsing Google Maps HTML

If you cannot afford 10 grand for an enterprise version of the Google Maps API, then you might be stuck having to parse the html form the clunky old maps.google.com website. If that is the case, here’s a snippet of code that seems to work consistently to parse out the lat and lon from the html.

 If HTML.Length > 0 Then
‘we have something back so
‘get important part of string
Dim s1 As String = geo.Substring(geo.IndexOf(“viewport:{center:{“), 200)
Dim intStartPos As Integer = s1.IndexOf(“{lat:”, 0) + 5
Dim intEndPos As Integer = s1.IndexOf(“}”, intStartPos)
Dim intCommaPos As Integer = s1.IndexOf(“,”, intStartPos)

‘now assign the strings to lat/ lon vars
_lat = s1.Substring(intStartPos, intCommaPos – intStartPos)
_lon = s1.Substring(intCommaPos + 5, intEndPos – (intCommaPos + 5))

End If

Share and Enjoy:
  • Print
  • Digg
  • Sphinn
  • del.icio.us
  • Facebook
  • Mixx
  • Google Bookmarks
  • Blogplay

One Response to “Parsing Google Maps HTML”

  • I have a question for the community. Most lead providers get their leads from online quote request and then they resell them like 4 or 5 times. I’ve been burned like this a few times already so my question is, how about telemarketing to generate insurance leads? I’ve heard good and bad things so if anyone has any feedback please let me know your thoughts before I spend even more money testing things out.

Leave a Reply




Authorize.Net Merchant - Click to Verify