ng2-heremaps
Version:
Here Maps for Angular 6
27 lines • 869 B
JavaScript
/**
* @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