コード例 #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 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;
 }