Skip to content

Instantly share code, notes, and snippets.

@princessjanf
Last active December 4, 2017 15:39
Show Gist options
  • Save princessjanf/09e1f61b499da78fd11383b47413e369 to your computer and use it in GitHub Desktop.
Save princessjanf/09e1f61b499da78fd11383b47413e369 to your computer and use it in GitHub Desktop.
merge latitude and longitude to fit google directions api format
mergeLot(){
if (this.state.latitude != null && this.state.longitude!=null)
{
let concatLot = this.state.latitude +","+this.state.longitude
this.setState({
concat: concatLot
}, () => {
this.getDirections(concatLot, "-6.270565,106.759550");
});
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment