@Override public void run() { placemarkAttributes.setImageOffset(placemarkOffset); } });
/** * Helper method to create airport placemarks. */ protected static Placemark createAirportPlacemark(Position position, String airportName) { Placemark placemark = Placemark.createWithImage(position, ImageSource.fromResource(R.drawable.airport_terminal)); placemark.getAttributes().setImageOffset(Offset.bottomCenter()).setImageScale(NORMAL_IMAGE_SCALE); placemark.setDisplayName(airportName); return placemark; }
/** * Helper method to create vehicle placemarks. */ protected static Placemark createAutomobilePlacemark(Position position, String name, String automotiveType) { if (!automotiveIconMap.containsKey(automotiveType)) { throw new IllegalArgumentException(automotiveType + " is not valid."); } Placemark placemark = Placemark.createWithImage(position, ImageSource.fromResource(automotiveIconMap.get(automotiveType))); placemark.getAttributes().setImageOffset(Offset.bottomCenter()).setImageScale(NORMAL_IMAGE_SCALE); placemark.setHighlightAttributes(new PlacemarkAttributes(placemark.getAttributes()).setImageScale(HIGHLIGHTED_IMAGE_SCALE).setImageColor(new Color(android.graphics.Color.YELLOW))); placemark.setDisplayName(name); // The AUTOMOTIVE_TYPE property is used to exchange the vehicle type with the VehicleTypeDialog placemark.putUserProperty(AUTOMOTIVE_TYPE, automotiveType); // The select/drag controller will examine a placemark's "capabilities" to determine what operations are applicable: placemark.putUserProperty(SELECTABLE, null); placemark.putUserProperty(EDITABLE, null); placemark.putUserProperty(MOVABLE, null); return placemark; }
/** * Helper method to create airport placemarks. */ private static Placemark createAirportPlacemark(Position position, String airportName) { Placemark placemark = Placemark.createWithImage(position, ImageSource.fromResource(R.drawable.airport_terminal)); placemark.getAttributes().setImageOffset(Offset.bottomCenter()).setImageScale(NORMAL_IMAGE_SCALE); placemark.setHighlightAttributes(new PlacemarkAttributes(placemark.getAttributes()).setImageScale(HIGHLIGHTED_IMAGE_SCALE)); placemark.setDisplayName(airportName); return placemark; }
/** * Helper method to create aircraft placemarks. */ private static Placemark createAircraftPlacemark(Position position) { Placemark placemark = Placemark.createWithImage(position, ImageSource.fromResource(R.drawable.aircraft_fighter)); placemark.getAttributes().setImageOffset(Offset.bottomCenter()).setImageScale(NORMAL_IMAGE_SCALE).setDrawLeader(true); placemark.setHighlightAttributes(new PlacemarkAttributes(placemark.getAttributes()).setImageScale(HIGHLIGHTED_IMAGE_SCALE)); return placemark; }
/** * Helper method to create aircraft placemarks. The aircraft are selectable, movable, and editable. */ protected static Placemark createAircraftPlacemark(Position position, String aircraftName, String aircraftType) { if (!aircraftIconMap.containsKey(aircraftType)) { throw new IllegalArgumentException(aircraftType + " is not valid."); } Placemark placemark = Placemark.createWithImage(position, ImageSource.fromResource(aircraftIconMap.get(aircraftType))); placemark.getAttributes().setImageOffset(Offset.bottomCenter()).setImageScale(NORMAL_IMAGE_SCALE).setDrawLeader(true); placemark.getAttributes().getLeaderAttributes().setOutlineWidth(4); placemark.setHighlightAttributes(new PlacemarkAttributes(placemark.getAttributes()).setImageScale(HIGHLIGHTED_IMAGE_SCALE).setImageColor(new Color(android.graphics.Color.YELLOW))); placemark.setDisplayName(aircraftName); // The AIRCRAFT_TYPE property is used to exchange the vehicle type with the VehicleTypeDialog placemark.putUserProperty(AIRCRAFT_TYPE, aircraftType); // The select/drag controller will examine a placemark's "capabilities" to determine what operations are applicable: placemark.putUserProperty(SELECTABLE, null); placemark.putUserProperty(EDITABLE, null); placemark.putUserProperty(MOVABLE, null); return placemark; }
PlacemarkAttributes.createWithImage(ImageSource.fromResource(R.drawable.airport_terminal)).setImageOffset(Offset.bottomCenter()).setImageScale(2), "Oxnard Airport"); Placemark wildfire = new Placemark( Position.fromDegrees(34.300, -119.25, 0), PlacemarkAttributes.createWithImage(ImageSource.fromBitmap(bitmap)).setImageOffset(Offset.bottomCenter()));