Skip to content

Add route and isochrone methods backed by Felt's routing service - #146

Closed
noisyneuron wants to merge 1 commit into
mainfrom
sukanya/routing-methods
Closed

noisyneuron wants to merge 1 commit into
mainfrom
sukanya/routing-methods

Conversation

@noisyneuron

Copy link
Copy Markdown
Contributor

Extensions and embeds can now ask Felt's routing service for a route through a list of waypoints, or for the area reachable from a point within a travel time, and get geometry back without anything being drawn on the map. A route comes back as a GeoJSON LineString with its distance in metres and duration in seconds, so it can be passed straight on to methods that take a line. An isochrone always comes back as a single MultiPolygon, so a reachable area that splits into disconnected parts keeps every part. Waypoints and the origin are { latitude, longitude } objects, matching how the SDK already names single places. The travel mode is routingMode, as on route elements and the route tool, but without "flying", since the service only follows roads and paths; the mode of transport on route elements is now the exported RoutingMode type so the relationship is visible.

Input limits (2–50 waypoints, travel time above 0 and at most 120 minutes) are enforced by the SDK's schema, so out-of-range requests are rejected before they reach Felt. Both methods live in a new Routing module with its own docs page and section in llms-full.txt.

Test plan

  1. Against a Felt build that handles these messages, call felt.getRoute({ waypoints: [a, b], routingMode: "driving" }) with two points a few streets apart. Observe that the promise resolves to a LineString that follows roads, plus a distance in metres and a duration in seconds.
  2. Call felt.getIsochrone({ origin: a, routingMode: "walking", minutes: 15 }) on a map whose workspace plan includes isochrones. Observe that it resolves to { geometry } with type: "MultiPolygon".
  3. Call felt.getRoute with one waypoint, or felt.getIsochrone with minutes: 0. Observe that the promise rejects before any request is made.

Made with Cursor

Co-authored-by: Cursor <cursoragent@cursor.com>
@noisyneuron noisyneuron closed this Oct 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant