Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Mapquest/VFP problems
Message
 
To
13/12/2005 12:34:12
Dick Day
Madison County, Nebraska
Nebraska, United States
General information
Forum:
Visual FoxPro
Category:
Other
Environment versions
Visual FoxPro:
VFP 6 SP5
OS:
Windows XP
Network:
Windows XP
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01077525
Message ID:
01077571
Views:
41
There are several ways to use mapquest remotely, the prefered nethod is through the API calls which shouldn't change over time. The second way is using automation to fill in the form and submit, which I have done in the past. The third way is my current way of doing it which is to stuff the URL parameters with the data form the record, and doing it this way, they added a couple of parameters. The commented out line is the old code, the line below it is the new code, seems to work fine.

oIE=CREATEOBJECT("internetexplorer.application")
oIE.VISIBLE=.T.
*oIE.Navigate("HTtp://www.mapquest.com/maps/map.adp?searchtype=address&country=US&addtohistory=&searchtab=home&address="+ALLTRIM(ALLTRIM(Recd.Addr1)+' '+ALLTRIM(Recd.Addr2))+"&city="+ALLTRIM(Recd.City)+"&state="+ALLTRIM(Recd.State)+"&zipcode="+ALLTRIM(Recd.ZIP))

oIE.Navigate("http://www.mapquest.com/maps/map.adp?searchtype=address&country=US&addtohistory=&searchtab=home&formtype=address&popflag=0&latitude=&longitude=&name=&phone=&cat=&address="+ALLTRIM(ALLTRIM(Recd.Addr1)+' '+ALLTRIM(Recd.Addr2))+"&city="+ALLTRIM(Recd.City)+"&state="+ALLTRIM(Recd.State)+"&zipcode="+ALLTRIM(Recd.ZIP))


The only reason I use this method is because I didn't want to take the time to learn their API, but because of this, they can break my code occassionally.

>Bob, I changed what I thought should be changed and I still get mixed results. If an exact address is sent, the map is blank, hit F5 and it appears. Send a 'near hit' address and you get the normal prompt, select the suggested address and it appears just fine.
>
>If you can figure out what the correct syntax should be, would you mind sharing?
>
>Thanks!
>
>Dick
'If the people lead, the leaders will follow'
'War does not determine who is RIGHT, just who is LEFT'
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform