Thursday, January 31, 2013

Geocoding Question

I have an ASP script that takes a zip code and derives latitude/longitude coordinates. As you can see it is a simple integration. With such an integration I am allowed 2500 queries per day. I am going over that and would like to convert it to where I am using API credentials. I have looked and looked and cannot figure this one out. I know it is simple but just cannot find any code or a solution. 

Here is the existing code. I am passing a five (5) digit zip code into this ASP sub-routine.

Sub getLatLon(vAddress,latitude,longitude)        
        Set xmlhttp = Server.Createobject("MSXML2.ServerXMLHTTP")
' create url to post
urlToPost = "" & vAddress & ""
xmlhttp.Open "POST",urlToPost, false
        strRetval = xmlhttp.ResponseText
        print "xmlhttp.ResponseText:" & xmlhttp.ResponseText & br
        Set xmlhttp = nothing

       Set objXMLDoc = CreateObject("Microsoft.XMLDOM") 
       objXMLDoc.async = False 
       Set lat = objXMLDoc.documentElement.selectSingleNode("//lat")
       latitude = lat.Text
       Set lon = objXMLDoc.documentElement.selectSingleNode("//lng")
       longitude = lon.Text
End Sub

You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
To post to this group, send email to
Visit this group at
For more options, visit

No comments:

Post a Comment