So I had a GeoJSON of UK Counties (was actually KML before) and converted it to TopoJSON using the topojson node package.
topojson -o map-england.json -p --simplify-proportion .2 topo-map-england.json
This worked well in terms of reducing the file size and with simplification, it drastically improved the panning and zooming of the map.
However, in the conversion, my map now consists of a single path where before I had a path for each county.
Before I was able to add a mouseover
event that added a CSS class to the hovered path and that applied a colour change. Now however, when I move my mouse over any county, the whole map changes in colour because the whole map is one giant path!
How does one overcome this? Have I gone about this the wrong way?