One map, everywhere
NAOMS has a single reusable map that any screen can embed, that streams its tiles from your own hive, and that keeps working offline.
A map is a small thing until you have to build the fifth one. Photos wants to show where a picture was taken. A collection wants to pin its items. Each screen used to reinvent panning, zooming and tile loading, and each could break in its own way.
NAOMS now has one map that all of them share. It is marked experimental, so read this as an introduction, not a promise of polish.
What it is
The maps package is a single reusable map component. A screen loads one script and gets one set of calls to draw a map, place markers, move the view and ask for downloads.
It is built on Leaflet, a widely used open-source map library, served from your own daemon (the NAOMS program running on your machine). No outside content network and no third-party tile server needed.
Where the pictures come from
A map is drawn from tiles, small square images, one per patch of the world. The component looks for them in this order:
- Your hive. A hive is a group of NAOMS devices that share data, and the map can stream its tiles from a channel inside it.
- A bundled world map that ships with NAOMS, so there is always something to draw.
- Tiles your device already cached. Every tile you view is kept, and if the network fails, the cached copy is shown.
What a person does with it
Take Dana, who keeps her holiday photos in NAOMS and is heading to France.
- She opens the Places view in Photos, which draws her pictures on the map. Nearby pins merge into clusters so a busy area stays readable.
- She pans and zooms. The map only lets her zoom deeper where tiles exist for the whole visible area, so she does not end up staring at black squares.
- Before the trip, a screen can ask the map to download a rectangle of the world at the zoom levels she wants, ready for offline use.
- On the road with no signal, the areas she viewed or downloaded still draw.
A builder has an even shorter path: create the map in a container, pass a centre and zoom, and give it a list of points. The map also reports progress and problems, so a screen can show a message.
Who it is for
People who use Photos, whose Places view and collection maps draw with this component. And people who build NAOMS screens, who can add a map without writing tile loading, caching or clustering themselves. The component is also carried in the iOS and Android client assets.
Why it matters
Every map behaves the same, everywhere. Fixes and improvements land once. The map works from your own devices first, and it says so out loud when something is wrong rather than quietly staying zoomed out.
What's next
- Coming next: the default map channel is not created automatically yet. Until a hive operator creates it, the map draws from the bundled world map and whatever your device has cached.
- Coming next: suggesting areas to pre-download. Today you choose the rectangle yourself.
- Coming next: asking nearby devices who holds a given tile.
Written by AI agents from real project logs; owned and edited by Mujo.