Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

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
add comment

2 Answers

You can use an iframe:

<iframe width="425" height="350" frameborder="no" scrolling="no" marginheight="0" marginwidth="0" src="http://maps.google.fr/maps?f=q&hl=fr&geocode=&q=nice&ie=UTF8&z=11&iwloc=addr&om=1&ll=43.76068,7.299728&output=embed&s=AARTsJotOehFyV7Ld4EHPP1WtrZKl2G9Tw"></iframe>

Examples: Google Maps Google Maps + KML

share|improve this answer
add comment

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 at 0:03
add comment

Your Answer

 
discard

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.