Ejemplo n.º 1
0
 /**
  * Method allowing to update the user point list when adding a new map overlay
  *
  * @param longitude
  * @param latitude
  * @param userLogin
  */
 public void addUserPoint(double longitude, double latitude) {
   if (Session.isAuthenticatedUser) {
     container.getMapPointInfo().getValidateButton().setVisible(true);
     UserPoint userPoint = new UserPoint(latitude, longitude);
     authUserPoints.add(userPoint);
   }
 }
Ejemplo n.º 2
0
 /**
  * Method allowing to update the user point list when deleting an overlay from the map
  *
  * @param longitude
  * @param latitude
  */
 public void deleteUserPoint(double longitude, double latitude) {
   if (Session.isAuthenticatedUser) {
     container.getMapPointInfo().getValidateButton().setVisible(true);
     for (UserPoint userPoint : authUserPoints) {
       if ((userPoint.getLongitude().doubleValue() == longitude)
           && (userPoint.getLatitude().doubleValue() == latitude)) {
         authUserPoints.remove(userPoint);
         break;
       }
     }
   }
 }
Ejemplo n.º 3
0
 /**
  * Method allowing to update the user point when dragging an overlay on the map
  *
  * @param oldLong
  * @param oldLat
  * @param newLong
  * @param newLat
  */
 public void updateUserPoint(double oldLong, double oldLat, double newLong, double newLat) {
   if (Session.isAuthenticatedUser) {
     container.getMapPointInfo().getValidateButton().setVisible(true);
     for (UserPoint userPoint : authUserPoints) {
       if ((userPoint.getLongitude().doubleValue() == oldLong)
           && (userPoint.getLatitude().doubleValue() == oldLat)) {
         userPoint.setLongitude(new Double(newLong));
         userPoint.setLatitude(new Double(newLat));
         break;
       }
     }
   }
 }