Created
January 4, 2013 20:14
-
-
Save andrewxhill/4455583 to your computer and use it in GitHub Desktop.
Basic CartoDB Layer in D3
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
d3.json("http://account_name.cartodb.com/api/v2/sql?q=SELECT * FROM table_name WHERE the_geom IS NOT NULL&format=geojson&dp=5", function(collection) { | |
svg.select("#layer_id") | |
.selectAll("path") | |
.data(collection.features) | |
.enter().append("path") | |
.attr("fill", "violet") | |
.attr("d", path.projection(xy)); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment