Пример #1
0
 private Color getMainStreetColor(HighwayType type, boolean border) {
   Color col;
   if (DO_COLORFULL) {
     col =
         Color.getHSBColor(
             type.ordinal() / ((float) HighwayType.values().length), 0.2f, border ? 0.7f : 1f);
   } else {
     col = Color.BLACK;
   }
   return col;
 }
Пример #2
0
 private float getStreetWidth(int zoom, EdgeProperties p) {
   float width;
   if (p.getType() != HighwayType.Tertiary
       && p.getType() != HighwayType.Unclassified
       && p.getType() != HighwayType.Residential) {
     width = (HighwayType.values().length - p.getType().ordinal()) * 6 / (20f - zoom) + 2;
   } else {
     width = Math.max(28 - (20 - zoom) * 5, 1);
   }
   return width;
 }