Widget:PlaceNamesNavigationMapEnglish: Difference between revisions
From International Robin Hood Bibliography
mNo edit summary |
mNo edit summary |
||
Line 39: | Line 39: | ||
var m = w.map, w = w.utility, get = w.get; | var m = w.map, w = w.utility, get = w.get; | ||
var tooltip, features, zoom, tooltipOffset; | var tooltip, features, zoom, tooltipOffset; | ||
m.curMap = false; | |||
m.initNavMap = function() { | m.initNavMap = function() { | ||
Line 45: | Line 46: | ||
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]); | ||
var path = d3.geo.path().projection(projection); | var path = d3.geo.path().projection(projection); | ||
var svg = d3.select("div#" + curMap).append("svg").attr("width", width).attr("height", height); | var svg = d3.select("div#" + m.curMap).append("svg").attr("width", width).attr("height", height); | ||
features = svg.append("g").attr("class","features"); | features = svg.append("g").attr("class","features"); | ||
tooltip = d3.select("body").append("div").attr("class","ttip"); | tooltip = d3.select("body").append("div").attr("class","ttip"); | ||
Line 109: | Line 110: | ||
var choroCountShown = false, choroAreaShown = false, choroPopAreaShown = false; | var choroCountShown = false, choroAreaShown = false, choroPopAreaShown = false; | ||
var choroVariant = "count"; | var choroVariant = "count"; | ||
n.prepareNav = function() { | n.prepareNav = function() { | ||
Line 159: | Line 160: | ||
} | } | ||
if (t === "nmnNav") { | if (t === "nmnNav") { | ||
curMap = "navMap"; | m.curMap = "navMap"; | ||
} else if (t === "nmnChoro") { | } else if (t === "nmnChoro") { | ||
curMap = "choroMap"; | m.curMap = "choroMap"; | ||
} | } | ||
if (t !== "nmnOverview") { | if (t !== "nmnOverview") { |
Revision as of 12:59, 17 May 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.