2017-09-26 13:57:25 +00:00
|
|
|
/**
|
|
|
|
* @flow
|
|
|
|
* GeoPoint representation wrapper
|
|
|
|
*/
|
|
|
|
|
2017-11-17 11:07:52 +00:00
|
|
|
/**
|
2017-09-26 13:57:25 +00:00
|
|
|
* @class GeoPoint
|
|
|
|
*/
|
|
|
|
export default class GeoPoint {
|
|
|
|
_latitude: number;
|
|
|
|
_longitude: number;
|
|
|
|
|
|
|
|
constructor(latitude: number, longitude: number) {
|
|
|
|
// TODO: Validation
|
|
|
|
// validate.isNumber('latitude', latitude);
|
|
|
|
// validate.isNumber('longitude', longitude);
|
|
|
|
|
|
|
|
this._latitude = latitude;
|
|
|
|
this._longitude = longitude;
|
|
|
|
}
|
|
|
|
|
2017-11-17 11:07:52 +00:00
|
|
|
get latitude(): number {
|
2017-09-26 13:57:25 +00:00
|
|
|
return this._latitude;
|
|
|
|
}
|
|
|
|
|
2017-11-17 11:07:52 +00:00
|
|
|
get longitude(): number {
|
2017-09-26 13:57:25 +00:00
|
|
|
return this._longitude;
|
|
|
|
}
|
|
|
|
}
|