Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

Compare maps (swipe)

MapCompare overlays two lonboard Maps and reveals one over the other with a draggable divider — drag it across the viewport to compare. It’s built for before/after imagery: two dated satellite scenes, or pre- and post-event views of the same place.

The two cameras are locked together, so panning or zooming either side moves both. No kernel is required, so the swipe and the camera sync behave the same here and in the static export of this page.

Drive the divider from a slider

position runs 0–1 — the same range as a Slider’s value — so a plain jslink keeps them in sync in both directions (drag the divider or the slider).

For a top/bottom split instead of left/right, pass orientation="horizontal".