Permalink
Switch branches/tags
Nothing to show
Find file
Fetching contributors…
Cannot retrieve contributors at this time
122 lines (112 sloc) 4.45 KB
<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="initial-scale=1.0, user-scalable=no" />
<meta http-equiv="content-type" content="text/html; charset=UTF-8"/>
<title>Philadelphia Homicides: 2006-2012</title>
<link rel="shortcut icon" href="http://cartodb.com/favicon/favicon_32x32.ico" />
<link href="http://code.google.com/apis/maps/documentation/javascript/examples/default.css" rel="stylesheet" type="text/css" />
<link rel="stylesheet" href="lib/cartodb.css">
<style type="text/css">
.torque_time {
text-align: center;
font-weight: bold;
padding: 3px;
vertical-align: middle;
background-color: #980000;
border: 1px white dashed;
}
</style>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
<script type="text/javascript" src="http://maps.googleapis.com/maps/api/js?sensor=false"></script>
<script type="text/javascript" src="lib/wax.g.js"></script>
<script type="text/javascript" src="lib/cartodb-gmapsv3.js"></script>
<script type="text/javascript" src="lib/dat.gui.min.js"></script>
<script type="text/javascript" src="lib/underscore-min.js"></script>
<script type="text/javascript" src="lib/backbone.js"></script>
<script type="text/javascript" src="lib/class.js"></script>
<script type="text/javascript" src="lib/backbone.cartodb.js"></script>
<script type="text/javascript" src="src/canvas_tile_layer.js"></script>
<script type="text/javascript" src="src/grid_layer.js"></script>
<script type="text/javascript" src="src/torque.js"></script>
<script type="text/javascript">
var gui;
function initialize() {
// initialise the google map
var map = new google.maps.Map(document.getElementById('map_canvas'), {
center: new google.maps.LatLng(39.991851471423466,-75.12725830078125),
zoom: 12,
mapTypeId:google.maps.MapTypeId.SATELLITE,
mapTypeControl:false,
minZoom:1,
scrollwheel: false,
panControl: false,
zoomControl: true,
scaleControl: false,
streetViewControl: false,
overviewMapControl: false,
});
var map_style = {};
map_style.google_maps_customization_style = [
{
stylers:[
{ invert_lightness:true },
{ weight:1 },
{ saturation:-20 },
{ lightness:-10 }
]
},
{
elementType:"labels",
stylers:[
{ visibility:"simplified" }
]
}
];
var Soft = function () {
this.Soft = function () {
map.setMapTypeId(google.maps.MapTypeId.ROADMAP);
map.setOptions({styles:map_style.google_maps_customization_style});
}
}
map.setMapTypeId(google.maps.MapTypeId.ROADMAP);
map.setOptions({styles:map_style.google_maps_customization_style});
var TorqueOptions = {
user: "markh",
table: "crimes",
column: "dispatch_date_time",
cumulative: true,
resolution: 2,
steps: 325,
fps: 24,
fitbounds: false,
clock: true,
blendmode: 'source-over',
trails: true,
point_type:'square',
cellsize:2
}
var torque = null;
Torque(function (env) {
Torque.app = new env.app.Instance();
torque = new Torque.app.addLayer(map, TorqueOptions);
Torque.env = env;
});
var ribbonBlock = document.getElementById('ribbon');
var ribbon = document.createElement('a');
ribbon.setAttribute('href', 'https://github.com/mheadd/philly-homicides');
var link = document.createElement('img');
link.setAttribute('style', 'position: absolute; top: 0; right: 0; border: 0;');
link.setAttribute('src', 'https://s3.amazonaws.com/github/ribbons/forkme_right_red_aa0000.png');
ribbon.appendChild(link);
ribbonBlock.appendChild(ribbon);
}
</script>
</head>
<body onload="initialize()">
<div id="map_canvas"></div>
<div class="torque_time"></div>
<a class="cartodb_logo" href="http://www.cartodb.com" target="_blank">CartoDB</a>
<div id="ribbon"></div>
</body>
</html>