Convert Google's LatLng to SDK's LatLng

This commit is contained in:
Vesa Luusua 2017-08-17 12:42:18 +03:00
parent 2b0f3fb10d
commit 44df6c0534

View file

@ -93,6 +93,17 @@ export const getPlacePredictions = search =>
});
});
/**
* Convert Google formatted LatLng object to Sharetribe SDK's LatLng coordinate format
*
* @param {LatLng} googleLatLng - Google Maps LatLng
*
* @return {SDKLatLng} - Converted latLng coordinate
*/
export const googleLatLngToSDKLatLng = googleLatLng => {
return new SDKLatLng(googleLatLng.lat(), googleLatLng.lng());
};
/**
* Convert Google formatted bounds object to Sharetribe SDK's bounds format
*