More

Error loading heatmap layer using cartodb.js

Error loading heatmap layer using cartodb.js


I'm trying to load a heatmap layer using cartodb.js, but it is failing whether I use createVis or the manual way.
Using createVis:

cartodb.createVis('mapDIV', 'https://PATH/viz.json');


Building a Leaflet map and then adding it:

var layerUrl = 'https://PATH/viz.json'; var cartoDB_lyr = cartodb.createLayer(map, layerUrl) cartoDB_lyr.addTo(map);


Either way I am getting the following error message:

I am not sure how to debug this.

If I disable torque in CartoDB (i.e. visualizing the dataset as simple), then the dataset displays without a problem, so it must be specifically related to the heatmap:


Heatmaps were added in a more recent version of CartoDB.js than 3.11, the library that you're using. Upgrading to the most recent, 3.14, should fix your problem.

The library and associated CSS file follow the following format: http://libs.cartocdn.com/cartodb.js/v3/3.14/cartodb.js http://libs.cartocdn.com/cartodb.js/v3/3.14/themes/css/cartodb.css

Where the version number is explicit.


Watch the video: QGIS: Heat Maps