Closed Arsakes closed 8 years ago
Yes, it's a browser limitation see #44 ;)
Well I've "fixed it". I simply modified to KML.js file to replace local paths (and only them) with base url of doc.kml + relative name. It works.
Edit: Plus I'm using node.js server so I'don't think this is related to the issue of local files in xmlhttprequest requests problem.
How exactly are requestes for urls referenced by main doc.kml resolved?
@Arsakes nice, maybe you can provide a pull request if you think your patch would be useful to others users ?
@brunob Yea, I could - but I think I need to dig deeper into it. It works - but now I'm not sure if this is really the way it supposed to work :)
If you put in local paths in href's in kml file, the library cannot read them proprley since it treats all urls the same way (as absolute paths/urls).
I.e if i put my doc.kml file in
/data_files/doc.kml
anddoc.kml
has field<href>a.png</href>
field the library will try to load./a.png
instead/data_files/a.png