Package de.fhpotsdam.unfolding.geo

Examples of de.fhpotsdam.unfolding.geo.Location


    map = new UnfoldingMap(this);
    map.zoomTo(3);
    MapUtils.createDefaultEventDispatcher(this, map);

    MyLinesMarker lineMarker = new MyLinesMarker(new Location(10, 10), new Location(12, 20));
    map.addMarkers(lineMarker);
  }
View Full Code Here


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

    map = new UnfoldingMap(this);
    map.zoomToLevel(11);
    map.panTo(new Location(52.53f, 13.4f));
    MapUtils.createDefaultEventDispatcher(this, map);

    initMarkers();
  }
View Full Code Here

    // Create Markers from random Locations
    List<Marker> markers = new ArrayList<Marker>();
    List<Marker> connectionMarkers = new ArrayList<Marker>();

    for (int i = 0; i < 30; i++) {
      markers.add(new SimplePointMarker(new Location(random(52.46f, 52.61f), random(13.23f, 13.54f))));
    }

    // Create connections between near-by markers
    for (Marker marker : markers) {
      for (Marker markerTo : markers) {
View Full Code Here

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

    map = new UnfoldingMap(this);
    map.zoomToLevel(2);
    map.panTo(new Location(58.631217f, -101.601562f));
    MapUtils.createDefaultEventDispatcher(this, map);

    initPolygons();
  }
View Full Code Here

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

    map = new UnfoldingMap(this);
    map.zoomAndPanTo(new Location(41.50, -72.38), 5);
   
    MapUtils.createDefaultEventDispatcher(this, map);

    markerManager = populateMarkerManager();
    detailsMarkerManager = populateDetailsMarkerManager();
View Full Code Here

  }

  private MarkerManager<Marker> populateMarkerManager() {
    MarkerManager<Marker> markerManager = new MarkerManager<Marker>();

    SimplePointMarker nycMarker = new SimplePointMarker(new Location(40.71, -73.99));
    nycMarker.setRadius(20);
    markerManager.addMarker(nycMarker);

    SimplePointMarker bostonMarker = new SimplePointMarker(new Location(42.35, -71.04));
    bostonMarker.setRadius(20);
    markerManager.addMarker(bostonMarker);

    return markerManager;
  }
View Full Code Here

  }

  private MarkerManager<Marker> populateDetailsMarkerManager() {
    MarkerManager<Marker> markerManager = new MarkerManager<Marker>();

    Marker nycMarker1 = new SimplePointMarker(new Location(40.763, -73.979));
    markerManager.addMarker(nycMarker1);
    Marker nycMarker2 = new SimplePointMarker(new Location(40.852, -73.882));
    markerManager.addMarker(nycMarker2);
    Marker nycMarker3 = new SimplePointMarker(new Location(40.656, -73.944));
    markerManager.addMarker(nycMarker3);
    Marker nycMarker4 = new SimplePointMarker(new Location(40.739, -73.802));
    markerManager.addMarker(nycMarker4);

    Marker bostonMarker1 = new SimplePointMarker(new Location(42.3603, -71.060));
    markerManager.addMarker(bostonMarker1);
    Marker bostonMarker2 = new SimplePointMarker(new Location(42.3689, -71.097));
    markerManager.addMarker(bostonMarker2);

    return markerManager;
  }
View Full Code Here

    size(650, 440, OPENGL);

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

    // INIT GEONAMES
    WebService.setUserName("username"); // add your username here
    searchCriteria.setMaxRows(1);
View Full Code Here

  public void draw() {
    background(0);
    map.updateMap();
    map.draw();
    Location loc = new Location(52.5f, 13.4f);

    // GEONAMES EVENT

    if (searchEvent == true) {
      searchCriteria.setQ(searchName);
View Full Code Here

    // Draws the country code at the centroid of the polygon
    if (getId() != null) {
      pg.pushStyle();

      // Gets geometric center as geo-location
      Location centerLocation = getCentroid();
      // Converts geo-location to position on the map (NB: Not the screen!)
      float[] xy = map.mapDisplay.getObjectFromLocation(centerLocation);
      int x = Math.round(xy[0] - pg.textWidth(getId()) / 2);
      int y = Math.round(xy[1] + 6);
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.