Package de.fhpotsdam.unfolding.utils

Examples of de.fhpotsdam.unfolding.utils.ScreenPosition


  public void draw() {
    background(0);
    map.draw();

    for (Location location : rssGeoLocations) {
      ScreenPosition pos = map.getScreenPosition(location);
      drawEarthquakeMarker(pos);
    }
  }
View Full Code Here


    // Draws trail
    noStroke();
    for (int i = trackPointIndex; i > trackPointIndex - trailNumber; i--) {
      if (i > 0) {
        GPXUtils.TrackPoint tp = trackPoints.get(i);
        ScreenPosition pos = map.getScreenPosition(tp.location);

        float alpha = Math.round(PApplet.map(i, trackPointIndex, trackPointIndex - trailNumber, 255, 0));
        fill(255, 0, 255, alpha);
        ellipse(pos.x, pos.y, 12, 12);
      }
    }

    // Draws current position
    ScreenPosition currentPos = map.getScreenPosition(currentTrackPoint.location);
    stroke(255, 120);
    strokeWeight(2);
    fill(255, 0, 255, 200);
    ellipse(currentPos.x, currentPos.y, 16, 16);
View Full Code Here

    noStroke();
    fill(255, 170);
    rect(0, 0, width, height);

    ScreenPosition oldPos = null;
    int i = 0;
    for (GPXUtils.TrackPoint trackPoint : trackPoints) {
      ScreenPosition pos = map.getScreenPosition(trackPoint.location);
      if (i == 0) {
        // Draw starting point
        // stroke(20, 150);
        // strokeWeight(1);
        // fill(0, 255, 0);
View Full Code Here

    mapDetail.draw();
    mapOverview.draw();
    mapOverviewStatic.draw();

    // Finder box for overview map 3 levels zoomed in
    ScreenPosition tl1 = mapOverview.getScreenPosition(mapDetail.getTopLeftBorder());
    ScreenPosition br1 = mapOverview.getScreenPosition(mapDetail.getBottomRightBorder());
    drawDetailSelectionBox(tl1, br1);

    // Finder box for static overview map
    ScreenPosition tl2 = mapOverviewStatic.getScreenPosition(mapDetail.getTopLeftBorder());
    ScreenPosition br2 = mapOverviewStatic.getScreenPosition(mapDetail.getBottomRightBorder());
    drawDetailSelectionBox(tl2, br2);
  }
View Full Code Here

    mapDetail.draw();
    mapOverviewStatic.draw();

    // Viewport is updated by the actual area of the detail map
    ScreenPosition tl = mapOverviewStatic.getScreenPosition(mapDetail.getTopLeftBorder());
    ScreenPosition br = mapOverviewStatic.getScreenPosition(mapDetail.getBottomRightBorder());
    viewportRect.setDimension(tl, br);
    viewportRect.draw();
  }
View Full Code Here

  }

  @Override
  public void executeManipulationFor(UnfoldingMap map) {
    if (transformationCenterLocation != null) {
      ScreenPosition pos = map.mapDisplay.getScreenPosition(transformationCenterLocation);
      PVector transCenter = new PVector(pos.x, pos.y);
      map.mapDisplay.setInnerTransformationCenter(transCenter);
    }

    if (ZOOM_BY_LEVEL.equals(getSubType())) {
View Full Code Here

        int insideMarkerNumber = 0;

        // Count markers inside the current grid rectangle
        MarkerManager<Marker> markerManager = map.getDefaultMarkerManager();
        for (Marker m : markerManager.getMarkers()) {
          ScreenPosition pos = map.getScreenPosition(m.getLocation());
          if (pos.x > x && pos.x < x + gridWidth && pos.y > y && pos.y < y + gridHeight) {
            insideMarkerNumber++;
          }
        }
View Full Code Here

        // TODO Auto-generated catch block
        e.printStackTrace();
      }
      searchEvent = false;
    }
    ScreenPosition pos = map.getScreenPosition(loc);
    fill(0, 150);
    noStroke();
    ellipse(pos.x, pos.y, 20, 20);
    // println(map.getZoomLevel());
View Full Code Here

      }

      searchEvent = false;

    }
    ScreenPosition pos = map.getScreenPosition(loc);
    fill(0, 150);
    noStroke();
    ellipse(pos.x, pos.y, 20, 20);

  }
View Full Code Here

   *
   * Uses internal implemented {@link #isInside(float, float, float, float)} of the sub class.
   */
  @Override
  public boolean isInside(UnfoldingMap map, float checkX, float checkY) {
    ScreenPosition pos = getScreenPosition(map);
    return isInside(checkX, checkY, pos.x, pos.y);
  }
View Full Code Here

TOP

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

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.