Your browser sucks, JavaScript disabled! Gunnar's console needs JavaScript and WebAssembly. Git over SSH on port 2222 does not.

nordisk/korp-map

crates/sverigekartan/README.md

Sverigekartan (native)

The map of Sweden from a korp map server — by default the public one at https://karta.gunnar.rs — in a native window: 2D and 3D, address search, and a click on the map for the nearest address. The window speaks Swedish, like the page. The same map the Streamlit page shows in the browser, as a program on your own machine.

cargo install sverigekartan
sverigekartan

Needs a Rust toolchain (1.89 or newer, https://rustup.rs) and a GPU with a Vulkan, Metal or DX12 driver. Built and tested on Linux x86_64; Linux arm64, macOS and Windows build from the same code.

Use

drag pan
wheel zoom (to the cursor)
click the nearest address, marked on the map
2D / 3D switch view, staying where you are
3D: left-drag orbit; right or middle drag pans
search box an address (Sveavägen 44 Stockholm); Enter or Sök goes to the first hit, träffar lists the rest
sverigekartan [--server URL] [--region NAME] [--3d] [--at LON,LAT,ZOOM]
  --server URL       the map server (default https://karta.gunnar.rs)
  --region NAME      the region (default sweden)
  --3d               open in 3D
  --at LON,LAT,ZOOM  open at a point and slippy zoom, e.g. 18.07,59.33,13

What it is made of

All Rust, no C compiler needed: egui + eframe on wgpu for the window, facett's map viewers for the map, and https over rustls on the graviola crypto provider.

The map itself is facett-mapfeed: the map wire's client side (/v1/map/… Arrow IPC, /v1/geocode, /v1/revgeocode), the viewport feed, and the 2D and 3D viewer adapters — the same code the Streamlit component runs in the browser. This crate only adds the window, the 2D/3D switch and the address box, so it follows the map wire wherever facett-mapfeed goes.

Licence

MIT OR Apache-2.0, like the rest of korp-map. The map data is © OpenStreetMap contributors, ODbL.