chart = {
const width = 960,
height = 950;
const svg = d3.create("svg")
.attr("viewBox", [50, 50, width-100, height-100]);
const squareCanvas = svg.append('rect')
.attr('fill', d3.rgb(46,46,46))
.attr('x', 0)
.attr('y', 0)
.attr('width', 960)
.attr('height', 950)
var projection = d3
.geoMercator()
.fitSize([width - 50, height - 50], bb_test);
var path1 = d3.geoPath().projection(projection);
var path2 = d3.geoPath().projection(projection);
var path3 = d3.geoPath().projection(projection);
var path4 = d3.geoPath().projection(projection);
var path5 = d3.geoPath().projection(projection);
var path6 = d3.geoPath().projection(projection);
var g = svg.append("g").attr("id", "paths");
.style("stroke-width", '.5')
.style("stroke", "rgb(0,0,0)")
*/
g.selectAll("path2") //d3 geopath
.data(subline.features) //get data to define path
.enter() //there are more data than elements, this selects them
.append("path") //appends path to data
.attr('class','outlines')
.attr("d", path2) //The d attribute defines a path to be drawn, only applies to appended elements
.style("fill", "none")
.style('stroke-opacity','1')
.style("stroke-width", '.4')
.style("stroke", "rgb(255,255,255)")
g.selectAll("path3") //d3 geopath
.data(street.features) //get data to define path
.enter() //there are more data than elements, this selects them
.append("path") //appends path to data
.attr('class','outlines')
.attr("d", path3) //The d attribute defines a path to be drawn, only applies to appended elements
.style("fill", "none")
.style('stroke-opacity','1')
.style("stroke-width", '.25')
.style("stroke", "rgb(255,255,255)")
g.selectAll("path3") //d3 geopath
.data(footprint.features) //get data to define path
.enter() //there are more data than elements, this selects them
.append("path") //appends path to data
.attr('class','outlines')
.attr("d", path3) //The d attribute defines a path to be drawn, only applies to appended elements
.style("fill", "rgb(255,255,255)")
.style("fill-opacity", "0")
.style('stroke-opacity','1')
.style("stroke-width", '.55')
.style("stroke", "rgb(255,255,255)")
g.selectAll("path4") //d3 geopath
.data(fireBattalion.features) //get data to define path
.enter() //there are more data than elements, this selects them
.append("path") //appends path to data
.attr('class','outlines')
.attr("d", path4) //The d attribute defines a path to be drawn, only applies to appended elements
.style("fill", "none")
.style('stroke-opacity','1')
.style("stroke-width", '2.5')
.style("stroke", "rgb(255,255,255)")
g.selectAll("path5") //d3 geopath
.data(park.features) //get data to define path
.enter() //there are more data than elements, this selects them
.append("path") //appends path to data
.attr('class','outlines')
.attr("d", path5) //The d attribute defines a path to be drawn, only applies to appended elements
.style("fill", "rgb(255,255,255)")
.style("fill-opacity", "0.6")
.style('stroke-opacity','1')
.style("stroke-width", '.8')
.style("stroke", "rgb(255,255,255)")
svg
.append('text')
.attr('class','title')
.attr('x','270')
.attr('y','300')
.attr('front_family','Gill Sans')
.attr('front_size','lem')
.attr('front_weight','900')
.style("fill", "rgb(255,255,255)")
.text('Drone')
var c = svg.selectAll("circle") //d3 geopath
.data(firefightingdrone.features)
.enter() //there are more data than elements, this selects them
.append("circle") //appends path to data
.attr("cx", function(d) {return path1.centroid(d)[0]})
.attr("cy", function(d) {return path1.centroid(d)[1]})
.attr('r',3)
.attr('fill', "rgb(245,107,155)")
.style('full-opacity','1')
var c = svg.selectAll("circle") //d3 geopath
.data(linknyc.features)
.enter() //there are more data than elements, this selects them
.append("circle") //appends path to data
.attr("cx", function(d) {return path1.centroid(d)[0]})
.attr("cy", function(d) {return path1.centroid(d)[1]})
.attr('r',3)
.attr('fill', "rgb(255,255,255)")
.style('full-opacity','1')
return svg.node();
}