xxxxxxxxxx
<html>
<head>
<script type="text/javascript" src="https://cdn.jsdelivr.net/gh/simplegeo/polymaps/v2.3.0/polymaps.min.js"></script>
<script type="text/javascript" src="https://cdn.jsdelivr.net/gh/simplegeo/polymaps/v2.3.0/lib/crimespotting/crimespotting.js"></script>
<style type="text/css">
@import url("https://cdn.rawgit.com/simplegeo/polymaps/v2.3.0/examples/example.css");
html, body {
height: 100%;
background: #E6E6E6;
}
svg {
display: block;
}
.datapoint {
fill: lightsteelblue;
fill-opacity: .5;
stroke: steelblue;
}
.datapoint:hover {
fill: lightcoral;
stroke: brown;
}
</style>
</head>
<body>
<script type="text/javascript">
var po = org.polymaps;
var map = po.map()
.container(document.body.appendChild(po.svg("svg")))
.center({lat: 37.787, lon: -122.228})
.zoomRange([10, 16])
.add(po.interact());
map.add(po.image()
.url(po.url("https://{S}tile.cloudmade.com"
+ "/1a1b06b230af4efdbb989ea99e9841af" // https://cloudmade.com/register
+ "/998/256/{Z}/{X}/{Y}.png")
.hosts(["a.", "b.", "c.", ""])));
map.add(geoJson = po.geoJson()
.url(crimespotting("https://oakland.crimespotting.org"
+ "/crime-data"
+ "?count=100"
+ "&format=json"
+ "&bbox={B}"
+ "&dstart=2010-04-01"
+ "&dend=2010-04-01"))
.clip(false)
.scale("fixed")
.on("load", load)
.zoom(12));
function load(e) {
for (var i = 0; i < e.features.length; i++) {
var c = e.features[i].element;
c.setAttribute("class", "datapoint");
c.setAttribute("r", 12);
}
}
</script>
<span id="copy">
© 2010
<a href="https://www.cloudmade.com/">CloudMade</a>,
<a href="https://www.openstreetmap.org/">OpenStreetMap</a> contributors,
<a href="https://creativecommons.org/licenses/by-sa/2.0/">CCBYSA</a>.
</span>
</body>
</html>
Updated missing url https://cdn.rawgit.com/simplegeo/polymaps/v2.3.0/polymaps.min.js to https://cdn.jsdelivr.net/gh/simplegeo/polymaps/v2.3.0/polymaps.min.js
Updated missing url https://cdn.rawgit.com/simplegeo/polymaps/v2.3.0/lib/crimespotting/crimespotting.js to https://cdn.jsdelivr.net/gh/simplegeo/polymaps/v2.3.0/lib/crimespotting/crimespotting.js
https://cdn.rawgit.com/simplegeo/polymaps/v2.3.0/polymaps.min.js
https://cdn.rawgit.com/simplegeo/polymaps/v2.3.0/lib/crimespotting/crimespotting.js