Export multi-destination (or dragged) route to Google Earth

Love keep adding destinations to your route, or even dragging the route to refine perfectly to your needs in the directions feature on Google Maps? But frustrated that this feature isn’t available in Google Earth?

… No, not implemented this feature for Earth (wouldn’t that be something!), but as a stop gap its a way to export your newly created directions on Maps, and open them in Google Earth! You get a freshly created folder containing each section as a separate route, ready for use as ‘one.

Multi Destination routing in KML for Google Earth

31 Responses to “Export multi-destination (or dragged) route to Google Earth”

  1. Chris Fowler says:

    This is a great tool. What I am trying to do is build an interactive map which shows the transport link in an area (buses routes). The bus routes are encoded using the TransXChange data format (xml schema). What would be really cool is if I can take a TransXChange service description and convert it to KML for display on a map. However, before I go that far, this is an excellent way for me to get kml file from routes data – even if I have to manipulate the routes by hand.

    Thanks again for all your efforts on this site. Some really great resources here.

  2. Barry says:

    I’ve never even heard of TransXChange, but doesnt look that hard to parse (looking at a few examples) – the only issue is its in NationalGrid so would need converting to lat/long for Google Maps etc. (but I have plenty of tools available for that ;)

    One thing that does occur to me, is might be worth contacting Google:
    as they might have or willing ot help create a TransXChange < -> transit feed convertor. And in the process KML could be a useful biproduct.

  3. Geoff says:

    Great tool, but . . . Trying create a Google Earth route of a backroads motorcycle route. When I do a simple test route of several addresses it works great. But when I try a sample of the routes I actually want to create I get an XML parsing error when I open the KML file.

    Here’s the GoogleMap route I’m trying to convert-

  4. Barry says:


    Good catch, it wasnt coping with the & in the address. I’ve fixed it and it now copes with your route just fine :)

  5. Barry says:


    Just found this

    which reportedly has a TransXChange convertor

  6. Ray white says:

    Your program is great. Could you help me with a problem and tell me what I’m doing wrong. When I run the program, and then save the new.kml file into a folder it works with no problem in GE, but when I try to convert the .kml to a .gdb file through Babel [ GPSBabelGUI.exe ] it doesn’t work and only shows the file as 1 k……

    Thank You

  7. Barry says:


    I think its that the KML file produced doesnt contain any content, but rather a set of network links, which tell GE (or Google Maps etc) where to find the actual ocntent on Googles servers. Is quite probably that GPSBabel doesnt understand such links and expect the content to be in the file.

    The easiest workaround I can think of is to probably open in in GE, and drag the contents of old directions (one by one) to a new folder – if you drag the top level you simply move the link – and then save this new folder, this should actully save the content.


  8. Ray White says:


    That did it……….by creating a new folder and transferring the instructions

    So your saying that your program creates a kind of “shortcut” and that explains the folder and the subfolder having the same title when opened in GE

    Is there any way to eliminate that step

    Thank You for the program and explanation

  9. Ian Chappel says:

    Hi Barry,

    That is brilliant! Just what I’ve been trying to achieve. Surely Google must before too long provide either d+d in GE or the ability to get info out of GM? As you say, it is a gap in functionality.

    On another note, I am trying to recreate some old “tracks” for my website, but have them in an old Autoroute (*.AEU and *.AGB) format. In fact I only need to extract the waypoints. Do you have a utility that can retrieve/convert them? (I don’t have the old programme). The file is zipped at http://www.aslc43.dsl.pipex.com/Misc/old_autoroute.zip if you’re able to take a peak. I’ve previously used an excellent utility at http://mcrenox.com.ar/gps/ to extract info from Autoroute 2001+, but it can’t do earlier versions (I have asked!).

    Sorry, the original purpose of my message was to say thanks, not ask for more!


  10. Ian Chappel says:


    I’ve looked into the Network Links in your KML output. It seems the same can be achieved, by taking the “Link to this page” url from GM, and simply changing the “&z=10″ (or whatever zoom factor) at the end to “&output=kml”.

    The revised url works either straight into your browser’s address bar, or as the location of a Network Link in GE.

    The difference is, the Path will be in one segment, and the directions will be in one list (i.e. there’s no splitting at via points).

  11. Barry says:

    Have you seen http://www.gpsvisualizer.com/ that might have a conversion – in particular has a web interface to GPSBabel.

    Yes as you seen it just creates a bunch of links – so gets a seperate ‘routing’ per segment, the normal kml output doesnt seem to fully support multiple points (it does partically tho)

  12. Ian Chappel says:

    Thanks Barry, I’ll have a look at http://www.gpsvisualizer.com/.

    The method I described (modifying the GM url) definitely does preserve the routing of GM in GE. My purpose was to generate a path (simulated tracklog), which was a lot easier in GM. I also wanted it in one segment.

    It’s very odd that GM’s routing doesn’t display the “View in Google Earth” button.

  13. Ian Chappel says:

    Further to my last post, it seems that it preserves routing using via points (i.e. dragged ones, the little white circles). But doesn’t work with Adding destinations (i.e. markers ‘C’ and greater).

  14. Barry says:

    yes noticed that. I’ve used it before (before got round to writing the above app), you can convert the points to ‘via’ points with the ‘via’ param, i added basic docs here http://mapki.com/wiki/Google_Map_Parameters

    Update: Which also reminds me this app silently disgards the via information, and makes them all full stops – it could be sorted I suppose.

    Also unrelated, I mentioned draggable routes in GE itself, it might soon be possible!

  15. Ian Chappel says:

    Thanks Barry.

    One other thing – have you found a decent method of transferring a route from GM (via. GE probably?) to a GPX file? I’ve done it via. a KML but just end up with lots of unconnected Waypoints and some Tracklogs(=paths). What I want is a Route!

    I’ve searched and found a few websites which purport to do this, but haven’t yet had any success. Perhaps Google will add an ‘Export to GPX’ or ‘Send to GPS’ button before long? I did see that facility available from the ‘Send’ button but I think it only works for one Waypoint at present.

    BTW GPSvisualiser wasn’t able to handle my AEU files.

  16. Candy says:

    There are two links to copy. Which one do I use? Doesn’t really matter, I guess, because I get the following message no matter what I use:

    unable to parse query, please try again

    Can you please help me, or has Google “fixed” your script so it no longer works?



  17. Barry says:


    Only one of the boxes is a Link, the top one (as it says on the instructions in the Google Maps Group post)

    I’ve just tested it now and it working for me. What map are you using? Are you simply viewing directions at the time you click the ‘Link to this Page’

    If you can please paste the link you are trying here.

  18. Barry says:

    @Geoff, not exactly sure what you saying, but that link is a link to a My Map on Google Maps – so that wont export.

    You use this tool to create a KML file from a ‘Link to this page’ when viewing the directions – the other tutorial tip post mentions you can then import the KML produced by this tool back into a My Map – to save it.

  19. Bill says:

    Tried this to save a route. Got very bizarre results; maybe I’m not doing it correctly, but I followed the directions on the FAQ.

    It was a local map for Atlanta, GA metro area (to get to my daughters volleyball match from work and then home after). When I imported (follwoing directions) it was routing me through Pennsylvania…a little out of the way for what I had planned.

    Anyway – thanks for the help, but Google really needs some method for saving routings, both multiple destination and customized destination. I like a lot of what Google maps does, but saving customized routes would be a big advance.

  20. Steve says:

    Hi Barry,

    Firstly love your work on this tool – it’s what google should have written in the first place. After of course they let us use more that 24 checkpoints in a single a google maps route. But I digress…

    Currently you exporter gives us a kml with a bunch of network links in it, which is great if I am online with google earth but if I want to use it in offline mode it doesn’t look to me (unless I am missing something) like google earth caches the network routes so I’m out of luck.

    Would it be possible for your converter to ask if you want a networked linked kml output (the current functionality) or a static version?

    If the user asked for a static version it’s “simply” a case of asking google maps to resolve the next step down for the network path (it gives you a static path) and splicing the resulting kmls together.

    What’s our chances of getting you to do that? wink wink… :-)

  21. Joe says:

    1. Get your route all ready with all your waypoints, start, destination points and such.
    2. Click “Link” on the upper right hand corner
    3. Copy and paste the contents of the _top_ box into your address bar.
    4. Append the following to the end of the pasted address in the address bar:


    without the quotation marks. This tells Google to give the contents to you in a kml file, which you can open in Google Earth.

  22. Robert says:

    Just wanted to say genius converter. I have a 6,000 mile trip planned across the western US with all 24 points used in Google Driving Directions and was thinking I was going to have to reroute everything to Google Earth after it only was reading one way point but I came across this and you have no idea how thankful I am.

  23. Paolo Cuturi says:

    I would like to create a route (c. 100miles) along the Zambezi river which I would then like to send to my GPS unit to use for navigation, distances and ETA’s etc. I want to know where ever I am on the route, how far I am from either the start or end point of the route.

    Would this tool be useful for me?

    So far I have tested it creating a very simple path in GM, yet when I click on the LINK TO THIS MAP and copy the URL and paste it into the Multi Destination Routing url box, when I click CONTINUE I get the message “unable to parse query, please try again”. I get the same message if I append the end of the Link url with “&output=kml”

    The Linked URL I am using is: http://maps.google.com/maps/ms?ie=UTF8&hl=en&msa=0&ll=-12.545096,27.877293&spn=0.01994,0.042315&t=h&z=15&msid=106489627415814544154.00046c0ece6adc1c33339

    Would appreciate any help on this.

    Many thanks
    Paolo Cuturi

  24. Barry says:


    no, this tool is for a route created in the ‘directions’ feature. not for one created in ‘My Maps’

    you should be able to use the kml file from the ‘view in google earth’ link directly in something like gpsvisualiser.com to convert the file to a gpx for loading into your unit.

  25. Brotherharry says:

    with this link

    I’m getting unable to parse query response, I think as it’s a saved map?

    If I use the ‘view in google earth’ button from Firefox and / or append the ‘&output=kml’ to the end of the link, I can get the file into GE, but it doesn’t replicate the precise route on the roads, just an approximation using straight lines – am I expecting too much to get a precise mapping that matches GM? Are there limits on the number of way points (haven’t used vias just grabbed white circles

  26. Barry says:


    Yes this tool is for the original directions, – not that saved to ‘My Maps’

    Google My Maps does not support export of Saved Directions and/or hand drawn ‘Snap to Roads’ – either direct to Google Earth or in a way a toll like this one could use.

    A tool could be made to work around the limiation but it would be a lot of work, and/or of dubious legality.

  27. Joost says:

    I really like this application. It enables me to plan and visualise the height of my bicycle trips.
    But as Google maps does not give route information for numerous eastern European countries, I have to use Bing maps for that region. Is there any way, or do you know an application or site that makes it possible to export and plot height data of Bing routes without an GPS device? (It has an option to send your route to your GPS)


  28. ehg says:

    just to let you know, Barry (altgough I believe you noticed it already yourself):
    using your tool “Multi Destination Routing Toolkit” with a multi direction link as this one here:
    and importing it as
    back to GoogleMaps/MyMaps then it will not save the route anymore but will save a map with yellow points describing the directions points (the “written directions”) only:
    Here the link to the saved route using your toolkit (saved to a MyMaps):

    BTW: I’m pretty sure it isn’t a problem of your toolkit but of any change on creating/rendering the kml file of a “get direction route”.
    Even if one tries to import the URL of a single direction route (adding before the parameter &output=kml) back to MyMaps the same happens:
    Here an single direction route:

    and here the imported MyMaps from this URL without using your toolkit:

    What gives GoogleMaps kml import on directions?

  29. Al says:

    Fantastic tool!!! I’ve saved all my walks for Rome.
    Thank you very much!

  30. crlinder says:

    Since the last comment was some time ago, I hope you’re still checking for comments here. I used your multi-destination script/tool for a custom bicycling map that I made in Google Maps. I was able to import the output in to the MyMaps feature of GM, but I no longer can see the route itself (normally visualized as a light purple line) and the overall distance of the route has been lost. Do you know if there is some means by which I can retain the route line and the route’s overall length?

    Thanks for your help AND for producing the script.