All examples By author By category About

wwymak

gridmapTest

Work in progress towards making a hexgrid map of the uk --- draw the counties, then assign a circle to each of counties, then use force layout with collision detection to force the circles not to collide

Also draw a hexagon grid, then after force layout has finished, assinged te hexagons closest to the circle to be blue

Add in function so when you click on a colored hexagon, you are 'moving' that to a new position when you click on uncolored hexagon

collision code adapted form /mbostock/1804919, inspired by https://github.com/kristw/gridmap-layout-thailand