2

This should be really simple, but I've screwed up a map several times trying to figure it out and I'm working on a deadline, so I don't have any more time to play around with it.

I just want to produce a map where the base shows only the state of Massachusetts, and none of the surrounding states. There's a FAQ link on how to do it, but I can't seem to figure it out. http://docs.cartodb.com/faqs.html#how-can-i-show-only-one-countryarearegion-on-a-map

I've applied the SQL query SELECT * FROM tablename WHERE name = 'Massachusetts' to my map, but it doesn't seem to do anything besides screw up the filters/legend/settings I have in place.

Am I missing something critical?

  • By the way, I did actually put my correct table name in the "tablename" field. – Todd Oct 28 '15 at 15:51
  • If you are using cartoDB from within Leaflet, ie, the cartodb api, then you can just set the zoom level accordingly. – John Powell Oct 28 '15 at 16:26
1

Double-check that 'Massachusetts' is the exact content of the column you want to filter. If the content were 'massachusetts' the expression would return false and no geometry would be selected.

Also, check that 'name' is the name of the column. If it were something like 'state' then that could break your query too.

We would need some more information to be able to help you with this, as the structure of your table, your CartoDB user name or a link to your table to try and import it to make some tests.

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.