コード例 #1
0
 @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);
   }
 }
コード例 #2
0
 public GmarkersVM getSecondMarkersvm() {
   if (_markersvmTwo == null) {
     _markersvmTwo = new GmarkersVM();
     _markersvmTwo.setId("secondMarker");
     _markersvmTwo.setLat(23.1);
     _markersvmTwo.setLng(121.1);
     _markersvmTwo.setContent("test test second marker");
     _markersvmMap.put("secondMarker", _markersvmTwo);
   }
   return _markersvmTwo;
 }
コード例 #3
0
 @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());
   }
 }
コード例 #4
0
 public GmarkersVM getFirstMarkersvm() {
   if (_markersvmOne == null) {
     _markersvmOne = new GmarkersVM();
     _markersvmOne.setId("firstMarker");
     _markersvmOne.setLat(23);
     _markersvmOne.setLng(121);
     _markersvmOne.setMinzoom(9);
     _markersvmOne.setMaxzoom(11);
     _markersvmOne.setIconImage("/img/Briefcase-16x16.png");
     _markersvmOne.setIconAnchorX(0);
     _markersvmOne.setIconAnchorY(0);
     _markersvmOne.setIconHeight(50);
     _markersvmOne.setIconWidth(50);
     _markersvmOne.setIconShadow("/img/QuestionmarkButton-16x16.png");
     _markersvmOne.setIconShadowHeight(80);
     _markersvmOne.setIconShadowWidth(80);
     _markersvmOne.setContent("test test one");
     _markersvmOne.setOpen(true);
     _markersvmOne.setDraggingEnabled(true);
     _markersvmMap.put("firstMarker", _markersvmOne);
   }
   return _markersvmOne;
 }