Troubleshooting
When something goes wrong in iXMaps, it often fails silently — no error, no warning, just a blank map or missing data. This page covers the most common causes and fixes.
Silent failure hotspots
These produce no error, no console message — the map just silently renders wrong. Check these first.
| # | What you did | What happens | Fix |
|---|---|---|---|
| 1 | Tooltip uses {{theme.item.data}} but showdata omitted |
Click shows empty data (layer still renders) | Add showdata: "true" when the tooltip uses {{theme.item.data}} |
| 2 | Different layer name for overlay vs FEATURE base | Overlay renders nothing | Overlay name must match the FEATURE base name exactly |
| 3 | Discarded ixmaps.Map() result |
Map initialises partially; further calls fail | Always const myMap = ixmaps.Map(...) |
| 4 | Omitted name in .meta() |
changeThemeStyle / hideTheme / showTheme silently no-op |
Add name: "themeName" to .meta() |
| 5 | changeThemeStyle via ixmaps.map() |
Returns {szMap: null}; no update |
Use myMap.then(api => api.changeThemeStyle(...)) |
| 6 | Missing .binding() |
Layer skipped entirely | .binding() with geo + value is required |
| 7 | Missing .define() |
Layer never registered | .define() must close every layer chain |
| 8 | objectscaling:"dynamic" without normalSizeScale |
All symbols invisible or wildly oversized | Add normalSizeScale: "8000000" (match to zoom) |
| 9 | removeTheme not called before redefining overlay |
Themes stack | Call api.removeTheme(prev) inside myMap.then() |
| 10 | values: for CATEGORICAL contains numbers |
Categories silently unmatched | Cast all values: to strings: ["1","2","3"] |
Map not displaying
Blank page or white screen
JavaScript error — Open the browser console (F12) and look for red errors. Common causes: syntax errors, missing commas or brackets, typos in method names.
Library not loaded
<script src="https://cdn.jsdelivr.net/gh/gjrichter/ixmaps-flat@1/ixmaps.js"></script>Map container has no height
html, body { width: 100%; height: 100%; overflow: hidden; } #map { width: 100%; height: 100%; }Never use
100vw/100vh— they exceed the viewport when a scrollbar appears.Invalid
mapTypename// ❌ Wrong: mapType: "CartoDB Positron" // missing spaces mapType: "vt_toner_lite" // wrong case // ✅ Correct: mapType: "CartoDB - Positron" mapType: "VT_TONER_LITE"Reserved element IDs — iXMaps owns
loading-div,tooltip,contextmenu. Using them for your own elements causes visible artifacts (a white box stuck on the map). Rename your overlay toapp-loadingor similar.
Data not showing
Map displays but no points or regions are visible
When a layer renders nothing, the cause is almost always a missing .binding(), a missing .define(), or bad coordinates — not showdata (which doesn’t gate rendering).
Checklist:
.binding()missing or incorrect// ❌ Wrong: .data({ obj: data, type: "json" }) .style({ ... }) // ✅ Correct: .data({ obj: data, type: "json" }) .binding({ geo: "lat|lon", value: "count", title: "name" }) .type("CHART|BUBBLE|SIZE|VALUES") .style({ showdata: "true" }).define()missing — the layer chain must end with.define()Data outside the visible map area — zoom out to see if data appears elsewhere. Verify the map center/zoom matches the data’s geographic location.
Coordinates invalid — latitude must be −90 to 90, longitude −180 to 180. Check for swapped lat/lon, null values, or coordinates stored as strings instead of numbers.
Wrong visualization type for geometry
- Point data →
CHART|...types - Polygon/line data →
FEATUREorCHOROPLETH - Do not combine
FEATUREandCHOROPLETHon the same layer — use two layers with the same name
- Point data →
Some features show, some don’t
- Mismatched join keys — for choropleth joins, verify that the
lookupfield values exactly match theidfield in the geometry (case-sensitive, type-sensitive:"28001"≠28001) - Filter too restrictive — temporarily remove
.filter()to test - ISTAT 2026 geometry with 2024 data — pin the geometry URL to commit
0153a0efor 2024-compatible codes
Tooltips not working
No tooltips on hover
Missing
mode: "info"in constructor — this is a constructor-time decision; it cannot be added after init// ❌ Wrong: ixmaps.Map("map", { mapType: "VT_TONER_LITE" }) // ✅ Correct: ixmaps.Map("map", { mapType: "VT_TONER_LITE", mode: "info" })Missing
.meta().meta({ tooltip: "{{theme.item.chart}}{{theme.item.data}}" })Wrong field names — field names in tooltip templates are case-sensitive
// ❌ Wrong (GeoJSON): tooltip: "{{properties.NAME}}" // ✅ Correct: tooltip: "{{NAME}}"
Tooltip text is invisible on dark basemaps
#tooltip { color: #e8eaf6 !important; }
#tooltip * { color: #e8eaf6 !important; }Styling issues
Colors not applying
// ❌ Wrong property name:
fillcolor: "#ff0000"
// ✅ Correct:
colorscheme: ["#ff0000"]// ❌ Wrong type (string instead of array):
colorscheme: "#ff0000"
// ✅ Correct:
colorscheme: ["#ff0000"]Symbols too small or too large
Adjust
scale:.style({ scale: 2.0 }) // double size .style({ scale: 0.5 }) // half sizeAdjust
normalsizevalue(lower = larger bubbles):.style({ normalsizevalue: "500000" }) // smaller reference → bigger bubblesAdjust
normalSizeScalein.options()(must match initial zoom):.options({ objectscaling: "dynamic", normalSizeScale: "8000000" })
Diverging scale not centered
Requires an even number of colors:
// ❌ Wrong — 7 colors (odd):
colorscheme: ["#d73027","#f46d43","#fdae61","#ffffbf","#abd9e9","#74add1","#4575b4"]
// ✅ Correct — 6 colors (even):
colorscheme: ["#d73027","#f46d43","#fdae61","#abd9e9","#74add1","#4575b4"],
rangecentervalue: 0Runtime API issues
changeThemeStyle has no effect
Missing
namein.meta()—changeThemeStylefinds themes by meta name, not by layer name.meta({ name: "myLayer", tooltip: "..." }) // ✅ name requiredCalled via wrong API
// ❌ Wrong: ixmaps.map().changeThemeStyle(...) // returns {szMap:null} // ✅ Correct: myMap.then(api => api.changeThemeStyle("myLayer", "scale:1.5", "set"))Filter string quoting — use double quotes for string values:
// ❌ Wrong — single quotes don't work: m.changeThemeStyle("layer", "filter:WHERE type == 'A'", "set") // ✅ Correct: m.changeThemeStyle("layer", 'filter:WHERE type == "A"', "set")
Overlays stack instead of replacing
Missing removeTheme() before redefining:
let ACTIVE = null;
myMap.then(api => {
if (ACTIVE) api.removeTheme(ACTIVE); // ← required
myMap.layer("base")
.data({ obj: newData, type: "json" })
// ...
.meta({ name: "theme-v2" })
.define();
ACTIVE = "theme-v2";
});Performance issues
Map loads slowly / browser freezes
Disable animation
.options({ flushChartDraw: 1000000 })Add
flushPaintShapefor large polygon datasets (municipalities, communes).options({ flushPaintShape: 1000000 })Use grid aggregation instead of individual points
.type("CHART|BUBBLE|SIZE|AGGREGATE") .style({ gridwidth: "5px", showdata: "true" })Use TopoJSON — 80–90 % smaller than equivalent GeoJSON. Simplify with mapshaper.org.
Data hosting (CORS)
Local files blocked
Browsers block loading file:// URLs from JavaScript. Use a local dev server:
python3 -m http.server 8000 # Python 3
npx http-server # Node.js
# then open http://localhost:8000/map.htmlCDN not updating after data push
jsDelivr caches for 5–10 minutes. For development, use raw.githubusercontent.com (immediate, no cache). For production, use cdn.jsdelivr.net/gh/ (fast, cached).
CSS conflicts (Bootstrap)
Bootstrap 3’s .hidden { display:none !important } silently breaks iXMaps toolbar buttons, tooltips, and context menus.
Root fix: Remove Bootstrap 3 and use standalone facet CSS (see the create-ixmap skill for the ~35-line replacement).
Fallback: Higher-specificity overrides:
.hidden[style*="display: flex"] { display: flex !important; }
.hidden[style*="display: block"] { display: block !important; }Debugging checklist
Work through this in order:
- ✅ Browser console (F12) — check for red errors
- ✅ iXMaps library
<script>tag present - ✅ Map
<div>has explicit height via CSS - ✅
const myMap = ixmaps.Map(...)— result assigned - ✅ Every layer has
.binding()withgeo+value - ✅ Tooltips using
{{theme.item.data}}includeshowdata: "true" - ✅ Every layer has
.meta({ tooltip: "..." }) - ✅ Every layer ends with
.define() - ✅ Overlay layer name matches FEATURE base layer name
- ✅ Data coordinates are WGS84 (EPSG:4326), numeric, non-null