Skip to content

Instantly share code, notes, and snippets.

@martgnz
Last active May 3, 2016 17:03
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save martgnz/fb402279dd7528ee07a61763771489d8 to your computer and use it in GitHub Desktop.
Save martgnz/fb402279dd7528ee07a61763771489d8 to your computer and use it in GitHub Desktop.
Basic Spam.js map
d3.json("map.json", function(error, d) {
topojson.presimplify(d)
var map = new StaticCanvasMap({
element: "body",
data: [
{
features: topojson.feature(d, d.objects["map"]),
static: {
paintfeature: function(parameters, d) {
parameters.context.stroke()
}
}
}
]
})
map.init()
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment