Widget:PlaceNamesChoropleths: Difference between revisions

From International Robin Hood Bibliography
mNo edit summary
mNo edit summary
Line 256: Line 256:
m.prepareMap = function() {
m.prepareMap = function() {
//var mp = get(m.curMap);
var mp = get(m.curMap);
var mp = get("choroMap");
var width = 496, height = 550;
var width = 496, height = 550;
var projection = d3.geo.conicEqualArea().scale(5165.269352442655).center([-1.4602454263940616,52.55675714793008]).parallels([49.95898294542323,55.81107189358492]).rotate([1.4602454263940616]).translate([202.798519176517,306.70813464248357]);
var projection = d3.geo.conicEqualArea().scale(5165.269352442655).center([-1.4602454263940616,52.55675714793008]).parallels([49.95898294542323,55.81107189358492]).rotate([1.4602454263940616]).translate([202.798519176517,306.70813464248357]);
Line 381: Line 380:
n.toggleNav = function() {
n.toggleNav = function() {
var t = event.target.id;
get("choroMapLegend1").innerHTML = choroLegend[n.choroVar].s1;
if (t === "nmnChoro") {
get("choroMapLegend2").innerHTML = choroLegend[n.choroVar].s2;
get("choroMapLegend1").innerHTML = choroLegend[n.choroVar].s1;
get("choroMapLegend3").innerHTML = choroLegend[n.choroVar].s3;
get("choroMapLegend2").innerHTML = choroLegend[n.choroVar].s2;
get("choroMap").style.display = "block";
get("choroMapLegend3").innerHTML = choroLegend[n.choroVar].s3;
get("choroMapLegend").style.display = "block";
get("choroMap").style.display = "block";
m.curMap = "choroMap";
get("choroMapLegend").style.display = "block";
}
if (t === "nmnChoro") {
m.curMap = "choroMap";
}
m.initMap();
m.initMap();
};
};

Revision as of 10:58, 2 June 2019

This widget displays the navigation map on country and administrative division landing pages in the place-names section of IRHB. It takes no parameters.