diff --git a/index.js b/index.js index ac05163..a89d6c3 100644 --- a/index.js +++ b/index.js @@ -259,9 +259,15 @@ function drawMap(world) { .attr("text-anchor", "middle") .attr("font-size", "12px") .attr("fill", "black") - .attr("class", "districtText") - .attr("id", d => d.properties.district+"Text") - .text(d => d.properties.district); + .attr("class", "languageText") + .attr("id", d => d.properties.lang_name+"Text") + .text(function(d) { + if (stateOrDistrictOrLanguage(d) == "language") { + return d.properties.lang_name; + } else { + return d.properties.district; + } + }); let allLangs = []