Skip to main content
100%

Map Connections | CartoDB.js

✓ Published0🌍 Public
Aandrewxhill
Last edited Jan 13, 2014
Created on Jan 13, 2014

Clicking a ZIP code polygon on a U.S. map triggers a dynamic query that draws purple curved lines from that selected area to nearby ski resorts within a 1,000-unit distance. The example uses CartoDB.js with Leaflet to render the base map and vector layers, while a CartoDB SQL API call executes `ST_MakeLine`, `ST_Segmentize`, and `ST_Transform` to generate geodesic connection paths in GeoJSON format. Interactivity includes cursor changes on feature hover and line removal/replacement on each new click, with styling controlled through CartoCSS.

AI-generated description

Similar vizzes