I have to use key listener to fix some problems.

 MainApplication.getMap().mapView.requestFocus();
 MainApplication.getMap().mapView.addKeyListener(new KeyListener(){
        @Override
         public void keyTyped(KeyEvent e) {
            // TODO Auto-generated method stub
         }
         @Override
          public void keyPressed(KeyEvent e) {
              downloadCounter = 0;
              if (abort) {
                  removeKeyListenerAndTemporaryLayer(this);
                  return;
              }
              if (typedKeyUpperCase == 'V' || typedKeyUpperCase == '8') {
                      removeKeyListenerAndTemporaryLayer(this);
                      shorterRoutes = false;
                      System.out.println("backtracking start");
                      backtrack(currentWay,idx+1);
                 }
          @Override
           public void keyReleased(KeyEvent e) {
              // TODO Auto-generated method stub
          }
      });

in this piece of code after pressing 'V' it is not going inside the
function backtrack().it is printing "backtracking start" but not going
inside the function backtrack() I put some debug statement inside the
backtrack() to check function is getting called or not and it is not
getting called.

Reply via email to