Created
January 24, 2016 06:15
-
-
Save bhousel/9e8d06e1a768fca0ea64 to your computer and use it in GitHub Desktop.
Debug text bboxes in #iD
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// debug | |
var gj = rtree.all().map(function(d) { | |
return { type: 'Polygon', coordinates: [[ | |
[d[0], d[1]], [d[2], d[1]], [d[2], d[3]], [d[0], d[3]], [d[0], d[1]] | |
]]}; | |
}); | |
var debug = label.selectAll('.layer-debug').data([0]); | |
debug.enter() | |
.append('g') | |
.attr('class', 'layer-debug'); | |
var debugboxes = debug.selectAll('.map-in-map-bbox').data(gj); | |
debugboxes.enter() | |
.append('path') | |
.attr('class', 'map-in-map-bbox'); | |
debugboxes | |
.attr('d', d3.geo.path().projection(null)); | |
debugboxes.exit() | |
.remove(); | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment