Package de.fhpotsdam.unfolding.utils

Examples of de.fhpotsdam.unfolding.utils.MapPosition


    addLocations(toMarker.getLocation());
  }

  @Override
  public void draw(PGraphics pg, List<MapPosition> mapPositions) {
    MapPosition from = mapPositions.get(0);
    MapPosition to = mapPositions.get(1);
    pg.line(from.x, from.y, to.x, to.y);
  }
View Full Code Here


    }
    pg.strokeWeight(strokeWeight);
    pg.smooth();

    pg.beginShape(PConstants.LINES);
    MapPosition last = mapPositions.get(0);
    for (int i = 1; i < mapPositions.size(); ++i) {
      MapPosition mp = mapPositions.get(i);
      pg.vertex(last.x, last.y);
      pg.vertex(mp.x, mp.y);

      last = mp;
    }
View Full Code Here

    List<MapPosition> mapPositions = new ArrayList<MapPosition>();

    for (Location loc : getLocations()) {
      float[] xy = map.mapDisplay.getObjectFromLocation(loc);
      mapPositions.add(new MapPosition(xy));
    }

    draw(pg, mapPositions, properties, map);
  }
View Full Code Here

    pg.pushStyle();

    @SuppressWarnings("unchecked")
    List<Double> speedList = (List<Double>) properties.get("speedList");

    MapPosition oldPos = null;
    for (int i = 0; i < mapPositions.size(); i++) {
      MapPosition pos = mapPositions.get(i);
      if (i > 0) {       
        // Draw a line
        pg.strokeWeight(4);
        // Map speed to color of line
        pg.stroke(255 - PApplet.map(speedList.get(i).floatValue(), 0, 30, 0, 255),
View Full Code Here

TOP

Related Classes of de.fhpotsdam.unfolding.utils.MapPosition

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.