More About My Maps, KML and Mashups
Darren McEntee writes, about my post about using Google My Maps KML in mashups,
Can you please add a small piece of info in regards how to add a KML file to Google My Maps? I have tracked some past trips of mine via GPS, and saved a few KML files on my server, but I would really like to add my trips to the Google My Maps. If you have time please post this information. I can not find much data on the net about this.
There are people more qualified to deal with this question, and maybe they’ll even post in the comments, but here’s my stab at it:
Darren has it backwards, I think: My Maps is a way of creating KML easily, and storing it, not of displaying it. He doesn’t need it: he’s already created the KML and uploaded it to his server. What he’s looking for is a way to present it, and there are several options for that. A simple link on a web page would allow people to view his KML in Google Earth, and would also get him indexed by Google.
But the point of the entry Darren referenced was that you could integrate a KML file made with My Maps into a mashup, because the Google Maps API reads KML as a map layer. Just add the following code — after
var map(); but before
var geoXml = new GGeoXml("http://server.com/dir/file.kml");
Darren doesn’t need My Maps to show his trips; he can do it on his own web page.
What am I missing?