1

Can I add a photogallery in the Cartodb Infowindow?

I know how to add an image (single) in the infowindow, but can a photogallery be added as well? Small thumbnails that become larger when clicked?

Can this be done with an iframe or something like that?

1

This would require adding some scripts to your infowindow, and right now iframes or scripts are sanitized from the infowindows that you can create in the CartoDB Editor.

In order to achieve this you would need to generate a map with CartoDB.js, the CartoDB Javascript library, and then customize your infowindows. Notice there's a specific property to disable the sanitization, which will allow you to add your own scripts in the infowindows.

More info here:

CartoDB.js docs: http://docs.cartodb.com/cartodb-platform/cartodb-js.html SanitizeTemplate option: http://docs.cartodb.com/cartodb-platform/cartodb-js.html#attributes

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.