$ show wladich/nakarte
Nakarte is a client-side single-page web mapping application built with Leaflet and Knockout, specialized for outdoor activities like hiking, cycling, and mountaineering. It provides an extensive catalog of map layers (OSM, satellite, topographic, overlays) with a strong focus on European and Russian regions. The application includes comprehensive GPS track management: loading from files (GPX, KML, GeoJSON, etc.) and online services (Strava, Garmin, OSM, Wikiloc), editing, elevation profiles, and exporting to GPX/KML/ZIP or Garmin JNX format. Additional features include search with multiple providers, panorama viewers (Mapillary, Wikimedia), azimuth/distance measurement, coordinate display in various formats, map printing with page layout, session save/restore, and custom layer configuration. The architecture is a classic Leaflet-based SPA with Knockout for UI bindings, webpack for bundling, and a separate CORS proxy server for tile access. External dependencies include Leaflet, Knockout, protobuf for track serialization, and various external API services. The codebase shows signs of organic growth with legacy code patterns (vendored scripts, relaxed ESLint for old files) and mixed English/Russian comments.
The LLM identified 4 files worth highlighting for reuse:
Provides functions to convert coordinates between different geographic coordinate systems, specifically Pulkovo 1942 (SK-42) to WGS84. Implements the Molodensky-Badekas transformation with hardcoded parameters. This is a self-contained, pure-math utility that could be extracted into a standalone library for coordinate system conversions in any mapping or GIS project.
Calculates magnetic declination for any location and date using a precomputed grid stored in a bundled JSON file (derived from WMM-2025). The lookup uses bilinear interpolation on a 2D grid. This module is self-contained (depends only on its data file) and can be reused in any navigation or compass application to provide accurate magnetic declination corrections.
A collection of file format parsers for GPS tracks and routes: GPX, KML, GeoJSON, OziExplorer, NKTK (custom protobuf), and ZIP. Each parser converts file contents into a normalized JavaScript object structure. The parsers are isolated to a single directory with minimal internal dependencies. They can be extracted as a standalone parsing library for client-side or Node.js applications that need to read common geospatial file formats.
A high-performance Leaflet layer that renders a large number of markers on a single canvas element, using collision detection to avoid overlapping labels. It handles thousands of markers efficiently compared to standard DOM markers. The layer implements Leaflet's L.GridLayer interface and can be extracted as a reusable Leaflet plugin for any mapping application requiring dense marker clusters with intelligent label placement.