Do you want to find the Latitude & Longitude for a whole bunch of addresses? Microsoft's TerraServer provides this information as a demonstration of SqlServer and with a little VFP programming, you can make use of it from within a program.
CDyne also provides this service, though for a fee. It seems they allow you to try their webservice for free for about 5 minutes before locking you out.
You can use your own method of retrieving the web page, or see FAQ184-3019 for the ReadUrl function.
LOCAL lcSt, lcMethod, lcLong, lcLat, lcLong1, lcLat1 ON KEY LABEL ESC SUSPEND SET DECIMALS TO 8 USE Addresses lcMethod = 'TERRASERVER' *lcMethod = 'CDYNE'
? "Processing Record ",RECNO(),"of",RECCOUNT(), lcSt, Address.zipcode, address.State
DO CASE CASE lcMethod='TERRASERVER' * You may have to log in to terraserver.microsoft.com and get a VIEWSTATE value for yourself: lcGetUrl = 'http://www.terraserver.microsoft.com/address.aspx?__VIEWSTATE=dDwxNzM4NTI3NTc7O2w8U2VhcmNoOz4%2B'; +'&Street='+lcSt; +'&City='; +'&State='+ALLTRIM(address.State); +'&ZipCode='+ALLTRIM(address.zipcode); +'&Search.x=0&Search.y=0'
lcLat = SUBSTR(pineview.Resp, ATC('&lat=',pineview.Resp)+5) lcLat1 = LEFT( lcLat, ATC('&',lcLat)-1 ) REPLACE address.Longitude WITH VAL(lcLong1), ; address.Latitude WITH VAL(lcLat1)
CASE lcMethod='CDYNE' * This is a webservice that can do the same thing, only with much simpler code, * and it offers about 5 minutes of free trial on license key "0" before locking you out: * See http://ws.cdyne.com