Skip to content

Replace TopoJSON map with static SVG#3

Merged
AquiGorka merged 3 commits into
mainfrom
fix/world-map-svg
Mar 19, 2026
Merged

Replace TopoJSON map with static SVG#3
AquiGorka merged 3 commits into
mainfrom
fix/world-map-svg

Conversation

@AquiGorka

Copy link
Copy Markdown
Contributor

Summary

Replaces the TopoJSON CDN fetch + custom arc decoding with a static SVG world map served from public/world-map.svg.

Before: Fetched land-110m.json from jsDelivr, decoded delta-encoded arcs, projected via custom equirectangular transform. Result was distorted.

After: Uses simple-world-map (CC BY-SA 3.0). Pre-rendered country outlines with ISO 3166-1 IDs. Loaded from same origin, no CORS, renders correctly.

Changes

  • public/world-map.svg -- static SVG asset (56KB)
  • src/lib/world-map.ts -- replaced fetchWorldPaths() with fetchWorldSvg(), updated projection to match SVG viewBox
  • src/views/map.ts -- parses SVG, extracts paths, renders with council markers

Test plan

  • Map renders correctly locally
  • Council markers plot on correct countries
  • deno task build passes

The TopoJSON fetch + custom arc decoding produced a distorted map.
Replaced with simple-world-map SVG (CC BY-SA 3.0, Al MacDonald /
Fritz Lekschas) served as a static asset. No CDN dependency, no
projection math, renders correctly.
@AquiGorka AquiGorka merged commit 385b8c3 into main Mar 19, 2026
2 checks passed
@AquiGorka AquiGorka deleted the fix/world-map-svg branch March 19, 2026 14:34
AquiGorka added a commit that referenced this pull request May 5, 2026
## Summary

- Both deploy jobs now read stellarNetwork and rpcUrl from gh secrets
instead of hardcoded URLs:
  - testnet: STELLAR_NETWORK + RPC_URL
  - mainnet: MAINNET_STELLAR_NETWORK + MAINNET_RPC_URL
- Removes the gateway.fm hardcoding from the mainnet job and the
soroban-testnet hardcoding from the testnet job.
- deno.json patch bump 0.2.5 -> 0.2.6.

Repo gh secrets set in the same change:
- STELLAR_NETWORK = testnet
- RPC_URL = https://soroban-testnet.stellar.org
- MAINNET_STELLAR_NETWORK = mainnet
- MAINNET_RPC_URL = https://rpc-pro.lightsail.network/<TOKEN> (Quasar
Pro)

## Note for PM thread

Phase 0 finding #3 said network-dashboard derives Stellar config at
runtime from council-platform and makes no direct RPC calls. Verified
during D4: dashboard DOES make direct RPC calls — src/lib/stellar.ts:139
(new s.rpc.Server(RPC_URL)) is used by getChannelSupply and other
contract reads. ClickUp 86c9n8cby (proxy refactor) scope should be
extended to include network-dashboard.

The Quasar token IS embedded in the dashboard's mainnet public/config.js
as the accepted exposure for the silent release.

Part of the silent mainnet flip (ClickUp 86c9c86b6).

## Test plan

- [x] deno fmt clean
- [x] deno lint clean
- [x] deno task test — 28 passed
- [ ] Tag-triggered mainnet deploy generates a public/config.js with
stellarNetwork: "mainnet" and Quasar rpcUrl
- [ ] Tag-triggered testnet deploy generates a public/config.js with
stellarNetwork: "testnet" and soroban-testnet rpcUrl
- [ ] UI smoke on https://dashboard.moonlightprotocol.io
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant