Skip to content

Commit

Permalink
mention result distance in readme (#105)
Browse files Browse the repository at this point in the history
Document "distance" property.
  • Loading branch information
stevage authored Jun 26, 2024
1 parent e14ebd9 commit 6502542
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,11 @@ It will be guaranteed to be a global optimum within the given precision.
Given polygon coordinates in
[GeoJSON-like format](http://geojson.org/geojson-spec.html#polygon)
and precision (`1.0` by default),
Polylabel returns the pole of inaccessibility coordinate in `[x, y]` format.
Polylabel returns the pole of inaccessibility coordinate in `[x, y]` format. The distance (in source units, usually degrees) is included as a `distance` property.

```js
var p = polylabel(polygon, 1.0);
const p = polylabel(polygon, 1.0);
const distance = p.distance;
```

### TypeScript
Expand Down

0 comments on commit 6502542

Please sign in to comment.