1

I'm trying to create a sublayer with interactivity on it for a tooltip. The tooltip is going to need data from a column named plant_name. So I am setting the interactivity property as I create the sublayer, like this:

        sublayer = layer.createSubLayer(
          sql: sql,
          cartocss: css
          interactivity: ["cartodb_id", "plant_name"]
        )

The problem is I get an error saying "layer1: Postgis Plugin: ERROR: column "plant_name" does not exist." even though the column is in the table.

What am I doing wrong?

  • does the column exist in sql? – andrewxhill Mar 4 '14 at 20:51
  • Yeah, totally, it's there. – picardo Mar 4 '14 at 22:55
  • Ah, scratch that. My mistake. The column wasn't in the SQL. – picardo Mar 4 '14 at 22:57
  • Please, could you add your comment as the answer of this question so that the rest of the community can see that it was solved? :) – iriberri Jun 8 '15 at 17:52
  • sublayer = layer.createSubLayer( sql: sql, cartocss: css interactivity: "cartodb_id, plant_name" ) – Jhon Henry Cardenas Jun 15 '16 at 21:16

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.