Package de.fhpotsdam.unfolding.marker

Examples of de.fhpotsdam.unfolding.marker.Marker


    return marker;
  }

  protected Marker createPolygonMarker(ShapeFeature feature) throws Exception {
    Class markerClass = featureMarkerMap.get(feature.getType());
    Marker marker = null;
    try {
      Constructor markerConstructor = markerClass.getDeclaredConstructor(List.class, HashMap.class);
      marker = (Marker) markerConstructor.newInstance(feature.getLocations(), feature.getProperties());
    } catch (NoSuchMethodException e) {
      Constructor markerConstructor = markerClass.getDeclaredConstructor(List.class);
      marker = (Marker) markerConstructor.newInstance(feature.getLocations());
      marker.setProperties(feature.getProperties());
    }
    return marker;
  }
View Full Code Here


  private Marker createMultiMarker(MultiFeature multiFeature) throws Exception {
    MultiMarker multiMarker = new MultiMarker();
    multiMarker.setProperties(multiFeature.getProperties());

    for (Feature feature : multiFeature.getFeatures()) {
      Marker marker = createMarker(feature);
      multiMarker.addMarkers(marker);
    }

    return multiMarker;
  }
View Full Code Here

  public void mouseMoved() {
    for (Marker marker : map.getMarkers()) {
      marker.setSelected(false);
    }
    Marker marker = map.getFirstHitMarker(mouseX, mouseY);
    if (marker != null)
      marker.setSelected(true);
  }
View Full Code Here

    background(240);
    map.draw();
  }

  public void mouseClicked() {
    Marker marker = map.getFirstHitMarker(mouseX, mouseY);
    if (marker != null) {
      map.zoomAndPanToFit(GeoUtils.getLocations(marker));
    } else {
      map.zoomAndPanTo(2, new Location(0, 0));
    }
View Full Code Here

    for (Marker marker : map.getMarkers()) {
      marker.setSelected(false);
    }

    // Select hit marker
    Marker marker = map.getFirstHitMarker(mouseX, mouseY);
    // NB: Use mm.getHitMarkers(x, y) for multi-selection.
    if (marker != null) {
      marker.setSelected(true);
    }
  }
View Full Code Here

    PFont font = loadFont("ui/OpenSans-12.vlw");
    List<Marker> markers = new ArrayList<Marker>();
    for (Feature feature : features) {
      String label = feature.getStringProperty("title");
      PointFeature pointFeature = (PointFeature) feature;
      Marker marker = new LabeledMarker(pointFeature.getLocation(), label, font, 15);
      markers.add(marker);
    }
    return markers;
  }
View Full Code Here

    float y = 103.833002f;
    println(x + ", " + y);
    System.out.printf("x = %.9f y = %.9f \n", x, y);
    // println(PApplet.nf(x, 1, 9) + ", " + PApplet.nf(y, 1, 9));

    Marker marker1 = new SimplePointMarker(location1);
    Marker marker2 = new SimplePointMarker(location2);
    Marker marker3 = new SimplePointMarker(location3);
    map.addMarkers(marker1, marker2, marker3);
  }
View Full Code Here

      ellipse(posBB.x, posBB.y, 6, 6);
    }
  }

  public void mouseMoved() {
    Marker marker = map.getFirstHitMarker(mouseX, mouseY);
    if (marker != null) {
      centerEuclidean = GeoUtils.getEuclideanCentroid(GeoUtils.getLocations(marker));
      center = GeoUtils.getCentroid(marker);

      List<Location> boundingBoxLocations = Arrays.asList(GeoUtils.getBoundingBox(GeoUtils.getLocations(marker)));
View Full Code Here

      centerBoundingBox = GeoUtils.getEuclideanCentroid(boundingBoxLocations);
    }
  }

  public void mouseClicked() {
    Marker marker = map.getFirstHitMarker(mouseX, mouseY);
    if (marker != null) {
      boundingBox = GeoUtils.getBoundingBox(GeoUtils.getLocations(marker));
      map.zoomAndPanToFit(GeoUtils.getLocations(marker));
    } else {
      boundingBox = null;
View Full Code Here

TOP

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

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.