Hello everyone! Can anyone guide me on how to assign the file URL location to a variable in JavaScript?
NgMap.getMap().then(function (map) {
$scope.map = map;
var myParser = new geoXML3.parser({ map: map });
myParser.parse('cta.kml');
});
I noticed that myParser.parse function only accepts URLs, not variables. Is there a way to work around this?
var result = "<?xml version="1.0" encoding="UTF-8"?>
<kml xmlns="http://earth.google.com/kml/2.1">
<!-- Data derived from:
Ed Knittel - || tastypopsicle.com
Feel free to use this file for your own purposes.
Just leave the comments and credits when doing so.
-->
<Document>
<name>Chicago Transit Map</name>
<description>Chicago Transit Authority train lines</description>
<Style id="blueLine">
<LineStyle>
<color>ffff0000</color>
<width>4</width>
</LineStyle>
</Style>
<Style id="redLine">
<LineStyle>
<color>ff0000ff</color>" ........ and so forth...
Any insights on how I can make myParser.parse accept the 'result' variable?
Currently, I'm making use of ngMap for this functionality.