View previous topic :: View next topic |
Author |
Message |
houghi Occasional Visitor
Joined: Jul 08, 2007 Posts: 3
|
Posted: Sun Jul 08, 2007 11:25 am Post subject: Google and Tomtom |
|
|
maps.google.com has a new feature. If you get directions, you can drag the route around, making an iternerary.
The link can be turned into a file for the Tomtom
I have put this online. The code is there as well and can be placed on other sites.
http://houghi.org/tomtom/
Have fun |
|
Back to top |
|
|
RQ Regular Visitor
Joined: Apr 08, 2006 Posts: 240 Location: Clevedon
|
Posted: Sun Jul 08, 2007 4:06 pm Post subject: |
|
|
You can also use TYRE - available here
http://www.janboersma.nl/gett/index.php _________________ RQ
TT1v3 6.560 1713 UK&NI 660.1199
TTG700 6.520 1387 MoWE 660.1219 |
|
Back to top |
|
|
houghi Occasional Visitor
Joined: Jul 08, 2007 Posts: 3
|
Posted: Sun Jul 08, 2007 4:50 pm Post subject: It is different from Tyre |
|
|
Tyre is a great program, however there are some differences.
First Tyre runs on Windows, which I do not have, so I can't run it.
Second it is based on Google Earth, while the site relies on Google maps. Google earth is a program you need to run on your PC, google maps you can use when on the road in e.g. a internet cafe.
This means when I am e.g. in Spain, where I do not have my PC with me, I just go into a place where there is a PC, determine my route, save it my Tomtom and be on my daily route again.
Also I can use it at my place where I work and am not allowed to install Google Earth.
Again, Tyre is most likely a great program. This one is just different and intended for thos who do not want/can use Tyre. |
|
Back to top |
|
|
Andy_P Pocket GPS Moderator
Joined: Jun 04, 2005 Posts: 19991 Location: West and Southwest London
|
Posted: Mon Jul 09, 2007 2:00 pm Post subject: |
|
|
That looks SO cool!
Bang goes work for the rest of the day, while I play with it! |
|
Back to top |
|
|
Andy_P Pocket GPS Moderator
Joined: Jun 04, 2005 Posts: 19991 Location: West and Southwest London
|
Posted: Mon Jul 09, 2007 2:18 pm Post subject: |
|
|
OK... First thing I've found.... Moving the start and end points a bit (as per instructions) is important, but what you need to do is click and drag the TOP of the green and red "flags" rather than the bottom - that just adds another intermediate step.
Secondly. It doesn't make it very clear that the URL you need is got by clicking "link to this page" in the top right. Copy that into the script and it seems to work! |
|
Back to top |
|
|
barryd Frequent Visitor
Joined: Mar 27, 2004 Posts: 285 Location: Cheshire, England
|
Posted: Mon Jul 09, 2007 4:47 pm Post subject: |
|
|
Hi
This does look useful, thanks.
Basically it's great, but I have had the following issues with it (in IE7 on XP MCE if that matters):
- It's not showing negative values as negatives, so longitudes West are coming out as the correct number but East. The same might happen for latitudes South, but I haven't tried them.
- It's adding an unwanted ~ then spaces and two carriage returns at the end of its output. This one is easy to ignore when you copy and paste the results, but I haven't tried to see what it does in TomTom if you include it.
Hope this helps. _________________ Barry Davies
|
|
Back to top |
|
|
Andy_P Pocket GPS Moderator
Joined: Jun 04, 2005 Posts: 19991 Location: West and Southwest London
|
Posted: Mon Jul 09, 2007 7:11 pm Post subject: |
|
|
Hmmm...
Seems you're right Barry.
The test itinerary I did at work (my normal route home) LOOKED fine - all the place names were right, but I had no GPS signal so it wouldn't show me a map of the route (another TomTom annoyance but that's another story).
When I went outside and tried to follow it home, all the waypoints were over in East London rather than West.
Seems someone has left out a minus sign somewhere in that code.
I'm not sure where 'houghi' got it. Is it from Google themselves, houghi? Who do we contact to tell them it's NEARLY so good but has this problem.
I'm not using IE, so it doesn't seem to be a browser thing. |
|
Back to top |
|
|
vroomfondel Regular Visitor
Joined: May 12, 2006 Posts: 224 Location: Hampshire
|
Posted: Mon Jul 09, 2007 8:01 pm Post subject: |
|
|
I got the same result. Anything west of the meridian is wrong.
Seems to be due to the use of preg_replace to remove the + or - signs.
Shame because it looks promising.
I think he wrote it himself..
Last edited by vroomfondel on Mon Jul 09, 2007 9:08 pm; edited 1 time in total |
|
Back to top |
|
|
46jimbo Regular Visitor
Joined: Apr 24, 2005 Posts: 185
|
Posted: Mon Jul 09, 2007 8:29 pm Post subject: |
|
|
In Notepad, I just added a minus sign at the start of each line and it solved the problem. |
|
Back to top |
|
|
vroomfondel Regular Visitor
Joined: May 12, 2006 Posts: 224 Location: Hampshire
|
Posted: Mon Jul 09, 2007 8:34 pm Post subject: |
|
|
46jimbo wrote: | In Notepad, I just added a minus sign at the start of each line and it solved the problem. |
Too messy if you cross the meridian though.
The code fix appears to be simple; don't strip off the minus signs. I'll test it on my website.
Last edited by vroomfondel on Mon Jul 09, 2007 9:28 pm; edited 1 time in total |
|
Back to top |
|
|
vroomfondel Regular Visitor
Joined: May 12, 2006 Posts: 224 Location: Hampshire
|
Posted: Mon Jul 09, 2007 9:26 pm Post subject: |
|
|
Change lines 63 & 67 in tomtom.php
$x = preg_replace('/[\+\-]/', '', $loc[1]);
...
$y = preg_replace('/[\+\-]/', '', $loc[2]);
To
$x = preg_replace('/[\+]/', '', $loc[1]);
..
$y = preg_replace('/[\+]/', '', $loc[2]);
Put the html and php files on your own website and click on the html file.
The ~ and two extra CRs at the end appear to be spurious lines on the end of tomtom.php |
|
Back to top |
|
|
houghi Occasional Visitor
Joined: Jul 08, 2007 Posts: 3
|
Posted: Mon Jul 09, 2007 9:51 pm Post subject: Corrected code and site |
|
|
The code is corrected in both the file you download and the site itself and I hope that the site is a little bit clearer as to what to copy where.
I have also added thanks to the person who actualy wrote the code. |
|
Back to top |
|
|
Andy_P Pocket GPS Moderator
Joined: Jun 04, 2005 Posts: 19991 Location: West and Southwest London
|
Posted: Mon Jul 09, 2007 10:23 pm Post subject: |
|
|
Thanks everyone.
I just tried to implement the corrections myself using Notepad, and it wasn't working for me, so you've saved me some detective work.
I think you are all damned clever!
houghi - you have a PM |
|
Back to top |
|
|
cantreadamap Occasional Visitor
Joined: Mar 01, 2006 Posts: 7
|
Posted: Fri Aug 03, 2007 7:14 pm Post subject: |
|
|
Shame that Google Maps limts the itinerary to 90 or so waypoints. I tried plotting a road navigation rally which uses many country lanes and hundreds of turns. |
|
Back to top |
|
|
Oldboy Pocket GPS Moderator
Joined: Dec 08, 2004 Posts: 10643 Location: Suffolk, UK
|
Posted: Fri Aug 03, 2007 7:38 pm Post subject: |
|
|
robatwilliams wrote: | Shame that Google Maps limts the itinerary to 90 or so waypoints. I tried plotting a road navigation rally which uses many country lanes and hundreds of turns. | I shouldn't worry too much about that, TT can only handle 48 Waypoints. _________________ Richard
TT 910 V7.903: Europe Map v1045
TT Via 135 App 12.075: Europe Map v1140 |
|
Back to top |
|
|
|
Posted: Today Post subject: Pocket GPS Advertising |
|
|
We see you’re using an ad-blocker. We’re fine with that and won’t stop you visiting the site.
Have you considered making a donation towards website running costs?. Or you could disable your ad-blocker for this site. We think you’ll find our adverts are not overbearing!
|
|
Back to top |
|
|
|