Пример #1
0
 private static void drawEventsHod(SvgFile svg, List<UserData> users, Map<Integer, Zone> zones) {
   float strokeWidth = 0.5f;
   int ci = 0;
   for (UserData user : users) {
     for (Event e : user.getEvents()) {
       //				e.get
       Float hod = e.getHourOfDay();
       if (hod == null) continue;
       String stroke = getColour(scaleHod(hod));
       if (e.getGpsTagId() != 0) {
         Zone z = zones.get(e.getGpsTagId());
         if (z != null) {
           String fill = getZoneFill(z);
           float rx = (float) ((Math.random() - 0.5) * JITTER);
           float ry = (float) ((Math.random() - 0.5) * JITTER);
           float size = scaleD(z.getRadius());
           if (size < 1) size = 1;
           svg.circle(
               rx + scaleX(Mercator.mercX(z.getLon())),
               ry + scaleY(Mercator.mercY(z.getLat())),
               size,
               stroke,
               1.0f,
               fill,
               "fill-opacity=\"0.1\"");
         }
       }
     }
   }
 }
Пример #2
0
 private static void drawEvents(
     SvgFile svg, List<UserData> users, String overrideStroke, Map<Integer, Zone> zones) {
   float strokeWidth = 0.5f;
   int ci = 0;
   for (UserData user : users) {
     ci = ci + 1 % colors.length;
     String stroke = overrideStroke != null ? overrideStroke : colors[ci];
     for (Event e : user.getEvents()) {
       //				e.get
       if (e.getGpsTagId() != 0) {
         Zone z = zones.get(e.getGpsTagId());
         if (z != null) {
           String fill = getZoneFill(z);
           float rx = (float) ((Math.random() - 0.5) * JITTER);
           float ry = (float) ((Math.random() - 0.5) * JITTER);
           svg.circle(
               rx + scaleX(Mercator.mercX(z.getLon())),
               ry + scaleY(Mercator.mercY(z.getLat())),
               scaleD(z.getRadius()),
               stroke,
               1.0f,
               fill,
               "fill-opacity=\"0.1\"");
         }
       }
     }
   }
 }
Пример #3
0
 private static void drawZones2(SvgFile svg, Map<Integer, Zone> zones) {
   for (Zone z : zones.values()) {
     String fill = getZoneFill(z);
     float size = scaleD(z.getRadius());
     if (size < 1) size = 1;
     svg.circle(
         scaleX(Mercator.mercX(z.getLon())),
         scaleY(Mercator.mercY(z.getLat())),
         size,
         fill,
         0.0f,
         fill,
         " fill-opacity=\"15%\" stroke-opacity=\"20%\"");
   }
 }