In the past I was able to create a layer and specify interactivity and which fields would be returned on featuerOver etc. The code below worked in the past but now returns and error of "Interactivity is read-only in NamedMaps"

cartodb.createLayer(map, 'link to my viz')
.on('done', function(layer) {                  
    .on('featureOver', function(e, latlng, pos, data) {
}).on('error', function(err) {
  console.log("some error occurred: " + err);
  • 1
    are the data tables that your viz.json file pointing to set to private? named maps refer to public maps made from private data. Apr 21, 2015 at 21:49
  • That was the problem.. If you add an answer I can select it as correct
    – jotamon
    Apr 21, 2015 at 21:51

1 Answer 1


Like I said in the comments above, the error referring to named maps means that the data tables that the viz.json points to are set to private. In order to configure them you have to set interactivity using the CartoDB Editor, do an authenticated call to the server creating the map, or set them to public or public with link and do the JavaScript that was quoted above.

For more info on named maps, checkout this tutorial.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.