get nearest stations

This block is part of the NS group and was last modified in core v15.0.0.

get nearest stations v15.0.0

Find the NS stations closest to a coordinate. Provide a geo point, or a separate latitude and longitude.

In pins 5 + flow
  • flow
  • Connection nsconnection required

    The NS connection.

  • Geo point geo_point required

    The coordinate to search around. • Hidden when other fields are filled

  • Latitude number required

    Latitude to search around (when not using a geo point). • Hidden when other fields are filled

  • Longitude number required

    Longitude to search around (when not using a geo point). • Hidden when other fields are filled

  • Limit number

    Maximum number of stations to return.

Out pins 6 + flow
  • flow
  • Connection nsconnection

    The NS connection.

  • Success condition

    True if the request succeeded.

  • Stations array

    The nearest stations, ordered by distance, each with a distance field and a geo_point.

  • Nearest station object

    The single closest station.

  • Count number

    Number of stations returned.

  • Error value

    Error message if the request failed.

dichtstbijzijnde station
nearest station

A typical wiring for get nearest stations: create feeds the geo_point pin; open connection feeds the flow pin; number feeds the latitude pin; open connection feeds the connection pin; number feeds the longitude pin; the flow out pin feeds debug.

Studio canvas example for the get nearest stations block: typical wiring for get nearest stations.

Commonly used with

In production blueprints, this block is most often wired together with:

  • create: feeds into this block. Generates a geo point based on the given latitude and longitude.
  • open connection: feeds into this block. Open a connection with the NS (Nederlandse Spoorwegen) Reisinformatie API. Reuse the resulting connection in the other NS blocks.
  • number: feeds into this block. Generates a valid number from the filled custom value in the blueprint.

Version history

Introduced in v15.0.0.


Back to NS Return to the main group to view all sub-groups Back to NS Return to the group to view all blocks within this group