Skip to content

Instantly share code, notes, and snippets.

View Omnyyah's full-sized avatar
🎯
Focusing

Omniyyah Omnyyah

🎯
Focusing
View GitHub Profile
@Omnyyah
Omnyyah / Drawing a curve path
Created April 22, 2018 10:47
A function to draw a curved path between 2 locations on google map
/drawing curved path but doesnt avoid obstacles
private void drawPath(LatLng userLocation,LatLng doorLocation,double k)
{
//Calculate distance and heading between two points
double d = SphericalUtil.computeDistanceBetween(userLocation,doorLocation);
double h = SphericalUtil.computeHeading(userLocation,doorLocation);
//Midpoint position
LatLng p = SphericalUtil.computeOffset(userLocation, d*0.5, h);
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.Scanner;
import java.lang.Object.*;
import java.util.List;
/**