Rendering Natural Earth populated places by longitude and latitude using D3 quadtree and data joins. A quadtree can significantly reduce the number of data point comparisons. Using longitude and latitude for the quadtree x- and y- coordinates allows for scanning after map projections and zoom behaviors. The mouse extent searches the quadtree for nearby points. The search extent needs to be adjusted from xy min max to longitude latitude min max coordinates. Scanned points are marked orange. Selected points are marked red.
Press spacebar to toggle all places.
Pan and zoom the map with the mouse.