Constructor
new Station(station)
Create a station.
Parameters:
Name | Type | Description |
---|---|---|
station |
Station~Object |
The station object. |
Properties:
Name | Type | Description |
---|---|---|
station |
Station~Object |
The station object. |
- Source:
Methods
getId() → {number}
Returns the station id.
- Source:
getName() → {string}
Returns the station name.
- Source:
Example
const station = new Station(stationObject);
const stationName = station.getName();
// => "Poznan-Dabrowskiego"
getCoordinates() → {Station~Coordinates}
Returns the station coordinates.
- Source:
Example
const station = new Station(stationObject);
const stationCoordinates = station.getCoordinates();
// => { lat: 52.420319, lon: 16.877289 }
getCity() → {Station~City}
Returns the station city information.
- Source:
Example
const station = new Station(stationObject);
const stationCity = station.getCity();
// => { id: 729, name: "Poznań", address: "ul. Dąbrowskiego 169", voivodeship: "WIELKOPOLSKIE" }
getRaw() → {Station~Object}
Returns the station raw object.
- Source:
Type Definitions
Object :object
Station object
Properties:
Name | Type | Description | ||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
id |
number |
The station id |
||||||||||||||||||||||||
stationName |
string |
The station name |
||||||||||||||||||||||||
gegrLat |
string |
The station Latitude |
||||||||||||||||||||||||
gegrLon |
string |
The station Longitude |
||||||||||||||||||||||||
city |
object |
The station city object Properties
|
- Source:
City :object
Station city object
Properties:
Name | Type | Description |
---|---|---|
id |
number |
The city id |
name |
string |
The city name |
address |
string |
The city address |
voivodeship |
string |
The city voivodeship |
- Source:
Coordinates :object
Staion coordinates object
Properties:
Name | Type | Description |
---|---|---|
lat |
number |
The latitude value |
lon |
number |
The longitude value |
- Source: