This is a lightweight client-side viewer for propagation prediction coverage maps made by HamCAP. It shows multiple frequency-band maps for three time slots (previous / now / next UTC) per band, supports lazy-loading, an in-memory LRU image cache, keyboard accessibility, theme toggle, and a simple magnify-in-new-tab feature.
The use of VOACAP hours is enforced; in other words, an hour spans from xx:30 to yy:30. For example, 07 UTC spans from 06:30 UTC to 07:30 UTC.
Read the following instructions:
- HamCAP User's Guide. The HamCAP software by Alex VE3NEA is a compact freeware interface program to VOACAP, incorporating both graphical Point-to-Point and Area Coverage predictions.
- Boosting HamCAP Performance: A Step-by-Step Guide. This guide outlines the steps to enhance radio propagation predictions in HamCAP by adjusting the following settings: the Noise at Receiver, Minimum Take-off Angle and, optionally, Required SNR.
- HamCAP Type 13 & 14 Antenna Guide. HamCAP is designed to work with antenna model types 13 and 14 that are just tabulated antenna patterns, 2-D and 1-D respectively, vs. frequency. The program may work with other file types as well, but you will not be able to view the antenna patterns. Learn how to create your own antennas of types 13 and 14.
index.html— main single-file application (HTML/CSS/JS).hamcap-sw.js(optional) — service worker (registered if present).
- Grid of maps from 3.5 MHz to 28 MHz by band and time (prev/now/next).
- Hover highlight for each map tile; clicking the highlighted tile opens a magnified view in a new tab.
- Keyboard support: tiles are focusable and Enter/Space opens the magnified view.
- Theme toggle (dark/light).
- Hour selection strip to pick UTC hour; images update accordingly.
- Lazy-loading with IntersectionObserver to defer downloads until near-visible.
- In-memory LRU cache to avoid refetching recently used images.
- Small UI hint explaining click behavior.
- Image URL prefix:
- Configured via
const URL = 'https://<url to image directory>/';inindex.html. - Image template:
${URL}__TIME__UT-${bandId}MHz.gif.__TIME__is replaced withHHstrings (e.g.00,13).
- Configured via
- Bands list:
- Edit the
bandsarray in the script to change which frequency panels are shown.
- Edit the
- Cache size / TTL:
CACHE_LIMIT(count) andCACHE_TTL_MS(milliseconds) are defined near the top of the script. Tune for memory/network constraints.
- Lazy-load tuning:
- IntersectionObserver uses
rootMargin: '360px'andthreshold: 0.02. ReducerootMarginto delay loading further.
- IntersectionObserver uses
- Slot aspect:
- Map tiles use
aspect-ratio: 16 / 9andmin-heightvalues. Adjustimg.width/img.heighthints to match real image dimensions.
- Map tiles use
- Magnify scale:
- The magnified page uses
transform: scale(2)— change this scale value inopenMagnified()if a different zoom is desired.
- The magnified page uses
- Filename title:
- The magnified tab uses the image filename (without extension) as the page title.
- In
index.html, set up the URL to the map directory. - Open
index.htmlin any modern browser.
Notes:
- Service worker registration requires HTTPS or
localhost. - Pop-up blockers can prevent the magnified tab from opening; the code falls back to opening the raw image if writing the magnified wrapper fails.
- Map tiles are keyboard-focusable (
tabindex=0) and haverole="link"with an accessible label updated when times are set. - The hint text (
.map-hint) informs users about hover/click and keyboard controls. - Images use
decoding="async"and a neutral SVG fallback on error.
- Large images (400–500 KB each) will still be fetched when a tile becomes visible; consider:
- Providing server-side thumbnails (small variant) and swapping to hi-res when needed.
- Using
srcset/<picture>for responsive images. - Restricting cache by byte size, not just count.
- Implementing retry/backoff for transient failures.
- Preconnect to the image host is included (
<link rel="preconnect" href="https://<host>" crossorigin>).
- Images not loading:
- Verify
URLprefix and that generated image paths exist on the server. - Check console for CORS errors from the image host.
- Verify
- Magnified tab blank or blocked:
- Browser popup blocker may have blocked the new tab. Allow pop-ups for localhost or the site.
- If magnified HTML write fails, the raw image URL is opened as fallback.
- Service worker not registering:
- Ensure serving over
localhostor HTTPS.
- Ensure serving over
