Need a unique gift idea?
A Pastebin account makes a great Christmas gift
SHARE
TWEET

Untitled

a guest Apr 16th, 2018 426 Never
Upgrade to PRO!
ENDING IN00days00hours00mins00secs
 
  1. package be.ac.ulb.infof307.g05;
  2.  
  3. import com.lynden.gmapsfx.javascript.event.GMapMouseEvent;
  4. import com.lynden.gmapsfx.javascript.event.MouseEventHandler;
  5.  
  6. public class MapLeftClickHandler implements MouseEventHandler{
  7.     private Map map;
  8.  
  9.     public MapLeftClickHandler(Map boundMap){
  10.         map = boundMap;
  11.     }
  12.  
  13.     public void handle(GMapMouseEvent event){
  14.         //TODO : change so that it creates the shop from UI infos before passing it to create the marker,
  15.         //i.e. : id (from db), coordinates, name, infos
  16.        
  17.         CustomMarker marker = map.getMarker(event.getLatLong());
  18.        
  19.         if (marker == null)
  20.         {      
  21.             System.out.println("==NULL");
  22.             Shop shop = new Shop(new GeoCoordinates(event.getLatLong()));
  23.             marker = new CustomMarker(shop, map);
  24.         }
  25.         else
  26.         {
  27.             System.out.println("!=NULL");
  28.         }
  29.         InfoPaneFrontend.getInstance().link(this.map) ;
  30.         marker.onClick();
  31.        
  32.     }
  33.  
  34. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top