map2 = bertin.draw({
params: {
projection: d3.geoOrthographic().rotate([103, 0]),
extent: TL2,
margin: 10
},
layers: [
{
geojson: borders,
tooltip: "$disc",
stroke: "black",
tooltip: ["Discontinuity", "$disc"],
strokeWidth: {
type: "linear",
fixmin: true,
values: "disc",
k: 20,
leg_x: 20,
leg_y: 200,
leg_round: 1,
leg_title: `Relative discontinuites
at borders (gdpppc 2018)`
}
},
{
geojson: data,
tooltip: ["$name", "$gdppc2018"],
fill: {
type: "choro",
values: "gdppc2018",
colors: "RdYlGn",
nbreaks: 6,
leg_round: 0,
leg_x: 20,
leg_y: 20,
leg_title: "GDP per capita in 2018"
},
stroke: "white",
strokeWidth: 0.4
},
{
type: "shadow",
geojson: TL2
},
{
geojson: others,
fill: "#CCC",
stroke: "none"
},
{ type: "outline" },
{ type: "graticule" },
{
type: "scalebar"
}
]
})