Package org.zkoss.gmaps.event

Examples of org.zkoss.gmaps.event.MapMouseEvent


      setInfoByClient(evt.getInfo());
      Events.postEvent(evt);
    } else if (cmd.equals("onMapClick")
        || cmd.equals("onMapDoubleClick")
        || cmd.equals("onMapRightClick")) {
      final MapMouseEvent evt = MapMouseEvent.getMapMouseEvent(request);
      Events.postEvent(evt);
    } else if (cmd.equals(Events.ON_SELECT)) {
      SelectEvent evt = SelectEvent.getSelectEvent(request);
      Set selItems = evt.getSelectedItems();
      final Component mitem =  selItems == null || selItems.isEmpty() ?
          null : (Component) selItems.iterator().next();
      setSelectedItem(mitem);
      Events.postEvent(evt);
    } else if (cmd.equals("onMapTypeChange")) {
      final MapTypeChangeEvent evt = MapTypeChangeEvent.getMapTypeChangeEvent(request);
      setMapTypeByClient(evt.getType());
      Events.postEvent(evt);
    } else if (cmd.equals("onMapDrop")) {
      final MapDropEvent evt = MapDropEvent.getMapDropEvent(request);
      final Component dragged = evt.getDragged();
      if (dragged instanceof Gmarker)
        ((Gmarker) dragged).setAnchor(evt.getLatLng());
      Events.postEvent(evt);
    } else
      super.service(request, everError);
  }
View Full Code Here


  public void changeMapType() {
   
  }
  @Command @NotifyChange({"mmeData", "firstMarkersvm", "secondMarkersvm"})
  public void mapMouseEvent(@ContextParam(ContextType.BIND_CONTEXT) BindContext ctx) {
    MapMouseEvent event = (MapMouseEvent)ctx.getTriggerEvent();
    _mapsvm.setMmeData(event);
    if ("onMapClick".equals(event.getName()) && (event.getReference() instanceof Gmarker)) {
      GmarkersVM vm = _markersvmMap.get(((Gmarker)event.getReference()).getId());
      if (!vm.getOpen())
        vm.setOpen(true);
    }
  }
View Full Code Here

TOP

Related Classes of org.zkoss.gmaps.event.MapMouseEvent

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.