blankblank blank




Export Google Maps MyMaps Data As KML



Google Maps MyMaps feature lets you create and save simple maps (lines and points), and share them with the world. But the sharing is done through a network link, not through a stand-alone KML file, and you can’t save the data directly to your computer. The GMaps tips website offers a simple way to save a stand-alone KML file of your MyMaps map:

1. Create the map.

2. Right-click on the “View In Google Earth” link, and copy the link address; paste it into a text editor:

http://maps.google.com/maps/ms?ie=UTF8&hl=en&vps=1&jsv=206b&msa=0&output=nl&msid=106563725672137103118.00047ef5a12bca4f8b665

3. Change “output=nl” to “output=kml”

http://maps.google.com/maps/ms?ie=UTF8&hl=en&vps=1&jsv=206b&msa=0&output=kml&msid=106563725672137103118.00047ef5a12bca4f8b665

4. Paste the modified link address into your browser’s address bar, and go to it; depending on how your browser preferences are set, you’ll either save the KML file for your map to your standard download directory, or it will open in Google Earth. In the latter case, right-click on the KML entry in the View pane at left, select “Save As”, and choose a name and location to save it in.

Useful if you’re stuck using Google  MyMaps, maybe because of its collaboration options. If you don’t need to collaborate,  Scribblemaps and Scribblemaps Pro offer direct KML export and have a much greater selection of drawing tools than Google MyMaps.

12/28/2010: Original method doesn’t work anymore, as the “View In Google Earth” link shows up very briefly, then disappears in favor of viewing the data in the Google Earth plugin in your browser. But you can still get it to work with a slight revision. Instead of right-clicking on the “View In Google Earth” link, do that on the “Link” in the upper-right-hand corner, then copy and paste that into a text editor. Then insert “&output=kml” (no quotes) before “&msid” in the link text. Copy and paste that modified link into your browser, and it will work as advertised.


Looking for something else? Enter some keywords below, then click "Search".    




5 Responses to “Export Google Maps MyMaps Data As KML”


  1. 1 johny why

    hi… this method no longer seems to work– there’s no “View in Google Earth” link anymore.
    i saw the “View in Google Earth” link flash by for 1/2 second, but then it disappeared.

  2. 2 Leszek Pawlowicz

    Yup, the original method doesn’t work any more; they’ve replaced that “View” link with the option to view the data directly in the browser with the Google Earth plugin. I’ve modified the post to revise the technique slightly so that it will work.

  3. 3 Johny why

    Thanks!

    Scribble is powerful, but it requires Flash to display the maps.

    I would not say “stuck in My Maps”– My Maps is the best tool of it’s kind that I’ve found yet, for simplicity, browser-compatibility, and ease-of-use in a code-free, no-programming, no-install map maker. These are the priorities on our project. Please let us know if you find something better.

    Note, if you need a dynamic kml, which always reflects new changes to MyMaps, just use the kml link created with this method, instead of downloading a file.

  4. 4 Johny why

    Also, free Scribble is loaded with tons of advertising in the free version. Not My Maps.

  5. 5 Sarah

    Numbers 1-4, & 6-15 will be useful.
    How to Export Data in XML from Google Maps.

    This goes through the steps to take points directly off Google Maps. However, exporting trails, roads, and your own placed point data should be a close derivative of these steps.

    1.Go to Maps.Google.com
    2.Zoom into the area of detail desired.
    3.In left column of map (if not visible click on blue pullout arrows “>>”) click on “MyMaps”, then click the “Get Started” button.
    4.Name the map, and in the “search maps” bar above the map type the name of the feature you are looking for (e.g. wineries, schools, etc.) also notice that there is the blue push pin that you may place wherever you would like. Also, the line feature, where you can also choose roads, or draw in your own line.
    5.After all the points populate the map (if you are using this data to add to your MyMap), for example if you entered “wineries” and the all the wineries for this area show up in the map view, click on one.
    6.When the bubble pops up, click “save to” and choose the MyMaps you would like to add the point to. Doing this saves the point to your map
    7.After you have saved all the points you would like to your map, go to the”MyMaps” link in the left column, and choose the map.
    8.All the points (and other feature types, if you have placed those as well) will show up in the left column. Also, a new link in the right section of the upper bar called “View in Google Earth.”
    9.Right click on the new link, “View in Google Earth.”
    10.After you right click on the new link, “View in Google Earth,” a box with options will pop up. Choose, “Copy Link Location.” This will copy the map’s link to the clip board.
    11.Open a text editor, like Notepad, and paste the new link. (e.g. http://maps.google.com/maps/ms?source=s_q&hl=en&aq=0&ie=UTF8&rq=1&ev=zi&split=1&vps=3&jsv=310c&msa=0&output=nl&msid=205146905029723981769.00049bccb74d2cf6d6f07)
    12.Change the output type from “nl” to “kml” (compare link from above with link below)
    13.Copy and paste this modified link into a new brower window (e.g. http://maps.google.com/maps/ms?source=s_q&hl=en&aq=0&ie=UTF8&rq=1&ev=zi&split=1&vps=3&jsv=310c&msa=0&output=kml&msid=205146905029723981769.00049bccb74d2cf6d6f07)
    14.When you open this new link, choose to save the file, and save it in a folder, and name it appropriately, e.g. Wineries.kml
    15.Copy this new KML file, and paste the copy into the same folder, and rename the extension “.xml.” Now you can open the XML file in Microsoft excel. You may need to choose “Read Only” but try the other option first.
    16.Based on the formatting of the new XML/Excel file, you may need to clean up the coordinate columns. Since the coordinates all fall into one column (X,Y,Z), I went to the original .txt file in Notepad, deleted all text except for the coordinates, and ended up with a text file that looked like this:
    -123.498688,48.463818,0.000000
    -123.498688,48.463818,0.000000
    -123.321533,48.426468,0.000000
    -123.375092,48.458351,0.000000
    -123.332520,48.475655,0.000000
    -123.431396,48.553886,0.000000
    -123.441010,48.562069,0.000000
    -123.553619,48.521152,0.000000
    -123.410797,48.565704,0.000000
    -123.425903,48.597500,0.000000…
    Copy the text in your newly edited Then go back to the XML/Excel file, insert a new sheet, where you will have the option to paste special with comma space delimited values. All fields should get their own columns, so you should have 3 columns. Copy the pasted columns. Then in the original XML/Excel sheet, delete the coordinates’ column (where they all fall into the same column), and paste the new coordinates appropriately. Make sure the new column was placed with one row at the top empty so you can give the columns a name (lat, lon, elev). In my case, the elev came in at 0.0000 for all records, so I deleted this column, and just have an x and y value for each record. Also, the column names must not have symbols in them!!

    17.Copy the content of the excel spreadsheet, and paste it into a black notepad file

Comments are currently closed; feel free to contact me with questions/issues.