D3
OG
Old school D3 from simpler times
All examples
By author
By category
About
tmcw
Full window
Github gist
A simple Canvas markers.js scaled-point generator
<!DOCTYPE html> <html> <head> <title>crime clusters</title> <script type='text/javascript' src='https://mapbox.com/markers.js/dist/markers.0.5.3.min.js'></script> <script type='text/javascript' src='https://mapbox.com/markers.js/dist/markers.0.5.3.externals.js'></script> <script type='text/javascript' src='scale_factory.js'></script> <link href='https://mapbox.com/markers.js/dist/markers.0.5.3.css' rel='stylesheet' type='text/css' /> <style> body { font: 14px/20px 'Helvetica', 'Helvetica Neue'; background:#eee; } #map { position:absolute; top:0; left:0; width:640px; height:400px; } </style> </head> <body> <div class='map' id='map'> </div> <script type='text/javascript'> wax.tilejson('https://a.tiles.mapbox.com/v3/tmcw.map-bzuvyug3.jsonp', function(tj) { var m = new MM.Map('map', new wax.mm.connector(tj)); mapbox.csv_url_to_geojson('texas_crime.csv', function(crimes) { var ml = mapbox.markers() .factory(scale_factory) .features(crimes); m.addLayer(ml); m.extent(ml.extent()); mmg_interaction(ml); }); }); </script> </body> </html>