Changed Rajasthan's language from Marwari to Hindi
This commit is contained in:
49
index.js
49
index.js
@@ -11,7 +11,6 @@ const languages = {
|
|||||||
konkani: {name: "Konkani", color: "#9b7cff", code: "gom", districts: []},
|
konkani: {name: "Konkani", color: "#9b7cff", code: "gom", districts: []},
|
||||||
hindi: {name: "Hindi", color: "#d17cff", code: "hi", districts: []},
|
hindi: {name: "Hindi", color: "#d17cff", code: "hi", districts: []},
|
||||||
gujarati: {name: "Gujarati", color: "#7cffee", code: "gu", districts: []},
|
gujarati: {name: "Gujarati", color: "#7cffee", code: "gu", districts: []},
|
||||||
marwari: {name: "Marwari", color: "#7bc4c9", code: "mwr", districts: []},
|
|
||||||
oriya: {name: "Oriya", color: "#9bcc9f", code: "or", districts: []},
|
oriya: {name: "Oriya", color: "#9bcc9f", code: "or", districts: []},
|
||||||
bengali: {name: "Bengali", color: "#bf9a77", code: "bn", districts: []},
|
bengali: {name: "Bengali", color: "#bf9a77", code: "bn", districts: []},
|
||||||
punjabi: {name: "Punjabi", color: "#e84a35", code: "pa", districts: []},
|
punjabi: {name: "Punjabi", color: "#e84a35", code: "pa", districts: []},
|
||||||
@@ -40,7 +39,7 @@ const state2lang = {
|
|||||||
"Goa": languages["konkani"],
|
"Goa": languages["konkani"],
|
||||||
"Odisha": languages["oriya"],
|
"Odisha": languages["oriya"],
|
||||||
"Gujarat": languages["gujarati"],
|
"Gujarat": languages["gujarati"],
|
||||||
"Rajasthan": languages["marwari"],
|
"Rajasthan": languages["hindi"],
|
||||||
"Chhattisgarh": languages["hindi"],
|
"Chhattisgarh": languages["hindi"],
|
||||||
"Jharkhand": languages["hindi"], // DEFAULT
|
"Jharkhand": languages["hindi"], // DEFAULT
|
||||||
"West Bengal": languages["bengali"],
|
"West Bengal": languages["bengali"],
|
||||||
@@ -280,10 +279,8 @@ function drawMap(world) {
|
|||||||
d3.select(this).remove()
|
d3.select(this).remove()
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
.text(function(d) {
|
.each(function(d) {
|
||||||
if (stateOrDistrictOrLanguage(d) == "language") {
|
if (!stateOrDistrictOrLanguage(d) == "language") {
|
||||||
return "(" + d.properties.lang_name + ")";
|
|
||||||
} else {
|
|
||||||
d3.select(this).remove() // Only add this attribute if the element is a language
|
d3.select(this).remove() // Only add this attribute if the element is a language
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@@ -301,26 +298,26 @@ function drawMap(world) {
|
|||||||
.attr("font-size", "12px")
|
.attr("font-size", "12px")
|
||||||
.attr("fill", "black")
|
.attr("fill", "black")
|
||||||
.text("Hello, Map!");
|
.text("Hello, Map!");
|
||||||
// for (const [langId,lang] of Object.entries(languages)) {
|
// for (const [langId,lang] of Object.entries(languages)) {
|
||||||
// let geojson = {
|
// let geojson = {
|
||||||
// "type": "FeatureCollection",
|
// "type": "FeatureCollection",
|
||||||
// "features": lang.districts
|
// "features": lang.districts
|
||||||
// };
|
// };
|
||||||
//
|
//
|
||||||
// let outerBound = getOuterBoundaryPolygon(geojson.features)
|
// let outerBound = getOuterBoundaryPolygon(geojson.features)
|
||||||
// outerBound["id"] = "lang" + lang.name
|
// outerBound["id"] = "lang" + lang.name
|
||||||
// outerBound.properties["lang_name"]= lang.name
|
// outerBound.properties["lang_name"]= lang.name
|
||||||
// outerBound.properties["lang_code"]= lang.code
|
// outerBound.properties["lang_code"]= lang.code
|
||||||
// allLangs.push(outerBound);
|
// allLangs.push(outerBound);
|
||||||
|
//
|
||||||
// svg.append("path")
|
// svg.append("path")
|
||||||
// .datum(outerBound)
|
// .datum(outerBound)
|
||||||
// .attr("d", path)
|
// .attr("d", path)
|
||||||
// .attr("fill", "none")
|
// .attr("fill", "none")
|
||||||
// .attr("stroke", "red")
|
// .attr("stroke", "red")
|
||||||
// .attr("stroke-width", 2)
|
// .attr("stroke-width", 2)
|
||||||
// }
|
// }
|
||||||
// console.log(JSON.stringify(allLangs))
|
// console.log(JSON.stringify(allLangs))
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user