I have a map on my website and I'd like to make some paths on it from kml files. I found geoxml3, and I have this code:
<script type="text/javascript" src="geoxml3.js"></script>
<script type="text/javascript">
var geoXml = null;
var map = null;
var myLatLng = null;
function initialize() {
var mapOptions = {
//stuff
};
map = new google.maps.Map(document.getElementById("map_canvas"), mapOptions);
geoXml = new geoXML3.parser({
map: map
});
geoXml.parse('paths/path1.kml');
};
</script>
It's from the documentation sample. Now I want to retrieve the path by accessing some property of geoXml
, but my browser's debugger claims it's undefined, even though the markers that define the points of the polyline from the kml file show up on the map. How do do draw a path from a file, not necessarily using this method?
Here's the file:
http://pastebin.com/R1PsuumL
I want to create the path from the coords in Folder/Placemark/LineString/coordinates
.