Skip to content

Commit

Permalink
Forgot to export again
Browse files Browse the repository at this point in the history
  • Loading branch information
dabreegster committed May 20, 2024
1 parent 1fbff7f commit 7e232a3
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion route-snapper-ts/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "route-snapper-ts",
"description": "Draw routes in MapLibre snapped to a street network using client-side routing. TypeScript bindings",
"version": "0.0.4",
"version": "0.0.5",
"license": "Apache-2.0",
"repository": {
"type": "git",
Expand Down
3 changes: 2 additions & 1 deletion route-snapper-ts/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
import type { Feature, GeoJSON, LineString, Polygon, Position } from "geojson";
import type { Map, MapMouseEvent } from "maplibre-gl";
import init, { JsRouteSnapper } from "route-snapper";
import { splitRoute } from "./split";

export { init };
export { init, splitRoute };

const snapDistancePixels = 30;

Expand Down
2 changes: 1 addition & 1 deletion route-snapper-ts/src/split.ts
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,6 @@ function distanceAlongLine(line: Feature<LineString>, point: Feature<Point>) {

// Per https://datatracker.ietf.org/doc/html/rfc7946#section-11.2, 6 decimal
// places (10cm) is plenty of precision
export function setPrecision(pt: Position): Position {
function setPrecision(pt: Position): Position {
return [Math.round(pt[0] * 10e6) / 10e6, Math.round(pt[1] * 10e6) / 10e6];
}

0 comments on commit 7e232a3

Please sign in to comment.