Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package be.ac.ulb.infof307.g05;
- import com.lynden.gmapsfx.javascript.event.GMapMouseEvent;
- import com.lynden.gmapsfx.javascript.event.MouseEventHandler;
- public class MapLeftClickHandler implements MouseEventHandler{
- private Map map;
- public MapLeftClickHandler(Map boundMap){
- map = boundMap;
- }
- public void handle(GMapMouseEvent event){
- //TODO : change so that it creates the shop from UI infos before passing it to create the marker,
- //i.e. : id (from db), coordinates, name, infos
- CustomMarker marker = map.getMarker(event.getLatLong());
- if (marker == null)
- {
- System.out.println("==NULL");
- Shop shop = new Shop(new GeoCoordinates(event.getLatLong()));
- marker = new CustomMarker(shop, map);
- }
- else
- {
- System.out.println("!=NULL");
- }
- InfoPaneFrontend.getInstance().link(this.map) ;
- marker.onClick();
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement