mirror of
https://github.com/kingomarnajjar/flex-template-web.git
synced 2026-07-28 12:43:11 +10:00
Convert Google's LatLng to SDK's LatLng
This commit is contained in:
parent
2b0f3fb10d
commit
44df6c0534
1 changed files with 11 additions and 0 deletions
|
|
@ -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
|
||||
*
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue