geography-apis-sdk
Version:
SDK for making requests to Geography APIs
30 lines (23 loc) • 511 B
JavaScript
/**
* Represents the latitude and longitude coordinates.
*/
class LatLng {
/**
* Creates an instance of the LatLng class.
* @param {object} data - The coordinates data.
*/
constructor(data) {
if(typeof data == 'undefined') return;
/**
* The latitude coordinate.
* @type {number}
*/
this.lat = data.lat;
/**
* The longitude coordinate.
* @type {number}
*/
this.lng = data.lng;
}
}
module.exports = LatLng;