Package org.zkoss.gmaps.event

Examples of org.zkoss.gmaps.event.InfoChangeEvent


      final MapZoomEvent evt = MapZoomEvent.getMapZoomEvent(request);
      final int zoom = evt.getZoom();
      setZoomByClient(zoom);
      Events.postEvent(evt);
    } else if (cmd.equals("onInfoChange")) {
      final InfoChangeEvent evt = InfoChangeEvent.getInfoChangeEvent(request);
      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 mapZoomEvent(@ContextParam(ContextType.BIND_CONTEXT) BindContext ctx) {
    _mapsvm.setMzeData((MapZoomEvent)ctx.getTriggerEvent());
  }
  @Command @NotifyChange({"miceData", "firstMarkersvm", "secondMarkersvm", "infovm"})
  public void infoChangeEvent(@ContextParam(ContextType.BIND_CONTEXT) BindContext ctx) {
    InfoChangeEvent event = (InfoChangeEvent)ctx.getTriggerEvent();
    _mapsvm.setMiceData(event);
    Ginfo info = event.getInfo();
    if (info instanceof Gmarker)
      _markersvmMap.get(info.getId()).setOpen(false);
    else
      _infovm.setOpen(false);
  }
View Full Code Here

TOP

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

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.