I have a MapBox.js map with several layers here . I would like to be able to use TileMill's teaser and full interactivity on a few of the layers, but I have only been able to accomplish this for a single layer. How can I have interactivty for multiple layers in this map? The code for the map is here. I saw an example from MapBox.js but I don't know exactly how to implement it into my HTML code.

1 Answer 1


I see you have enabled interactivity on your map by the line:

map.gridControl.options.follow = true;

...but have not used any grid layers at all.

Include the following lines below all declarations:

var gridlayer1 = L.mapbox.gridLayer('slugis.ii9na2o6').addTo(map);

I had the same problem where my clicks wouldn't open the desired pop-ups and I solved this way.

  • Thank you that is exactly what I was looking for! The bounty is yours!
    – cbunn
    Commented Jul 11, 2014 at 17:54

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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