Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Can anyone tell me how I could add the functionality as seen on google maps that allow users to specify a URL to a KML file in the search bar?

I would like to include this in my own embedded map but I'm really lost on how to execute it.

I've seen examples for KML URL search on other sites but they don't seem to work. Maybe google has dropped this feature from embedded maps/api3 maps?

share|improve this question
seems it is removed from Google Maps - the main search still retrieves kml example search:'airspace filetype:kml' – Mapperz Dec 14 '12 at 14:54
That's a shame, really need a feature like this for an app I'm trying to put together. The weird thing is that I was able to add the url of the kml file I wanted to use in google maps main search bar and it retrieved the data without any issue. I guess it must have just been dropped from the API. Do you know of any other "fairly simple" way to allow users to add a kml file to an embedded map. I would have no problem adding server side scripts to do it and having a button on the map execute the upload I just don't know what I would need to do it. – Vincent Dec 14 '12 at 15:28

You can use an iframe:

<iframe width="425" height="350" frameborder="no" scrolling="no" marginheight="0" marginwidth="0" src=",7.299728&output=embed&s=AARTsJotOehFyV7Ld4EHPP1WtrZKl2G9Tw"></iframe>

Examples: Google Maps Google Maps + KML

share|improve this answer

You can open up data that you want for your own map into QGIS and then convert it to KML through QGIS before saving it to your computer. Then, while opening Google Earth, you can upload and then add your new map data as a new layer

share|improve this answer
Welcome to GIS SE! Unfortunately, I think that your QGIS/Google Earth Answer does not directly address the Question which is about Google Maps. Hopefully, people will not downvote this while you are new to the site but if they do I hope you will see that as a "lesson learned". – PolyGeo Feb 28 '14 at 0:03

The API gives you the KmlLayer class, which "creates a KmlLayer which renders the contents of the specified KML/KMZ file". Just pass the URL you're given in the KmlLayerOptions.

share|improve this answer

All I do is add my kml/kmz url as an argument to google maps ... like this:

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.