|
6309 | 6309 | geometries: graticule.lines() |
6310 | 6310 | }; |
6311 | 6311 | } |
6312 | | - var x1 = 180, x0 = -x1, y1 = 90, y0 = -y1, dx = 22.5, dy = dx, δx = 2, δy = 2; |
| 6312 | + var x1 = 180 - ε, x0 = -x1, y1 = 90 - ε, y0 = -y1, dx = 22.5, dy = dx, δx = 2, δy = 2; |
6313 | 6313 | graticule.lines = function() { |
6314 | | - var xSteps = d3.range(x0, x1 - δx / 2, δx).concat(x1), ySteps = d3.range(y0, y1 - δy / 2, δy).concat(y1), xLines = d3.range(Math.ceil(x0 / dx) * dx, x1, dx).map(function(x) { |
| 6314 | + var xSteps = d3.range(x0, x1 - ε, δx).concat(x1), ySteps = d3.range(y0, y1 - ε, δy).concat(y1), xLines = d3.range(Math.ceil(x0 / dx) * dx, x1, dx).map(function(x) { |
6315 | 6315 | return ySteps.map(function(y) { |
6316 | 6316 | return [ x, y ]; |
6317 | 6317 | }); |
|
6328 | 6328 | }); |
6329 | 6329 | }; |
6330 | 6330 | graticule.outline = function() { |
| 6331 | + var x2 = (x0 + x1) / 2; |
6331 | 6332 | return { |
6332 | 6333 | type: "Polygon", |
6333 | | - coordinates: [ [ [ x0, y0 ], [ x1, y0 ], [ x1, y1 ], [ x0, y1 ], [ x0, x0 ] ] ] |
| 6334 | + coordinates: [ [ [ x0, y1 ], [ x2, y1 ], [ x1, y1 ], [ x1, y0 ], [ x2, y0 ], [ x0, y0 ], [ x0, y1 ] ] ] |
6334 | 6335 | }; |
6335 | 6336 | }; |
6336 | 6337 | graticule.extent = function(_) { |
|
0 commit comments