Skip to main content
100%

Lesson 2 | CARTO.js | CartoDB

✓ Published0🌍 Public
Aandrewbt
Last edited Aug 17, 2016
Created on Aug 17, 2016

This example demonstrates interactive layer controls for a map built with CARTO.js. It displays two CartoDB sublayers—African countries and global lakes—over an OpenStreetMap basemap using the Leaflet map object. Two dashboard buttons toggle the visibility of each sublayer by calling the `hide()` and `show()` methods on the corresponding sublayer. The map is centered on southern France at zoom level 3, and the sublayers are defined with custom SQL queries and CartoCSS styling.

AI-generated description

Similar vizzes