コード例 #1
0
ファイル: Mapper.java プロジェクト: alexvas/Windsor-Hum
  @Override
  public void dispatch(OverviewEvent event) {
    detachOverview();
    overview.clear();

    if (map == null) {
      pendingOverview = event;
      return;
    }
    for (HumProxy hum : event.hums) {
      PointProxy point = hum.getPoint();
      HumProxy.Level level = hum.getLevel();

      if (point == null || level == null) {
        continue;
      }

      MarkerOptions opts =
          new MarkerOptions.Builder(LatLng.newInstance(point.getLat(), point.getLng()))
              .icon(levelHelper.icon(level))
              .shadow(shadowBuilder.getShadow())
              .animation(Animation.DROP)
              .draggable(false)
              .clickable(false)
              .build();
      Marker marker = Marker.newInstance(opts);
      overview.add(marker);
    }
    detachCurrentHum();
    attachOverview();
  }
コード例 #2
0
ファイル: Mapper.java プロジェクト: alexvas/Windsor-Hum
 @Override
 public void dispatch(LevelEvent event) {
   HumProxy.Level level = event.level;
   if (map == null || currentHum == null) {
     pendingLevel = event;
     return;
   }
   currentHum.setIcon(levelHelper.icon(level == null ? HumProxy.Level.HIGH : level));
 }
コード例 #3
0
ファイル: Mapper.java プロジェクト: alexvas/Windsor-Hum
 private Marker buildMarkerForCurrentHum(PointProxy point) {
   MarkerOptions opts =
       new MarkerOptions.Builder(LatLng.newInstance(point.getLat(), point.getLng()))
           .icon(levelHelper.icon(HumProxy.Level.HIGH))
           .shadow(shadowBuilder.getShadow())
           //                .shape(red.getShape())
           .animation(Animation.DROP)
           .draggable(true)
           .build();
   Marker marker = Marker.newInstance(opts);
   addDragendListener(marker, firePositionChange);
   return marker;
 }