Turn thousands of raw locations into a surface people can understand at a glance.
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.
See concentration, quiet areas, and regional differences without sorting through individual markers.
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.
Versioned datasets
Upload or configure points once. Dataset versions invalidate cached output when source data changes.
Indexed tile queries
Web Mercator source queries use a spatial index and include neighboring points whose kernels cross tile edges.
Browser color
Uncolored float density travels over the wire. Change palettes without requesting density again.
Shared scaling
Every visible tile uses the same color range, removing the per-tile normalization seams common to image APIs.
Two aggregation modes
Addition emphasizes accumulated activity. Average preserves measurement values and can fade by kernel support.
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 GitHubDataset 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=27The 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.