Package org.zkoss.gmaps.event

Examples of org.zkoss.gmaps.event.MapDropEvent


    } 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


   * @since 5.0.0
   */
  public void service(org.zkoss.zk.au.AuRequest request, boolean everError) {
    final String cmd = request.getCommand();
    if (cmd.equals("onMapDrop")) {
      final MapDropEvent evt = MapDropEvent.getMapDropEvent(request);
      setAnchorByClient(evt.getLatLng());
      Events.postEvent(evt);
    } else
      super.service(request, everError);
  }
View Full Code Here

    }
  }

  @Command @NotifyChange({"mdeData", "firstMarkersvm", "secondMarkersvm"})
  public void mapDropEvent(@ContextParam(ContextType.BIND_CONTEXT) BindContext ctx) {
    MapDropEvent event = (MapDropEvent)ctx.getTriggerEvent();
    _mapsvm.setMdeData(event);
    if (event.getDragged() instanceof Gmarker) {
      GmarkersVM vm = _markersvmMap.get(((Gmarker)event.getDragged()).getId());
      vm.setLat(event.getLat());
      vm.setLng(event.getLng());
    }
  }
View Full Code Here

TOP

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

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.