UNPKG

ng2-heremaps

Version:
27 lines 869 B
/** * @fileoverview added by tsickle * @suppress {checkTypes} checked by tsc */ /** * Converts supported type of geo point to LatLong object. * If geoPoint parameter is null or undefined then function will return geo center * {lat: 0, lng: 0} * @param {?} geoPoint Any supported type of geo point * @return {?} */ export function toLatLng(geoPoint) { if (geoPoint) { return { lat: 'lat' in geoPoint ? (/** @type {?} */ (geoPoint)).lat : (/** @type {?} */ (geoPoint)).latitude, lng: 'lng' in geoPoint ? (/** @type {?} */ (geoPoint)).lng : 'lon' in geoPoint ? (/** @type {?} */ (geoPoint)).lon : (/** @type {?} */ (geoPoint)).longitude }; } return { lat: 0, lng: 0 }; } //# sourceMappingURL=position.js.map