UtterAccess.com
X   Site Message
(Message will auto close in 2 seconds)

Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
> Question about Mapquest Directions    
 
   
KerryE
post Mar 10 2006, 11:25 AM
Post #1

UtterAccess Enthusiast
Posts: 95
From: Florida, USA



Hey guys,

All's been going good with the development. I'm having a bit of trouble figuring out the problem with my mapquest buttons though.

This first url is the url created by mapquest when i type the address into directions.

http://www.mapquest.com/directions/main.ad...p;2z=34606-6254


This is the url generated by my buttons for the same address.

http://www.mapquest.com/directions/main.ad...esubmit=Get+Map

I noticed one problem is the =Get+Map at the end isnt needed for directions but it shouldn't cause the problem i'm getting either. In both urls the correct address 7329 pinehurst drive, spring hill, fl, 34606 are present *the destination*

The starting point works on my buttons but when I click to get map for my button on that address it goes to "Spring Hill, FL 34606, US " with no actual address but it ends at Thornberry road. Thornberry is actually the address i used when I first got the code and cut it per my fields, "street, city, st and zip".

The URL i used to 'cut' is as follows:

http://www.mapquest.com/directions/main.adp?go=1&do=nw&rmm=1&un=m&cl=EN&qq=hltF3hzNT9tNhURP0HLlhh9UYBmHRqyBceg4Gkon14D8uewLk7pjHQ%253d%253d&ct=NA&rsres=1&1y=US&1ffi=1&1l=aq83kWqUvuI%3D&1g=%2FRQx4Oqcqys%3D&1pl=&1v=ADDRESS&1n=HERNANDO+COUNTY&1pn=&1a=11375+Cortez+Blvd&1c=Brooksville&1s=FL&1z=34613-5409&2y=US&2ffi=1&2l=4RJEkPeJyTI%3D&2g=asbqJ66z3wM%3D&2pl=&2v=ADDRESS&2n=HERNANDO+COUNTY&2pn=&2a= 11155+Thornberry+Dr&2c=Spring+Hill&2s=FL&2z=34608-2949

I cut the part in BOLD and put as 'set' for the starting point and than I have my street, city, state, and zip set to "=&2a" "=&2c" "=&2s" and "=&2z". It seems like it 'should' work from the URL generated but it doesnt and I cannot figure out how the generated URL references the Thornberry address.

If anybody is familiar with doing this and can offer some suggestion it would be great. I've already searched through prior topics, thats actually where i got most of the cd and the module i'm using. The 'map' function I have works flawlesy for the clients address, just having issues with directions.

Thanks in advance!
Go to the top of the page
 
+
KerryE
post Mar 10 2006, 11:26 AM
Post #2

UtterAccess Enthusiast
Posts: 95
From: Florida, USA



This is actually the module, i figured it might help.


Option Compare Database

Sub sMapQuestBrooksville(Address As String, City As String, State As String, Zip As String)
Dim strURL As String
Dim ie As Object

If InStr(1, Address, "#") <> 0 Then 'Remove everything after # - mapquest does not like
Address = Left(Address, InStr(1, Address, "#") - 2)
End If

Do While IsNumeric(Nz(Right(Address, 1), 0)) 'remove any righthand numbers/spaces - mapquest does not like
Address = Left(Address, Len(Address) - 1)
Loop

strAddress = Replace(Address, " ", "+") 'Convert spaces to +
strCity = Replace(City, " ", "+")
strState = Replace(State, " ", "+")

strURL = "http://www.mapquest.com/directions/main.adp?go=1&do=nw&rmm=1&un=m&cl=EN&qq=hltF3hzNT9tNhURP0HLlhh9UYBmHRqyBceg4Gkon14D8uewLk7pjHQ%253d%253d&ct=NA&rsres=1&1y=US&1ffi=&1l=&1g=&1pl=&1v=&1n=&1pn=&1a=670+South+Broad+Street&1c=Brooksville&1s=FL&1z=34601&2y=US&2ffi=&2l=&2g=&2pl=&2v=ADDRESS&2n=&2pn=&2a=" 'build URL
strURL = strURL + "&address=" + Address
strURL = strURL + "&2c=" + City
strURL = strURL + "&2s=" + State
strURL = strURL + "&2z=" + Zip
strURL = strURL + "&homesubmit=Get+Map"

Set ie = CreateObject("InternetExplorer.Application")

ie.Navigate strURL
ie.Visible = True

End Sub
Go to the top of the page
 
+
freakazeud
post Mar 10 2006, 11:56 AM
Post #3

UtterAccess VIP
Posts: 31,413
From: NC, USA



Hi,
check: mapquest example
google example!
HTH
Good luck
Go to the top of the page
 
+
KerryE
post Mar 10 2006, 12:22 PM
Post #4

UtterAccess Enthusiast
Posts: 95
From: Florida, USA



i did that already freakazued.

that is actually the map module i'm using. That doesn't help me with the directions though because quite a bit is changed.

I just cant figure out how my url that is generated is making reference to the other address when the URL shows the correct address.
Go to the top of the page
 
+
KerryE
post Mar 10 2006, 02:42 PM
Post #5

UtterAccess Enthusiast
Posts: 95
From: Florida, USA



Any suggestions I still can't get it. This is getting to be very frustrating. (IMG:http://www.utteraccess.com/forum/style_emoticons/default/giveup.gif)
Go to the top of the page
 
+
KerryE
post Mar 10 2006, 04:22 PM
Post #6

UtterAccess Enthusiast
Posts: 95
From: Florida, USA



oh well i'm heading home for the weekend. If anybody can offer any assistance i'll check back here on Monday. Thx again.
Go to the top of the page
 
+
KerryE
post Mar 10 2006, 04:43 PM
Post #7

UtterAccess Enthusiast
Posts: 95
From: Florida, USA



well I worked out 'part' of the problem

I apparently cut the code off in the wrong spot "&2a=" where i should of cut it off right beforehand. Than i needed to put the "&2a=" into:

strURL = strURL + "&address=" + Address

where i had &address I had messed it up..

My start and End addresses are showing up properly now atleast but its still not mapping it correctly.

Oh well atleast I found one error in the code, maybe i'll manage to fix it myself next week. Thx again.
Go to the top of the page
 
+

Thank you for your support! Reply to this topicStart new topic

Jump To Forum:
 



RSS Go to Top  ·  Lo-Fi Version Time is now: 23rd May 2013 - 07:03 AM