Skip to content

Commit

Permalink
Don't use geoid to label tracts, use new tractid
Browse files Browse the repository at this point in the history
  • Loading branch information
sleitner committed Mar 16, 2016
1 parent 69968a9 commit 1284319
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions frontend/src/js/drawCircles.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,22 +30,19 @@
var circle = L.circle([geo.centlat, geo.centlon],
hmdaStat(data), style );

// We will use the geoid when redrawing
circle.geoid = geo.geoid || '';
// We will use the tractid when redrawing
circle.tracid = geo.tractid || '';
circle.volume = geo.volume;
circle.type = "tract-circle";
circle.keyCircle = 0;

// Trim the year from the census ID
circle.geoid = circle.geoid.replace(new RegExp('^' + selectedYear), '');

if( typeof options !== "undefined"){
circle.keyCircle = options.keyCircle;
}

circle.on('mouseover mousemove', function(e){
new L.Rrose({ offset: new L.Point(0,0), closeButton: false, autoPan: false, y_bound: 160 })
.setContent('<div class="bubble-header">Tract '+ circle.geoid +
.setContent('<div class="bubble-header">Tract '+ circle.tractid +
'</div><div class="lar-count"><span class="circle-hover-data">' +data['volume'] +
'</span><span class="circle-hover-label">LAR</span></div><div class="hh-count"><span class="circle-hover-data">' + data['num_households'] +
'</span><span class="circle-hover-label">Households</span></div></div>')
Expand Down

0 comments on commit 1284319

Please sign in to comment.