function makeGraticule(lonaxisRange, lataxisRange, step) { return d3.geo.graticule() .extent([ [lonaxisRange[0], lataxisRange[0]], [lonaxisRange[1], lataxisRange[1]] ]) .step(step); }
// hide paths over edges of clipped projections function hideShowPoints(d) { var p = projection.rotate(), angle = d3.geo.distance([d.lon, d.lat], [-p[0], -p[1]]), maxAngle = clipAngle * Math.PI / 180; return (angle > maxAngle) ? '0' : '1.0'; }
// bounds array [[top, left], [bottom, right]] // of the lon/lat range box function getBounds(projection, rangeBox) { return d3.geo.path().projection(projection).bounds(rangeBox); }