{
let containerDiv = document.getElementById("viz-container");
return new gviz.App(containerDiv)
.setGeoCenter({ x: 4000000, y: 2960000 })
.setZoomFactor(2000)
.addMultiScaleTiledCSVGridLayer(
[1000, 2000, 5000, 10000, 20000, 50000, 100000],
(r) =>
"https://raw.githubusercontent.com/jgaffuri/tiledgrids/main/data/europe/population/" +
r +
"m/",
gviz.LegoStyle.get("2018", {
tFun: (v, r, s, zf) => gviz.sExpRev((v - s.min) / (s.max - s.min), -7)
}),
{
pixNb: 10,
cellInfoHTML: (c) => "<b>" + c["2018"] + "</b> inhabitant(s)"
}
);
}