Widget:PlaceNamesNavigationMapEnglish: Difference between revisions

From International Robin Hood Bibliography
mNo edit summary
mNo edit summary
Line 1: Line 1:
<noinclude><div class="no-img">This widget displays the navigation map on country and administrative division landing pages in the place-names section of IRHB. It takes no parameters.</div></noinclude><includeonly><div id="navMapNav"></div><script>
<noinclude><div class="no-img">This widget displays the navigation map on country and administrative division landing pages in the place-names section of IRHB. It takes no parameters.</div></noinclude><includeonly><div id="navMapNav"></div><script>
//Utility
//Utility
/*
1) Go to maximized map (and return)
2) Map tiles sometimes no longer shown after navigating away from tab and back again
SOLUTION: resixe 1px and back again to get framework to recenter map
3) GENERAL PROBLEM ON SITE: NLS tiles displayed before OpenStreetMaps
?SOLUTION: setting layer visibility:hidden in css
4) "Place-names choropleths" page must show new maps and get table data from SMW
Utility.
*/
( function() {
( function() {
Line 260: Line 251:
svg.attr("width", targetWidth);
svg.attr("width", targetWidth);
svg.attr("height", Math.round(targetWidth / aspect));
svg.attr("height", Math.round(targetWidth / aspect));
container.attr("height", Math.round(targetWidth / aspect));
}
}
}
}
Line 398: Line 390:
get("choroMap").style.backgroundColor = "#f2f2f2";
get("choroMap").style.backgroundColor = "#f2f2f2";
};
};
 
//function keepLeafletMapFocused() {
//get("map_leaflet_1")
//}
n.toggleNav = function() {
n.toggleNav = function() {
Line 419: Line 406:
get("map_leaflet_1").style.display = "block";
get("map_leaflet_1").style.display = "block";
w.maps.resizeMaps();
w.maps.resizeMaps();
//keepLeafletMapFocused();
} else if (t === "nmnNav") {
} else if (t === "nmnNav") {
get("navMap").style.display = "block";
get("navMap").style.display = "block";
Line 467: Line 453:
     script.type = 'text/javascript';
     script.type = 'text/javascript';
     script.src = "https://www.irhb.org/wiki/js/d3js/d3.v3.min.js";
     script.src = "https://www.irhb.org/wiki/js/d3js/d3.v3.min.js";
    //script.onreadystatechange = w.map.initMaps;
     script.onload = w.nav.prepareNav;
     script.onload = w.nav.prepareNav;
     document.head.appendChild(script);
     document.head.appendChild(script);

Revision as of 19:43, 25 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.