Widget:Test1: Difference between revisions
From International Robin Hood Bibliography
mNo edit summary |
mNo edit summary |
||
Line 274: | Line 274: | ||
m.prepareMap = function() { | m.prepareMap = function() { | ||
var mp = w.get(m.curMap); | var mp = w.get(m.curMap); | ||
var width = 496, height = 550; | var width = 496, height = 550; | ||
d3.xml("/wiki/geo/england/country/England.svg").mimeType("image/svg+xml").get(function(error, xml) { | |||
d3.xml("/wiki/geo/england/country/England.svg") | |||
if (!error) { | if (!error) { | ||
if (mp.childNodes.length !== 0) { | if (mp.childNodes.length !== 0) { | ||
mp. | mp.innerHTML = ""; | ||
} | } | ||
mp.appendChild(xml.documentElement); | |||
mp.firstChild.style.display = "block"; | mp.firstChild.style.display = "block"; | ||
} else { | } else { | ||
throw error; | throw error; | ||
} | } | ||
}); | }); |
Revision as of 17:24, 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.