I'm using cartodb for a project. I read the documentation yet I can't find a solution. Indeed, I need to be able to see the name of a node (which is on the name field of the bdd) without clicking on. Is that possible ?

And I have another question. In the search box, is that possible to look for one of our node ?

Thanks a lot

Sincerely A.H


You can label your features on your maps using either the CartoDB wizards or by adding a simple set of CartoCSS rules to your visualization like the ones below:

#your_table_name::labels {
  text-name: [your_column_name];
  text-placement: point;
  text-face-name: 'DejaVu Sans Book';
  text-size: 11;
  text-fill: #000;
  text-halo-fill: #FFF;
  text-halo-radius: 1;
  text-dy: -10;
  text-allow-overlap: true;
  text-placement-type: dummy;
  text-label-position-tolerance: 0;

About the search box, is a feature that is proposed but it's not implemented yet. By implementing your map with CartoDB.js you could do a workaround quite easy by querying the BBDD to get the lat/lon of your feature and then moving the map to those coordinates.

good luck!

  • Thanks a lot! I will try soon. For the search box, it's not so much important so I will see what I could do (I'm not really a power user of js currently) but I will try. Thanks Have a nice day – user3141597 Jan 16 '14 at 8:15

To add to saleiva's response, yes with CartoDB.js it seems like nothing is impossible. To get you started, I know of one good example that uses a column of names to populate an autofill search, http://bl.ocks.org/javisantana/7932459

When you select your name, you could also parse the lat/lng of the data.

  • Thanks, I will try and see what I can do with that :-) Have a nice day – user3141597 Jan 16 '14 at 8:17

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.