News for hackers. Stuff that matters.
Re:iNaturalist by coalteddy on Friday April 03, 2026 @02:40PM (#47630397)
Does anyone know how they make their map so performant? Showing all those pins is mind blowing to me coming from leaflet maps. Marinetraffic is also a map that blows me away every time i see all the icons and how smooth and fast the loading is when zooming in. Would love to make a similar map at some point for my hobby but leaflet just does not cut it when you want to render 10million plus pins on a global map.

Tech blogs or pointers would be great

Re:iNaturalist by jw_cook on Friday April 03, 2026 @03:01PM (#47630687)
Points are rendered server-side, backed by Elasticsearch, and served as PNG tiles for each zoom level. Individual markers are only rendered for small sets. Some of the relevant source code:

https://github.com/inaturalist/inaturalist/blob/main/app/ass...

https://github.com/inaturalist/inaturalist/blob/main/app/ass...

https://github.com/inaturalist/inaturalist/blob/main/app/ass...

Re:iNaturalist by coalteddy on Friday April 03, 2026 @08:09PM (#47634042)
Did not realize that they publish their code. Very cool. Thanks!
Re:iNaturalist by functional_dev on Saturday April 04, 2026 @12:24PM (#47640468)
Looked at their source code out of curiosity. They use Elasticsearch as a geo backend, tile server that renders PNG images server side for each map tile request.

- low zoom -> server aggregated grid

- high zoom -> switcher to point tiles

browser just displays images, there is no work to do on client side..

I generated a visual schematic how these kind of systems work: https://vectree.io/c/server-side-geo-tile-rendering-elastics...

Re:iNaturalist by noahgolmant on Friday April 03, 2026 @02:47PM (#47630482)
You may want to look into the PMTiles format and tippecanoe. It efficiently produces pyramidal XYZ tile overviews of vector data. Sometimes this is also done server side via the PostGIS asMVT ffunction, or Martin.

For client side rendering, deck.gl is quite good, also a newer library called lonboard from DevelopmentSeed.

Re:iNaturalist by coalteddy on Friday April 03, 2026 @08:10PM (#47634047)
Thanks for those pointers! Very helpful.