1

If you have a table like this:

Name | Item | State ---------|--------|----------- Alice | Apple | Alabama Ben | Banana | Alabama Caitlin | Cherry | California

Assuming you have created polygons based on the states, how could you create an 'info window' which combines the details of all rows in the same state?

So for example, the popup for Alabama might be something like:

State: Alabama
People: 2
Items: Apple, Banana

As far as I can tell, the default behaviour for Cartodb would be to place one polygon on top of the other, and for the info window to display the info from the top most polygon only.

1

You won't be able to do this using the CartoDB Editor interface alone without changing your data. So, two options

Change your data

You can create a new table from your data where you join all data from Alabama into a single row. You'll have to get comfortable with a little SQL and some of the data types allowed in PostgreSQL.

Use CartoDB.js

You can create the map in CartoDB.js. Then use a featureOver event to actually query the table and get back all data that share the same state name.

Your Answer

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

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