Package de.fhpotsdam.unfolding.marker

Examples of de.fhpotsdam.unfolding.marker.SimplePointMarker


  }

  public void addRandomMarkers() {
    // Add some markers to demonstrate they are visible in thumbnail, too.
    for (int i = 0; i < 100; i++) {
      SimplePointMarker marker = new SimplePointMarker();
      marker.setLocation(random(30, 60), random(-10, 30));
      map.addMarker(marker);
    }
  }
View Full Code Here


    // Create Markers from Locations
    Location berlinLocation = new Location(52.5f, 13.4f);
    Location mexicoCityLocation = new Location(19.4f, -99.1f);

    // Point Markers
    berlinMarker = new SimplePointMarker(berlinLocation);
    SimplePointMarker mexicoCityMarker = new SimplePointMarker(mexicoCityLocation);
    // Line Marker
    SimpleLinesMarker connectionMarker = new SimpleLinesMarker(berlinLocation, mexicoCityLocation);

    markerManager.addMarker(berlinMarker);
    markerManager.addMarker(mexicoCityMarker);
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

  }

  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

    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();
        DataEntry dataEntry = dataEntriesMap.get(countryId);
        if (dataEntry != null) {
          // Map to correct size (linearly to area)
          float radius = PApplet.sqrt(dataEntry.value / PApplet.PI);
          // Constrain radius to 100px (20000 is for China's population of 1.3billion)
          float s = map(radius, 0, 20000, 0, 100);
          // Set size of marker
          marker.setRadius(s);
          map.addMarkers(marker);
        }
      }
    }
  }
View Full Code Here

    // Create Markers from Locations
    Location locationBerlin = new Location(52.5f, 13.4f);
    Location locationLondon = new Location(51.5f, 0f);

    markerBerlin = new SimplePointMarker(locationBerlin);
    markerLondon = new SimplePointMarker(locationLondon);

    PFont font = createFont("serif-bold", 12);
    textFont(font);
  }
View Full Code Here

    // Create Markers from Locations
    Location berlinLocation = new Location(52.5f, 13.4f);
    Location mexicoCityLocation = new Location(19.4f, -99.1f);

    // Point Markers
    SimplePointMarker berlinMarker = new SimplePointMarker(berlinLocation);
    SimplePointMarker mexicoCityMarker = new SimplePointMarker(mexicoCityLocation);
    // Line Marker
    SimpleLinesMarker connectionMarker = new SimpleLinesMarker(berlinLocation, mexicoCityLocation);

    // Add Markers to the maps default MarkerManager
    map.addMarkers(berlinMarker, mexicoCityMarker, connectionMarker);
View Full Code Here

    map = new UnfoldingMap(this);
    map.zoomAndPanTo(berlinLocation, 10);
    // MapUtils.createDefaultEventDispatcher(this, map);

    SimplePointMarker marker = new SimplePointMarker(berlinLocation);
    map.addMarker(marker);

    // List<Feature> countries = GeoJSONReader.loadData(this, "data/countries.geo.json");
    // List<Marker> countryMarkers = MapUtils.createSimpleMarkers(countries);
    // map.addMarkers(countryMarkers);
View Full Code Here

  public void setup() {
    classHavingMarkerManager = new ClassHavingMarkerManager();
    classHavingMarkerManager.markerManager = new MarkerManager<SimplePointMarker>();

    SimplePointMarker marker = new SimplePointMarker();
    markerManager.addMarker(marker);
  }
View Full Code Here

TOP

Related Classes of de.fhpotsdam.unfolding.marker.SimplePointMarker

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.