mappo drawing things that are not the Earth. The engine has no idea: it asks a body whether a given latitude and longitude is figure or ground. On Earth that means land against sea, on the Moon maria against highlands, on Mars the northern lowlands against the southern highlands. One question, three spheres, and the same options style all of them.
A prototype · mappo · more demos
Earth is in the bundle because a world map is what people came for.
Everything else is a separate file you ask for by name: the Moon is 9.5 KB gzipped
and Mars is 6.9 KB, and nobody putting a world map in a hero section should download
either. The globe and vector outlines these maps use are modules of their own too. Registering a body also defines its tag; body= still wins if you
write both. Order does not matter: a map that asks for a body before its pack has
loaded draws nothing, then draws the body the moment it registers.
import { registerBody } from "mappo";
import "mappo/globe"; // mode="globe"
import "mappo/vector"; // figure-source="vector": the packs carry their rings
import { MOON } from "mappo/bodies/moon";
import { MARS } from "mappo/bodies/mars";
registerBody(MOON); // and <mappo-moon> exists
registerBody(MARS); // and <mappo-mars>
<mappo-world body="moon"> <!-- always works -->
<mappo-moon> <!-- the same thing, said shorter -->
<mappo-moon places="Apollo 11, Shackleton"> <!-- every body brings its own gazetteer -->
A body can carry vector outlines as well as a bitmask, and the Moon now
does, traced from the same threshold the mask uses, so the line and the squares are the
same boundary at two levels of detail. That is exactly the relationship Earth's coastline
has with Earth's bitmask. Left is figure="outline"; right is the grid it came from.
5,375 points, simplified to a fifth of a degree. A mare edge is smooth in nature and only looked like a staircase because we sampled it on a grid.
The bitmask the outline was traced from, filled. Same boundary, drawn as cells,
and the cells follow cols, so resolution is a slider.
Nothing about the flat renderer is Earth-shaped either. Both of these are
the same component in mode="flat", with a different pack behind them.
The near side is centred at 0° longitude; the far-side centre is split across the right and left edges, and is nearly all highland.
One clean line around the planet: everything north of it is a third of the surface and several kilometres lower than everything south.
Ten long-lived successful landing sites, mostly in low terrain at modest latitudes. Teal marks illustrative human-exploration prospects; violet marks large reference features for scale.
Drawn at the same moment by the same code. Mars is about half the Earth across and the Moon about a quarter. Mars's total surface area is nearly the same as the area of Earth's dry land, which is the sort of comparison this picture is for.
Maria from the Clementine 750 nm albedo mosaic; Martian elevation from MOLA (both public domain, NASA/USGS). Each threshold is set to reproduce a published figure: maria at 16% of the lunar sphere, lowlands at a third of Mars, and then checked against places whose heights are known. Both binaries are interpretations, not coastlines: one is a brightness, the other an elevation, and neither is a shore.