< Rejseplan - PHP Api - Nearby stops
This will deliver all stops within a radius of a given coordinate.
use Lsv\Rejseplan\NearbyStops;
$response = (new NearbyStops($latitude, $longitude))
->request();
$latitude
float, latitude for a coordinate$longitude
float, longitude for a coordinate
Method | Description |
---|---|
setRadius( int ) | The radius in meters from the coordinate you will search for stops, The distance is calculated from straight line, and NOT according to roads, default 1000 meters |
setMaxResults( int ) | The max number of results you want, default 30 |
The output will be a NearbyStopsResponse object