geoVoronoi.find(x,y)
✓ Published0🌍 Public
PPhilippe Rivière
Last edited Sep 11, 2016
Created on Sep 7, 2016
A spherical Voronoi diagram of 500 random points is shown on an orthographic projection of the globe, where moving the mouse highlights the cell containing the cursor’s location. Using d3-geo-voronoi and d3.geoPath, the example implements a custom `xfind` method that walks through neighboring cells—coloring each visited cell in amber—to locate the nearest site, then marks the final cell red. Random site coordinates are generated directly in the code.
AI-generated descriptionUses geoVoronoi.find() to highlight the nearest site to the selected (spherical) point.
See also a planar voronoi.find().
mit Licensed