Package de.fhpotsdam.unfolding.geo

Examples of de.fhpotsdam.unfolding.geo.Location


  }

  public List<Dot> createRandomDots(int dotNumbers) {
    List<Dot> dots = new ArrayList<Dot>();
    for (int i = 0; i < dotNumbers; i++) {
      Dot dot = new Dot(new Location(random(-85, 85), random(-180, 180)), new Date());
      dots.add(dot);
    }
    return dots;
  }
View Full Code Here


    map1 = new UnfoldingMap(this, "map1", new Microsoft.AerialProvider());
    map2 = new UnfoldingMap(this, "map2", new Microsoft.AerialProvider());
    MapUtils.createDefaultEventDispatcher(this, map1, map2);

    map1.zoomAndPanTo(new Location(56.27415, 130.97737), 13);
    map2.zoomAndPanTo(new Location(55.99591, 131.3102), 13);
  }
View Full Code Here

  UnfoldingMap map2;

  public void setup() {
    size(800, 600, OPENGL);
   
    Location berlinLocation = new Location(52.439046f, 13.447266f);
    map1 = new UnfoldingMap(this, "map1", new Microsoft.RoadProvider());
    map1.zoomAndPanTo(berlinLocation, 11);

    map2 = new UnfoldingMap(this, "map2", new ImmoScout.HeatMapProvider());
    map2.zoomAndPanTo(berlinLocation, 11);
View Full Code Here

    mapDay = new UnfoldingMap(this);
    mapNight = new UnfoldingMap(this, new MBTilesMapProvider(JDBC_CONN_STRING_APPLET));

    mapDay.setZoomRange(1, 3);
    mapDay.zoomToLevel(3);
    mapDay.panTo(new Location(49.6f, 9.4f));
    mapNight.setZoomRange(1, 3);
    mapNight.zoomToLevel(3);
    mapNight.panTo(new Location(49.6f, 9.4f));

    MapUtils.createDefaultEventDispatcher(this, mapDay, mapNight);
  }
View Full Code Here

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

    // map = new UnfoldingMap(this, 0, 60, 800, 540, new MBTilesMapProvider("jdbc:sqlite:./berlin-dark.mbtiles"));
    map = new UnfoldingMap(this, 0, 60, 800, 540, new StamenMapProvider.TonerLite());
    map.zoomAndPanTo(new Location(52.5f, 13.4f), 15);
    map.setZoomRange(10, 17);
    MapUtils.createDefaultEventDispatcher(this, map);

    // Create marker
    List<Feature> features = GPXReader.loadData(this, "data/bike-tour2.gpx");
    // List<Feature> features = GPXReader.loadData(this, "data/bike-tour.gpx");

    println("Loaded " + features.size() + " features");
    // MarkerFactory markerFactory = new MarkerFactory();
    // List<Marker> markers = markerFactory.createMarkers(features);
    // map.addMarkers(markers);

    // Center around bike path (by panning to center of all features)
    locations = GeoUtils.getLocationsFromFeatures(features);
    Location center = GeoUtils.getEuclideanCentroid(locations);
    map.panTo(center);

    // UI
    cp5 = new ControlP5(this);
    cp5.addSlider("simplificationTolerance").setPosition(20, 25).setRange(0, 25).setCaptionLabel("Simplification");
View Full Code Here

    mapZoomX = x - mapOverlay.mapDisplay.getWidth() / 2;
    mapZoomY = y - mapOverlay.mapDisplay.getHeight() / 2;
    mapOverlay.move(mapZoomX, mapZoomY);

    // Read geo location of the mouse position from the background map
    Location locationOnOverviewMap = mapOverview.getLocation(x, y);
    // Pan the small map toward that location
    mapOverlay.panTo(locationOnOverviewMap);
  }
View Full Code Here

    mapZoomX = mouseX - mapZoom.mapDisplay.getWidth() / 2;
    mapZoomY = mouseY - mapZoom.mapDisplay.getHeight() / 2;
    mapZoom.move(mapZoomX, mapZoomY);

    // Read geo location of the mouse position from the background map
    Location locationOnStaticMap = mapStatic.getLocation(mouseX, mouseY);
    // Pan the small map toward that location
    mapZoom.panTo(locationOnStaticMap);
  }
View Full Code Here

  }

  private List<Dot> createRandomDots(int dotNumbers) {
    List<Dot> dots = new ArrayList<Dot>();
    for (int i = 0; i < dotNumbers; i++) {
      Dot dot = new Dot(new Location(random(-85, 85), random(-180, 180)), new Date());
      dots.add(dot);
    }
    return dots;
  }
View Full Code Here

  }

  private List<Dot> createRandomDots(int dotNumbers) {
    List<Dot> dots = new ArrayList<Dot>();
    for (int i = 0; i < dotNumbers; i++) {
      Dot dot = new Dot(new Location(random(-85, 85), random(-180, 180)), new Date());
      dots.add(dot);
    }
    return dots;
  }
View Full Code Here

  }

  private List<Dot> createRandomDots(int dotNumbers) {
    List<Dot> dots = new ArrayList<Dot>();
    for (int i = 0; i < dotNumbers; i++) {
      Dot dot = new Dot(new Location(random(-85, 85), random(-180, 180)), new Date());
      dots.add(dot);
    }
    return dots;
  }
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.