0

I've been playing around with odyssey.js and made a few map stories with it:

http://www.burdgis.com/blog/archive/map-stories/

What I can't work out is how to toggle layers. I imagine you would need more than one viz.json to do this but only the first one in my code seems to be read and if I add another later on in the article it's ignored.

4

There is this example at github https://github.com/clhenrick/BushwickCommunityMap

It uses the createLayer and createSubLayers options to define different cartodb layers into the map and then it toggles them using buttons and checkboxes that are inside a panel.And also, the layers are added or removed depending of which part of the story you are.

It uses slides instead of scroll in the odyssey.js to tell the story, but maybe it can help you !

  • Thanks oriolbx. Finally got around to this. I didn't have time to implement the slickness of the Bushwick map but used clhenricks slide listener and then used sql or sublayer.hide() / subLayer.show() to get the functionality I needed. – Oliver Burdekin Nov 4 '15 at 9:12

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.