@@ -6,29 +6,21 @@ d3.geo.graticule = function() {
66 precision = 2.5 ;
77
88 function graticule ( ) {
9- return {
10- type : "GeometryCollection" ,
11- geometries : graticule . lines ( )
12- } ;
9+ return { type : "GeometryCollection" , geometries : graticule . lines ( ) } ;
1310 }
1411
1512 graticule . lines = function ( ) {
1613 return d3 . range ( Math . ceil ( x0 / dx ) * dx , x1 , dx ) . map ( x )
1714 . concat ( d3 . range ( Math . ceil ( y0 / dy ) * dy , y1 , dy ) . map ( y ) )
18- . map ( function ( coordinates ) {
19- return {
20- type : "LineString" ,
21- coordinates : coordinates
22- } ;
23- } ) ;
15+ . map ( function ( coordinates ) { return { type : "LineString" , coordinates : coordinates } ; } ) ;
2416 }
2517
2618 graticule . outline = function ( ) {
2719 return {
2820 type : "Polygon" ,
2921 coordinates : [
30- x ( x0 )
31- . concat ( y ( y1 ) . slice ( 1 ) ,
22+ x ( x0 ) . concat (
23+ y ( y1 ) . slice ( 1 ) ,
3224 x ( x1 ) . reverse ( ) . slice ( 1 ) ,
3325 y ( y0 ) . reverse ( ) . slice ( 1 ) )
3426 ]
@@ -63,18 +55,10 @@ d3.geo.graticule = function() {
6355
6456function d3_geo_graticuleX ( y0 , y1 , dy ) {
6557 var y = d3 . range ( y0 , y1 - ε , dy ) . concat ( y1 ) ;
66- return function ( x ) {
67- return y . map ( function ( y ) {
68- return [ x , y ] ;
69- } ) ;
70- } ;
58+ return function ( x ) { return y . map ( function ( y ) { return [ x , y ] ; } ) ; } ;
7159}
7260
7361function d3_geo_graticuleY ( x0 , x1 , dx ) {
7462 var x = d3 . range ( x0 , x1 - ε , dx ) . concat ( x1 ) ;
75- return function ( y ) {
76- return x . map ( function ( x ) {
77- return [ x , y ] ;
78- } ) ;
79- } ;
63+ return function ( y ) { return x . map ( function ( x ) { return [ x , y ] ; } ) ; } ;
8064}
0 commit comments