Industry guru Dave Taylor offers tech support on technical and business topics, including iPhone, iPod, Microsoft Windows, Sony PSP, cellphones, online advertising, CSS, Web design, business, Unix, Linux, SEO, Mac OS X, and shell script programming.     


How do I import a KML data file into Google Maps?

We hired a company to produce a Google Maps data file so we could produce a custom map of all our business office locations across the United States and they supplied us with a XML data file. I have no idea what to do next. Help!


Dave's Answer:

I'm surprised that they haven't offered you even rudimentary directions, but it's okay, I've got your geoback. :-) First off, though, I hope that it's actually a KML map file that's written in XML compliant language rather than an XML file, per se. KML is "Keyhole Markup Language" and it's named after the company that created the geographic specific language.

Anyway, you probably don't care about that!

Your first step is to go to Google Maps and make sure you're logged in to your Google account. if you don't have one, create one. How to tell? On the top right it'll either say "Sign in" or it'll show your email address if you are logged in.

Once you are logged in properly, you'll see the following:

google maps my maps

Click on "My Maps" and you'll see a list of maps you've already created (if any) and the all-important "Create new map" link:

google maps create new map

Choose that (no surprise!) and it'll give you an area where you can name your map, add a description and, when you're ready, an "Import" link:

google maps create new map title

When you choose to import a Google Maps data file, it'll give you the option of specifying the map's location online with a URL or finding one that you want to upload from your computer:

google maps import kml data file

Click on "Choose file" and it'll pop up a standard choose file dialog window (this is on a Mac, but a Windows PC works the same):

google maps import kml data choose file

Once I've picked the file I want to upload (a file that ends with ".kml") I click on "Choose" and now I'm back to the Google Maps dialog window again, but this time the file name shows up:

google maps import kml data file chosen

That's good. Click on "Upload from File" and, depending on how big the file is, it'll complete in a few seconds or a minute or more, with the next action being it displaying you a map with all the data points plotted:

google map with data points

On the left side underneath the fields where you can enter a title and description for the map it now shows a list of the imported data points with any descriptive material included in the KML file:

google map custom data points

Last step. Find the "Done" button and click it and you have a public custom Google Maps file with all the information easily accessible:

google map custom my maps

I hope that gives you all the information you need to get this working!

In a different set of blog entries I'll explain how to turn addresses into Latitude/Longitude information, then you can pour that manually into a KML file, as I'll also explain. Stay tuned for that!


More Useful HTML, JavaScript and Web Site Programming Articles:
✔   How to Create Predefined Google Image Search Links?
Thanks for the Amazon URL [see Creating Amazon Search Links]. That worked beautifully. In fact, I sent you $5.00 for coffee in thanks....
✔   Can I embed a Facebook search box on my blog site?
I've seen your articles about how to add a Twitter or Google search box on a Web page, but I have a tougher...
✔   Can I use CSS for drop shadows on my blog?
I want to give my site a bit of a facelift and add some neat graphical elements. One of which is drop shadows....
✔   How can I embed interactive photo panoramas on my site/blog?
I read through your blog entry about how to take panoramic photos with iOS 6 and an iPhone 5 and got enthused. I've...
✔   How can I create a Twitter search URL shortcut?
I'd like to add a few Twitter search links to my Web site. Is that possible, or does Twitter prohibit this sort of...

Let's stay in touch!
Sign up for my weekly AskDaveTaylor Newsletter and you'll receive even more tech and gadget help right to your inbox, along with exclusive news and industry updates. It's good stuff. I promise!
    Enter your name: and your email addr:  





Categorized: HTML, JavaScript and Web Site Programming   (Article 8846, Written by )
Tagged: custom maps, geocaching, geomapping, google maps
Previous: What is Google Voice?
Next: Prince of Persia Walkthrough II: Defeating the Hunter




Reader Comments To Date: 23

John Everett said, on July 18, 2009 6:49 AM:

Hey Dave, thanks for the easy step by step, it is just what I was looking for.

adolfo said, on January 27, 2010 4:12 PM:

this is great, but, how do i import to a gmap, bulk addresses that have no longitude or latitude, but only the plain mailing address ??
Thanks Dave

pegazoo said, on January 29, 2010 6:34 PM:

Thanks M8! Very usefull!

Dave Taylor said, on January 29, 2010 9:38 PM:
Graham said, on April 15, 2010 9:43 AM:

Perfect. Thanks for posting this.

Robin Hillyard said, on April 20, 2010 1:25 PM:

This is a good write-up and it works when the file I import has a Placemark with coordinate data. Unfortunately, it doesn't work for me when the content of the KML file is a NetworkLink element, which indirectly points to a KML file with actual Placemark coordinates in it. Do you know of any specific circumstances which will cause it to fail? [there's no kind of error message - it just imports nothing at all and then waits for ever].

Alex Chen said, on July 19, 2010 11:24 AM:

Very helpful. It worked once, but when I tried again, it seemed only to import part of the KML file. The entire file is 132KB, and I have imported completely into Google Earth. There are about 268 intersections in alphabetical order that I want to map, and it seems to only import through the Ls. Suggestions would be appreciated.

Robert Hamilton said, on March 6, 2011 7:42 AM:

Thank you for this post, very helpful and saved me a lot of time.
Cheers

carlos said, on April 12, 2011 9:46 AM:

Thanks Dave it was very helpful

Roland said, on June 9, 2011 10:56 AM:

Good work. This tutorial made it easy. Just had to convert the shp file in arcmap to a kmz. (That's in the arccatalog toolbox under conversion tools in arc 10)

José Martins said, on June 14, 2011 5:10 PM:

This is very good, finally I can relate between google earth and google maps ! I've searched for quite a while and found nothing so good as this! Very clear..

Congrats.

I only have a question is it possible to put a link in the markers? instead of the ballon when we click?

Thank you.
Greetings from Portugal.
José.

rajan said, on August 28, 2011 11:58 PM:

this is excellent. very clearly explained.
Thanks

Nuar Haruha said, on September 24, 2011 10:29 PM:

Thanks Dave, this really solved my problem. I'm trying to import my picasa web album maps (KML) to google maps. I read the guide from maps.google & mapmaker.google without failed and end up here. *sigh*

comephorus said, on September 29, 2011 9:55 AM:

Thx, nice Turt

Another way is to import the KML file with this tool http://www.geocontext.org/publ/2010/04/profiler/en/

kootzie said, on November 18, 2011 2:03 PM:

WoW! Cool. I feel silly not having seen the import knob... my radar is usually pretty good

I searched around and most of the links/advice predates the evolution of the opposable thumb and basically say it can't easily be done

One supercool tool I used to convert from survey coordinates to KMZ is at: http://www.gpsvisualizer.com/map_input?form=googleearth

thanks!!

interface said, on April 11, 2012 4:41 AM:

Hello please can you help integrate something like that : http://locator.standardbank.co.za/Default.aspx
In my website???

Thanks

angel said, on April 25, 2012 11:16 PM:

Hi,
Is there a way to view the site information like site name in the map view rather than on the left side? Thanks

ilbarda said, on April 27, 2012 4:52 AM:

THANK YOU very much, simple and efficient (but now that you told me!!!) - Great job, you deserve more than a cup of coffee, a double italian Expresso imo ;)

Keith O'Brien said, on May 21, 2012 12:54 PM:

With respect to uploading points to Google Maps - this 5 minute tutorial should prove informative: http://www.youtube.com/watch?v=LEsTQkRCqnw

Karoly said, on November 9, 2012 4:31 AM:

Hey Dave, it's cool, it worked to the perfection :-) TNX!

Janagiaman said, on January 22, 2013 2:44 AM:

Google maps ,,,,,,,,m r w

David said, on February 17, 2013 2:05 PM:

Thanks man, after spending 1/2 hour looking around internet at temp programs I found your tutorial. Perfect. :-)

Thank you

Rk said, on March 7, 2013 12:18 AM:

Overlay KML easily on Google Maps

http://www.etechpulse.com/2013/03/how-to-open-kml-file-on-google-maps-in.html

I hope this will be helpful.

Starbucks coffee cup I do have a lot to say, and questions of my own for that matter, but first I'd like to say thank you, Dave, for all your helpful information by buying you a cup of coffee!

I do have a comment, now that you mention it!











I will never send you any unsolicited email. Ever.






Check This Out Too...

 
Look for Answers
Need Help? Ask Dave Taylor!


Follow Me on Pinterest

Find Me on Google+
ADT on G+
© 2002 - 2013 by Dave Taylor. All Rights Reserved.

Note: This web site is for the purpose of disseminating information for educational purposes, free of charge, for the benefit of all visitors. We take great care to provide quality information. However, we do not guarantee, and accept no legal liability whatsoever arising from or connected to, the accuracy, reliability, currency or completeness of any material contained on this web site or on any linked site. Further, please note that by submitting a question or comment you're agreeing to my terms of service, which are: you relinquish any subsequent rights of ownership to your material by submitting it on this site. My lawyer says "Thanks".
"Ask Dave Taylor®" is a registered trademark of Intuitive Systems, LLC.