Let's say I want to export a Kepler map but I don't want the data embedded in the html file, I want the browser to download the layers from alternate URLs. Is that possible?
I can put URLs in the data dictionary like this...
mymap.save_to_html(data={'Tracts':"https://someplace/tracts.json",
'Mines':"https://someplace/stuff.json",
'Plants':"https://someplace/flowers.json"},
file_name="kepmap2.html")
but then when I load the file in my browser, in the console, I see an error that the data isn't a valid csv. I see in the source/network tab that it isn't downloading the files. It's erroring out because the url isn't a csv.
function S(e, t) {
var n, r;
if ("string" == typeof e) {
var a = (0,
u.csvParseRows)(e);
if (!Array.isArray(a) || a.length < 2)
throw new Error("process Csv Data Failed: CSV is empty");
r = a[0],
n = a.slice(1)
This is where it errors because e
is the url. The next bit of that code is
} else
Array.isArray(e) && e.length && (n = e,
r = t,
Array.isArray(r) || (r = e[0],
n = e.slice(1)));
so there's some thought to accept something other than a csv but I don't know js so other than seeing that it'll take a js Array, I'm lost.