app/src/main/java/com/find/wifitool/MapsActivity.java
private void navigation(NavigableItem item) {
        // check if there is already a path drawn and, if it is the case, the latter is removed
        if (tileView.getPathsDrawn() > 0)
            tileView.removeNavigablePath(pathId);

        MapGraph.State destination = multigraph.getState("R80");
        if (!"R11".equals(destination.id)) {
            List<MapGraph.State> path = multigraph.getPath(1, "R11", destination.id);
            List<double[]> positions = new ArrayList<>();
            for (MapGraph.State s : path) {
                //s = changeCoords(s);
                positions.add(new double[]{s.coords[0], s.coords[1]});
            }
            //positions.remove(0);

            pathId = mySensor.id + "-" + destination.id;
            tileView.drawNavigablePath(pathId, new XTileView.NavigablePath(positions),0);


        }
    }
// Find a path from actual location to the selected room and draw it
Find a path from actual location to the selected room and draw it
Find a path from actual location to the selected room and draw it
private void navigation(NavigableItem item) {
        if (tileView.getPathsDrawn() > 0)
            tileView.removeNavigablePath(pathId);
        MapGraph.State destination = multigraph.getState("R80");
        if (!"R11".equals(destination.id)) {
            List<MapGraph.State> path = multigraph.getPath(1, "R11", destination.id);
            List<double[]> positions = new ArrayList<>();
            for (MapGraph.State s : path) {
                positions.add(new double[]{s.coords[0], s.coords[1]});
            }
            pathId = mySensor.id + "-" + destination.id;
            tileView.drawNavigablePath(pathId, new XTileView.NavigablePath(positions),0);
        }
    }
private void navigation ( NavigableItem item ) { if ( tileView . getPathsDrawn ( ) > 0 ) tileView . removeNavigablePath ( pathId ) ; MapGraph . State destination = multigraph . getState ( "R80" ) ; if ( ! "R11" . equals ( destination . id ) ) { List < MapGraph . State > path = multigraph . getPath ( 1 , "R11" , destination . id ) ; List < double [ ] > positions = new ArrayList < > ( ) ; for ( MapGraph . State s : path ) { positions . add ( new double [ ] { s . coords [ 0 ] , s . coords [ 1 ] } ) ; } pathId = mySensor . id + "-" + destination . id ; tileView . drawNavigablePath ( pathId , new XTileView . NavigablePath ( positions ) , 0 ) ; } }
Find a path from actual location to the selected room and draw it
Find a path from actual location to the selected room and draw it
// check if there is already a path drawn and, if it is the case, the latter is removed //s = changeCoords(s); //positions.remove(0);