/** * Constructs a Placemark with a label that draws its representation at the supplied position using the given {@link * PlacemarkAttributes} bundle. The displayName is set to the supplied name string. * * @param position The placemark's geographic position * @param attributes The attributes to associate with this placemark. May be null, but if null the placemark will * not be drawn. * @param name The text for the {@link Placemark#displayName}. */ public Placemark(Position position, PlacemarkAttributes attributes, String name) { this.setPosition(position); this.setAltitudeMode(WorldWind.ABSOLUTE); this.setDisplayName(name == null || name.isEmpty() ? "Placemark" : name); // this.setLabel(name); // TODO: call setLabel(name) this.attributes = attributes; this.eyeDistanceScaling = false; this.eyeDistanceScalingThreshold = DEFAULT_EYE_DISTANCE_SCALING_THRESHOLD; this.eyeDistanceScalingLabelThreshold = 1.5 * this.eyeDistanceScalingThreshold; this.imageRotationReference = WorldWind.RELATIVE_TO_SCREEN; this.imageTiltReference = WorldWind.RELATIVE_TO_SCREEN; }
this.sightline.setAltitudeMode(WorldWind.RELATIVE_TO_GROUND); this.sightlinePlacemark = new Placemark(pos); this.sightlinePlacemark.setAltitudeMode(WorldWind.RELATIVE_TO_GROUND); this.sightlinePlacemark.getAttributes().setImageSource(ImageSource.fromResource(R.drawable.aircraft_fixwing)); this.sightlinePlacemark.getAttributes().setImageScale(2);