Widget:Test1: Difference between revisions
From International Robin Hood Bibliography
mNo edit summary |
mNo edit summary |
||
Line 249: | Line 249: | ||
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"); | ||
d3.json("/wiki/geo/england/country/England.json",function(error,geodata) { | d3.xml("/wiki/geo/england/country/England.svg",function(error,geodata) { | ||
//d3.json("/wiki/geo/england/country/England.json",function(error,geodata) { | |||
if (!error) { | if (!error) { | ||
features.selectAll("path").data(geodata.features).enter().append("path").attr("d",path).on("mouseover",showTooltip).on("mousemove",moveTooltip).on("mouseout",hideTooltip).on("click",clicked); | features.selectAll("path").data(geodata.features).enter().append("path").attr("d",path).on("mouseover",showTooltip).on("mousemove",moveTooltip).on("mouseout",hideTooltip).on("click",clicked); |
Revision as of 15:54, 22 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.