HeatMapAPI

Density maps that stay seamless.

Turn latitude, longitude, and value data into interactive heat maps for maps, dashboards, and GIS systems—without resending every point on every map movement.

What is a heat map?

Make geographic patterns visible.

A heat map is a graphical representation of two-dimensional data using color and intensity. HeatMapAPI works with latitude, longitude, and value records to show where activity is concentrated and how values change geographically.

Instead of presenting users with a sea of individual points or polygons, a density surface makes clusters, gradients, trends, and hotspots easier to understand at a glance.

01
Clarity

Turn thousands of raw locations into a surface people can understand at a glance.

02
Insight

See concentration, quiet areas, and regional differences without sorting through individual markers.

03
Flexibility

Bring the same heat-map data into Leaflet, Google Maps, Mapbox, dashboards, or GIS tools.

Why HeatMapAPI

Compute only what the map needs.

The V7 architecture moves from viewport PNGs to reusable density tiles. The server calculates data; the browser owns presentation.

01

Versioned datasets

Upload or configure points once. Dataset versions invalidate cached output when source data changes.

02

Indexed tile queries

Web Mercator source queries use a spatial index and include neighboring points whose kernels cross tile edges.

03

Browser color

Uncolored float density travels over the wire. Change palettes without requesting density again.

04

Shared scaling

Every visible tile uses the same color range, removing the per-tile normalization seams common to image APIs.

05

Two aggregation modes

Addition emphasizes accumulated activity. Average preserves measurement values and can fade by kernel support.

06

Layered caching

Server density caching and browser density/color caches keep repeated pans and style changes responsive.

Live HeatMapAPI example

Thousands to millions of points. One interactive map.

This working example connects a Leaflet map to the V7 density service. Pan, zoom, switch aggregation modes, recolor cached density, and compare Average edge fading. Tiles are calculated on demand while the browser handles the final visual presentation.

Architecture

From source points to pixels.

Each stage has one job, so storage, calculation, caching, and visual design can evolve independently.

01 · Source

Dataset file

Latitude, longitude, value records with a stable content version.

02 · Server

Spatial index

Query only points capable of influencing the requested tile.

03 · Wire

Density tile

Compact row-major float32 values, not a precolored PNG.

04 · Browser

Canvas overlay

Shared scaling, palettes, alpha, and client-side export.

Documentation

Simple to connect.

Choose your dataset and map tile. The same data and settings will always give you the same result.

View source on GitHub

Dataset format

One record per line using invariant numeric formatting:

latitude,longitude,value
39.7392,-104.9903,10

Inspect a dataset

GET /api/datasets/demo

{"id":"demo","version":"…","count":10000}

Request a density tile

GET /api/datasets/demo/tiles/{z}/{x}/{y}
    ?mode=addition
    &radius=27

The radius is measured at zoom 15 and follows the documented zoom curve. Responses include dataset version, density range, effective radius, ETag, and immutable cache headers.

Aggregation behavior

  • Addition: Σ(value × weight); empty pixels are zero.
  • Average: Σ(value × weight) / Σ(weight); empty pixels are NaN and support can soften alpha at kernel edges.

Client integration

const layer = new HeatmapDensityLayer({
  baseUrl: 'https://your-api.run.app',
  dataset: 'demo',
  mode: 'addition',
  radius: 27,
  palette
});
await layer.initialize();

Build with density, not images

Ready to replace the old PNG workflow?

Run HeatMapAPI locally, connect a versioned dataset, and use the browser layer as the foundation for Leaflet, Mapbox, Google Maps, or your own canvas integration.

Contact me for questions about hosting your own API or implementing commercial solutions.