{
const projectPoint = function(x, y){
var point = map.latLngToLayerPoint(new L.LatLng(y, x))
this.stream.point(point.x, point.y)
}
const transform = d3.geoTransform({point: projectPoint})
const geoPath = d3.geoPath().projection(transform)
const featureElement0 = svg.selectAll("path.china")
.data(china_json.features)
.enter()
.append("path")
.attr("stroke", "gray")
.attr("class", "china")
.attr("fill", d3.rgb(250, 250, 248))
.attr("fill-opacity", 1.);
const featureElement1 = svg.selectAll("path.azad")
.data([azad_kashmir_json])
.enter()
.append("path")
.attr("stroke", "gray")
.attr("class", "azad")
.attr("fill", d3.interpolateRdPu(0.75))
.attr("fill-opacity", 0.6);
const featureElement2 = svg.selectAll("path.jk")
.data([jammu_and_kashmir_json])
.enter()
.append("path")
.attr("stroke", "gray")
.attr("class", "jk")
.attr("fill", d3.interpolateRdPu(0.25))
.attr("fill-opacity", 0.6);
const featureElement3 = svg.selectAll("path.gilgit")
.data([gilgit_json])
.enter()
.append("path")
.attr("stroke", "gray")
.attr("class", "gilgit")
.attr("fill", d3.interpolateRdPu(0.75))
.attr("fill-opacity", 0.6);
const featureElement4 = svg.selectAll("path.siachen")
.data([siachen_json])
.enter()
.append("path")
.attr("stroke", "gray")
.attr("class", "siachen")
.attr("fill", d3.interpolateRdPu(0.25))
.attr("fill-opacity", 0.6);
const update1 = () => {
featureElement0.attr("d", geoPath)
featureElement1.attr("d", geoPath)
featureElement2.attr("d", geoPath)
featureElement3.attr("d", geoPath)
featureElement4.attr("d", geoPath)
}
update1()
map.on("moveend", update1)
}