Code to open a kml file automatically in Google Maps

Don’t know if we’ve got any other map geeks here, but I gots a question.

I want to put hundreds of kml files on a website. I know you can embed a Google Map into a website, but I don’t want to do this because of the sheer number of kml files I want to post. Rather, I want people to be able to click on the file name and be sent directly to Google Maps, all the features in the file automatically loaded.

Is there code that will enable this?

crosses fingers

Looks like you can do something similar in JavaScript with Google’s APIs. Take a look at this example and see if you can adapt that to your use, maybe by way of an iframe. It’s not exactly taking people to Google Maps, but you could definitely have the hundreds of KML links there, only loading them when the user clicks.