// Add the volunteer level stats
$query = "SELECT cr.userId, max(cr.timestamp), count(*) contacts, ".
"(SELECT count(*) FROM canvassResults WHERE cr.priority > 0 AND userId = cr.userId) priority, ".
- "(SELECT count(*) FROM canvassResults WHERE cr.noContact > 0 AND userId = cr.userId) noContact ".
+ "(SELECT count(*) FROM canvassResults WHERE cr.noContact > 0 AND userId = cr.userId) noContact, ".
+ "(SELECT va.latitude from voterAddresses va, voters v, canvassResults cri ".
+ "where va.id = v.addressId and v.id=cri.voterId AND cri.userId = cr.userId ".
+ "ORDER BY cri.timestamp DESC LIMIT 1) latitude, ".
+ "(SELECT va.longitude from voterAddresses va, voters v, canvassResults cri ".
+ "where va.id = v.addressId and v.id=cri.voterId AND cri.userId = cr.userId ".
+ "ORDER BY cri.timestamp DESC LIMIT 1) longitude ".
"FROM canvassResults cr, canvasses c ".
"WHERE c.turfId = CAST(? AS INTEGER) AND c.id = cr.canvassId ".
"GROUP BY userId;";
lonTot += turfPoints[i][0];
}
- map.setZoom(19);
+ map.setZoom(16);
map.setView([latTot/i, lonTot/i]);
enableCanvassControls();
currentCanvass = canvass;
turfLayer = turf;
setTimeout(toggleTurf.bind(null, turf, true), 1000);
- viewCanvass(canvass);
+// viewCanvass(canvass);
/* var options = {
method: "POST",