Widget:PlaceNamesNavigationMapEnglish: Difference between revisions

From International Robin Hood Bibliography
mNo edit summary
mNo edit summary
Line 137: Line 137:
var PNs = res.query.results;
var PNs = res.query.results;
for (var key in PNs) {
for (var key in PNs) {
var admdiv = PNs[key].printouts.Pnadmdiv[0];
var admdiv = PNs[key].printouts.AdmDiv[0];
var interest = PNs[key].printouts.Pninterest[0];
var interest = PNs[key].printouts.Pninterest[0];
var admdivObj = d.counties[admdiv];
var admdivObj = d.counties[admdiv];
Line 158: Line 158:
fetch(url).then(res => res.json()).then((jsnCty) => {
fetch(url).then(res => res.json()).then((jsnCty) => {
calcCounties(jsnCty);
calcCounties(jsnCty);
url = "/wiki/api.php?action=ask&query=[[Category:English%20place-names]]|?Pninterest|?Pnadmdiv|sort=Pnadmdiv&format=json";
url = "/wiki/api.php?action=ask&query=[[Category:English%20place-names]]|?Pninterest|?AdmDiv|sort=AdmDiv&format=json";
fetch(url).then(res => res.json()).then((jsnPN) => {
fetch(url).then(res => res.json()).then((jsnPN) => {
calcPlaceNames(jsnPN);
calcPlaceNames(jsnPN);

Revision as of 14:37, 5 January 2021

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