doxa-maps/plugin-designs/demo-map/src/utils
Doxa Maps e19697673d
Some checks are pending
Deploy to GitHub Pages / build (push) Waiting to run
Deploy to GitHub Pages / deploy (push) Blocked by required conditions
Doxa Maps — the map bundler, 7 production plugins and the Experimental shelf
2026-09-25 20:07:59 +00:00
..
README.md Doxa Maps — the map bundler, 7 production plugins and the Experimental shelf 2026-09-25 20:07:59 +00:00

src/utils/ — this map's own helper functions

Small, pure, stateless helpers (formatters, tiny transforms, lookups) specific to this map. General reusable helpers — geo math, cluster helpers, apiBaseUrl — live in library/utils/ and are reused via @map/utils/… (see ../../../../documentation/reference.md).

import { haversine }   from '@map/utils/geoUtils.js'      // reuse
import { formatLabel } from './src/utils/format.js'        // your own (relative)
  • Keep functions pure (no side effects, no global state).
  • Named exports, one concern per file.