Package de.fhpotsdam.unfolding.geo

Examples of de.fhpotsdam.unfolding.geo.Location


    // Load population data
    dataEntriesMap = loadPopulationFromCSV("data/countries-data.csv");

    for (Feature country : countries) {
      // Calculates center to show single point marker for polygon feature
      Location location = GeoUtils.getCentroid(country, true);

      if (location != null) {
        SimplePointMarker marker = new SimplePointMarker(location);

        String countryId = country.getId();
View Full Code Here


  CompassUI compass;

  public void setup() {
    size(800, 600, OPENGL);
    map = new UnfoldingMap(this);
    map.zoomAndPanTo(new Location(52.5f, 13.4f), 10);
//    MapUtils.createDefaultEventDispatcher(this, map);

    compass = new CompassUI(this, map);
  }
View Full Code Here

  public void onManipulation(MapEvent mapEvent) {
    println("Map Interaction: " + mapEvent.getType() + " with subtype " + mapEvent.getSubType() + " in scope "
        + mapEvent.getScopeId());

    if (mapEvent.getType().equals(PanMapEvent.TYPE_PAN)) {
      Location location = map.getCenter();
      double dist = GeoUtils.getDistance(oldLocation, location);
      println("Panned by " + dist + " km");
      oldLocation = location;
    }
View Full Code Here

    size(800, 600, OPENGL);
    // size(1920, 1080, OPENGL);

    map = new UnfoldingMap(this);
    map.setTweening(false);
    map.zoomAndPanTo(13, new Location(1.283f, 103.833f));
    map.setPanningRestriction(new Location(1.283f, 103.833f), 30);

    eventDispatcher = new EventDispatcher();

    tuioCursorHandler = new TuioCursorHandler(this, false, map);
    eventDispatcher.addBroadcaster(tuioCursorHandler);
View Full Code Here

  public void keyPressed() {
    if (key == ' ') {
      log.debug("programmed: fire panTo + zoomTo");
      PanMapEvent panMapEvent = new PanMapEvent(this, maps.get(0).getId());
      Location location = new Location(52.4115f, 13.0516f);
      panMapEvent.setToLocation(location);
      eventDispatcher.fireMapEvent(panMapEvent);
      ZoomMapEvent zoomMapEvent = new ZoomMapEvent(this, maps.get(0).getId());
      zoomMapEvent.setSubType("zoomTo");
      zoomMapEvent.setZoomLevel(14);
View Full Code Here

  public void setup() {
    size(800, 600, OPENGL);

    map = new UnfoldingMap(this);
    map.zoomAndPanTo(new Location(52.5f, 13.4f), 10);
    MapUtils.createDefaultEventDispatcher(this, map);

    compassImg = loadImage("ui/compass_grey.png");
    compass = new CompassUI(this, map, compassImg, 700, 100);
  }
View Full Code Here

    size(800, 600, OPENGL);
    // size(1920, 1080, OPENGL);

    map = new UnfoldingMap(this);
    map.setTweening(false);
    map.zoomAndPanTo(13, new Location(54.5, 13.4));

    eventDispatcher = new EventDispatcher();

    tuioCursorHandler = new TuioCursorHandler(this, false, map);
    eventDispatcher.addBroadcaster(tuioCursorHandler);
View Full Code Here

    // log.debug("Add " + tuioCursor.getCursorID() + ": " + x + ", " + y);

    if (sketchTuioCursor == null) {
      // First finger: Use for sketching
      sketchTuioCursor = tuioCursor;
      Location location = map.getLocation(x, y);
      synchronized (locations) {
        locations.add(location);
      }
    } else {
      // Second finger: remove sketching cursor
View Full Code Here

    int x = tuioCursor.getScreenX(width);
    int y = tuioCursor.getScreenY(height);
    // log.debug("Update " + tuioCursor.getCursorID() + ": " + x + ", " + y);

    if (sketchTuioCursor != null && sketchTuioCursor.getCursorID() == tuioCursor.getCursorID()) {
      Location location = map.getLocation(x, y);
      synchronized (locations) {
        locations.add(location);
      }
    }
View Full Code Here

  public void setup() {
    size(800, 600, OPENGL);

    map = new UnfoldingMap(this);
    map.zoomAndPanTo(new Location(52.5f, 13.4f), 10);
    MapUtils.createDefaultEventDispatcher(this, map);

    // add a bar scale to your map
    barScale = new BarScaleUI(this, map, 700, 20);
View Full Code Here

TOP

Related Classes of de.fhpotsdam.unfolding.geo.Location

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.