code wiki / _hdl_build / nx_geo_mapsvg.nx
nx_geo_mapsvg.nx
buildroot/runtime/_hdl_build/nx_geo_mapsvg.nx
about
nx_geo_mapsvg.nx -- GEO-007: the SOVEREIGN MAP SURFACE. Renders real geo data (gazetteer cities,
a geofence, a route) to an HTML page with INLINE SVG -- a vector map drawn bits-up from Nishi data
with ZERO third-party map library (no Leaflet / Mapbox / Google / OpenLayers; SVG is the last-mile
web standard, like HTML/HTTP). Equirectangular projection (integer microdegrees -> viewport px).
Writes sites/nishifamily/maps/index.html so nx_sites_daemon serves it at nishifamily.com/maps.
This is the "privacy + sovereign map" surface: the geometry, projection and styling are all ours.
dependencies 2 imports · 0 importers
imports: nx_syscalls.nxnx_itoa_lib.nx
imported by: nobody (leaf or entry point)
call flow from main pre-order; caps 40 nodes / depth 6 declared; ↻ = already shown
structs
| none |
consts
| 9 | const K_MAGIC_180000000: i64 = 180000000 |
| 10 | const K_MAGIC_360000000: i64 = 360000000 |
| 11 | const K_MAGIC_90000000: i64 = 90000000 |
| 12 | const K_MAGIC_51505000: i64 = 51505000 |
| 13 | const K_MAGIC_127000: i64 = 127000 |
| 14 | const K_MAGIC_35676000: i64 = 35676000 |
| 15 | const K_MAGIC_139650000: i64 = 139650000 |
| 16 | const K_MAGIC_40712000: i64 = 40712000 |
| 17 | const K_MAGIC_74006000: i64 = 74006000 |
| 18 | const K_MAGIC_33868000: i64 = 33868000 |
| 19 | const K_MAGIC_151209000: i64 = 151209000 |
| 20 | const K_MAGIC_48856000: i64 = 48856000 |
| 21 | const K_MAGIC_2352000: i64 = 2352000 |
| 22 | const K_MAGIC_30044000: i64 = 30044000 |
| 23 | const K_MAGIC_31235000: i64 = 31235000 |
| 24 | const K_MAGIC_22906000: i64 = 22906000 |
| 25 | const K_MAGIC_43172000: i64 = 43172000 |
| 26 | const K_MAGIC_55755000: i64 = 55755000 |
| 27 | const K_MAGIC_37617000: i64 = 37617000 |
| 28 | const K_MAGIC_30000000: i64 = 30000000 |
functions
| 30 | func m_w(fd: i64, s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } sys_write(fd, s, n); return 0 } |
| 35 | func m_n(fd: i64, v: i64) -> i64 { nxi_fd(fd, v); return 0 } |
| 37 | func m_px(lon_md: i64) -> i64 { return (lon_md + K_MAGIC_180000000) * 960 / K_MAGIC_360000000 } called by 1: main |
| 38 | func m_py(lat_md: i64) -> i64 { return (K_MAGIC_90000000 - lat_md) * 480 / K_MAGIC_180000000 } called by 1: main |
| 39 | func main(argc: i64, argv: *i64) -> i64 |