private Iterable<GeographicText> makeIterable(DrawContext dc) {
   // get dispay dist for this service for use in label annealing
   double maxDisplayDistance = this.getPlaceNameService().getMaxDisplayDistance();
   ArrayList<GeographicText> list = new ArrayList<GeographicText>();
   for (int i = 0; i < this.numEntries; i++) {
     CharSequence str = getText(i);
     Position pos = getPosition(i);
     GeographicText text = new UserFacingText(str, pos);
     text.setFont(this.placeNameService.getFont());
     text.setColor(this.placeNameService.getColor());
     text.setBackgroundColor(this.placeNameService.getBackgroundColor());
     text.setVisible(isNameVisible(dc, this.placeNameService, pos));
     text.setPriority(maxDisplayDistance);
     list.add(text);
   }
   return list;
 }
Exemplo n.º 2
0
  public Iterable<GeographicText> makeIterable(DrawContext dc) {
    double maxDisplayDistance = this.geoNames.getMaxDisplayDistance();
    ArrayList<GeographicText> list = new ArrayList<GeographicText>();

    for (GeoName geoName : getGeoNameList()) {
      CharSequence str = getText(geoName);
      Position pos = getPosition(geoName);
      GeographicText text = new UserFacingText(str, pos);
      text.setFont(this.geoNames.font);
      text.setColor(this.geoNames.getColor());
      text.setBackgroundColor(this.geoNames.getBackgroundColor());
      text.setVisible(GeoNameLayer.isNameVisible(dc, this.geoNames, pos));
      text.setPriority(maxDisplayDistance);
      list.add(text);
    }
    return list;
  }