code: @Override
      public void mouseClicked(MouseEvent evt) {
          final boolean left = SwingUtilities.isLeftMouseButton(evt);
          final boolean singleClick = (evt.getClickCount() == 1);
  
          if ((left && singleClick)) {
              Rectangle bounds = viewer.getViewportBounds();
              int x = bounds.x + evt.getX();
              int y = bounds.y + evt.getY();
              Point pixelCoordinates = new Point(x, y);
              mapClicked(viewer.getTileFactory().pixelToGeo(pixelCoordinates, viewer.getZoom()));
          }
      }
docs: Gets called on mouseClicked events, calculates the GeoPosition and fires
  the mapClicked method that the extending class needs to implement.
  
  @param evt the mouse event