montanaMap = () => map({
width: largeMapWidth(),
height: largeMapWidth() * 0.6,
margin: {top: 10, left: 10, right: 10, bottom: 10},
projection: d3.geoAlbers().rotate([110, 0, 0]),
tooltipEnabled: true,
layers: [
new FeatureLayer({
geodata: state,
featureStyle: {
fill: d => 'none',
stroke: d => 'none',
strokeWidth: d => 1,
},
}),
new FeatureLayer({
geodata: counties,
featureStyle: {
fill: d => '#d9d1b8',
stroke: d => '#fff',
strokeWidth: d => 1,
zIndex: d => 1,
},
renderTooltip: renderTooltip,
}),
new FeatureLayer({
geodata: lakes,
featureStyle: {
fill: d => '#fff',
stroke: d => 'none',
}
}),
new FeatureLayer({
geodata: highways,
featureStyle: {
fill: d => 'none',
stroke: d => '#a18c4d',
opacity: d => 0.5,
pointerEvents: d => 'none',
}
}),
new PointLayer({
geodata: cities,
labelStyle: {
text: d => (width > 500) ? d.NAME : '',
dx: d => d.offset ? d.offset[0] : '0.5em',
dy: d => d.offset ? d.offset[1] : '0.5em',
},
}),
new FeatureLayer({
geodata: state,
featureStyle: {
fill: d => 'none',
stroke: d => 'black',
strokeWidth: d => 2,
},
}),
],
})