I am trying to load a KML file into my Openlayers map. I added the following line of Code to my JS file and it throws an error. My map won't even load after I add this line:
var layer = new OpenLayers.Layer.GML("KML", "kml/mykml.kml", {format: OpenLayers.Format.KML});
I copied it from here and just changed the path to the KML file to match my own. It seems like plenty of people out there are using it just fine. What am I missing?