2

I made this webpage with JavaScript and CartoDB.

The layer selector works like I expected it to but I noticed that the legend are stacking on top of each other and not being removed when the layer is changed. I tried a few different things but to no avail.

A few posts on the internet also relate to a possible bug in CartoDB that may be causing this. Anyone have experience with this?

If you open the map switch layers several times then examine the DOM you will see that the map.remove(); option is not totally clearing all elements of the layers for the previous selection.

Example:

enter image description here

Any suggestions?

3
  • Welcome to GIS SE! To assist potential answerers to help you I would recommend always including your code snippets as text rather than pictures. The format {} button makes this easy to do.
    – PolyGeo
    Commented Nov 13, 2014 at 3:39
  • this is a known bug: github.com/CartoDB/cartodb.js/issues/75 Commented Nov 14, 2014 at 7:50
  • Looks like it's working now, right? Commented Jan 20, 2015 at 17:30

1 Answer 1

0

This was caused by a bug as @Javi Santana says in the comments, but it's been fixed already and your map seems to be behaving as expected :-)

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