Friday, July 3, 2009

ASP Google-Map Link Function

Spock: "Crude, but effective"


Function MapLink(strAddress, strCity, strStateZip)
Dim url
If StringVal(strAddress) And StringVal(strCity) And StringVal(strStateZip) Then
url = "http://maps.google.com/maps?hl=en&q=" & _
Replace(strAddress, " ", "+") & ",+" & _
Replace(strCity, " ", "+") & ",+" & strStateZip & _
"&ie=UTF8&split=0&gl=us&ei=OWlNStjaNo-Ztgfi5p2oBA&t=h&z=16&iwloc=A"
MapLink = "
<a href="http://www.blogger.com/%22%20&%20url%20&%20%22" target="_blank">View Map</a>" & vbCRLF
Else
MapLink = ""
End If
End Function

No comments:

Post a Comment