@@ -22,7 +22,7 @@ npm install arc
2222``` js
2323import { GreatCircle } from ' arc' ;
2424const gc = new GreatCircle ({x: - 122 , y: 48 }, {x: - 77 , y: 39 });
25- const line = gc .Arc (100 );
25+ const line = gc .Arc (); // npoints is optional, defaults to 100
2626console .log (line .json ()); // GeoJSON output
2727```
2828
@@ -64,11 +64,12 @@ const gc = new GreatCircle(start, end, { name: 'Seattle to DC' });
6464
6565#### 3. Generate the arc
6666``` js
67- const line = gc .Arc (100 );
67+ const line = gc .Arc (); // defaults to 100 points
68+ const line = gc .Arc (500 ); // or specify a custom value
6869```
6970
7071** Parameters:**
71- - ` npoints ` (number): Number of intermediate points (higher = more accurate )
72+ - ` npoints ` (number, optional ): Number of intermediate points (higher = more precise, default: 100 )
7273
7374### TypeScript Support
7475
@@ -86,7 +87,7 @@ const end: CoordinatePoint = { x: -77, y: 39 };
8687const properties: RouteProperties = { name: ' Seattle to DC' , color: ' blue' };
8788
8889const gc = new GreatCircle (start , end , properties );
89- const line = gc .Arc (100 );
90+ const line = gc .Arc (); // npoints is optional, defaults to 100
9091
9192// Fully typed return values
9293const geojson = line .json (); // GeoJSONFeature
0 commit comments