Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

incorporating the AA route planner

Status
Not open for further replies.

pease

Programmer
Apr 2, 2009
29
GB
Firstly, apologies if this isnt the correct forum for a question of this sort.

I was wondering if anyone had any ideas of how to incorporate the extremely good AA route planner into their own site?

It doesnt use nice simple php type URL requests so I dont think I can just construct a relevant URL. Theres nothing on their site or an API or any such useful thing.

All Im looking to do is direct a user to the AA site with the necessary routeFrom and routeTo passing to the map. Ive had a look through the source but cant find anything to shed light on it (although it seems to mainly be Javascript).

the route planner is here >
Any help would be appreciated.
 
Hi

It is AJAX. It performs the following steps :
[ul]
[li]sends the from address; the server response is an XML with the matching addresses; replaces the from [tt]input[/tt] with a [tt]select[/tt] containing the addresses[/li]
[li]sends the to address; the server response is an XML with the matching addresses; replaces the to [tt]input[/tt] with a [tt]select[/tt] containing the addresses[/li]
[li]sends the addresses from those two [tt]select[/tt]s to get the route[/li]
[/ul]
Reproducing the above is not trivial like just linking to it. To make it work you will have to use their data which probably will make your attempt illegal.


Feherke.
 
Given it uses Google Maps, and (AFAIK) Google Maps have a well-documented API, wouldn't you be better off cutting out the middle-man and going direct to Google?

Dan



Coedit Limited - Delivering standards compliant, accessible web solutions

Dan's Page [blue]@[/blue] Code Couch:
Code Couch Tech Snippets & Info:
 
I was originally going to use the google maps api but the AA site adds in traffic information such as location of speed cameras, current roadworks etc which is ideal for what I need it for.

I would have hoped that the data legalities wouldnt be a problem as I was just hoping to pass people to their site rather than embed the code into mine. Am I wrong with that thought?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top