app/src/main/java/com/find/wifitool/MapsActivity.java
private void checkForDestination(double x, double y)
    {
        if(tileView.getPathsDrawn() > 0) {
            // get destination coordinates
            XTileView.NavigablePath navP = tileView.getNavigablePath(pathId);
            double[] dest = navP.points.get(navP.points.size() - 1);

            if ((x == dest[0]) && (y == dest[1])) {
                tileView.removeNavigablePath(pathId);
                Toast.makeText(getApplicationContext(), ("Destination reached!"),
                        Toast.LENGTH_SHORT).show();
            }
        }
    }
// check if you've reached the destination
check if you've reached the destination
check if you ' ve reached the destination
private void checkForDestination(double x, double y)
    {
        if(tileView.getPathsDrawn() > 0) {
            XTileView.NavigablePath navP = tileView.getNavigablePath(pathId);
            double[] dest = navP.points.get(navP.points.size() - 1);
            if ((x == dest[0]) && (y == dest[1])) {
                tileView.removeNavigablePath(pathId);
                Toast.makeText(getApplicationContext(), ("Destination reached!"),
                        Toast.LENGTH_SHORT).show();
            }
        }
    }
private void checkForDestination ( double x , double y ) { if ( tileView . getPathsDrawn ( ) > 0 ) { XTileView . NavigablePath navP = tileView . getNavigablePath ( pathId ) ; double [ ] dest = navP . points . get ( navP . points . size ( ) - 1 ) ; if ( ( x == dest [ 0 ] ) && ( y == dest [ 1 ] ) ) { tileView . removeNavigablePath ( pathId ) ; Toast . makeText ( getApplicationContext ( ) , ( "Destination reached!" ) , Toast . LENGTH_SHORT ) . show ( ) ; } } }
check if you've reached the destination
check if you ' ve reached the destination
// get destination coordinates