Return to Snippet

Revision: 12383
at March 12, 2009 17:04 by blackf0rk


Initial Code
Public Function GetGeoCoords(ByVal inString As String) As String
   Dim Chunks As String()
   Dim outString As String = ""
   Chunks = Regex.Split(inString, "&")
   For Each s As String In Chunks
      If InStr(s, "ll") > 0 Then outString = s
   Next
   Return Replace(Replace(outString, "sll=", ""), "ll=", "")
End Function

Initial URL
http://codefinds.blogspot.com/2009/02/get-google-maps-coordinates-from-url.html

Initial Description
This function will parse out the Google Maps coordinates from a Google Maps link url like this one: http://maps.google.com/?ie=UTF8&ll=43.068888,-87.978516&spn=23.565589,33.925781&t=h&z=5. The coordinates in this URL are 43.068888,-87.978516.

Initial Title
Get Google Maps Coordinates from URL

Initial Tags
google

Initial Language
VB.NET