Class PilotLocation
java.lang.Object
org.deltava.beans.stats.PilotLocation
- All Implemented Interfaces:
GeoLocation, MapEntry, MarkerMapEntry
A bean to store pilot locations for displaying on a Google Map.
- Since:
- 1.0
- Version:
- 12.3
- Author:
- Luke
-
Field Summary
Fields inherited from interface GeoLocation
ALL, DEGREE_FEET, DEGREE_MILES, FEET_MILES, LAT_DIRECTIONS, LATITUDE, LON_DIRECTIONS, LONGITUDE, RADIAN_MILESModifier and TypeFieldDescriptionstatic final intFormat the Longitude and Latitude.static final doubleSize of a degree in feet.static final doubleSize of a degree in miles.static final intSize of a mile in feet.static final String[]Latitude directions.static final intFormat the Latitude only.static final String[]Longitude directions.static final intFormat the Longitude only.static final intRadius of the Earth in miles.Fields inherited from interface MapEntry
BLUE, BROWN, COLORS, GREEN, GREY, ORANGE, PURPLE, RED, WHITE, YELLOWModifier and TypeFieldDescriptionstatic final StringBlue Google Maps icon, displayed as $static/img/maps/point_blue.pngstatic final StringBrown Google Maps icon, displayed as $static/img/maps/point_brown.pngstatic final String[]All Google Maps icon colors.static final StringGreen Google Maps icon, displayed as $static/img/maps/point_green.pngstatic final StringGrey Google Maps icon, displayed as $static/img/maps/point_grey.pngstatic final StringOrange Google Maps icon, displayed as $static/img/maps/point_orange.pngstatic final StringPurple Google Maps icon, displayed as $static/img/maps/point_purple.pngstatic final StringRed Google Maps icon, displayed as $static/img/maps/point_red.pngstatic final StringWhite Google Maps icon, displayed as $static/img/maps/point_white.pngstatic final StringYellow Google Maps icon, displayed as $static/img/maps/point_yellow.png -
Constructor Summary
ConstructorsConstructorDescriptionPilotLocation(Pilot usr, GeoLocation loc) Creates a new Pilot location object. -
Method Summary
Modifier and TypeMethodDescriptionDisplay the Google Map icon color.Returns the Google Map info box text.final doubleReturns the Pilot's latitude.final doubleReturns the Pilot's longitude.getUser()Returns the Pilot.voidsetAllowDelete(boolean allowDelete) Sets whether the infobox should have a link to allow map entry deletion.Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface GeoLocation
distanceFeet, distanceToModifier and TypeMethodDescriptiondefault intCalculates the distance between two points in feet.default intCalculates the distance between two GeoLocations.
-
Constructor Details
-
PilotLocation
Creates a new Pilot location object.- Parameters:
usr- the Pilot beanloc- the Pilot's location
-
-
Method Details
-
getLatitude
public final double getLatitude()Returns the Pilot's latitude.- Specified by:
getLatitudein interfaceGeoLocation- Returns:
- the latitude in degrees
- See Also:
-
getLongitude
public final double getLongitude()Returns the Pilot's longitude.- Specified by:
getLongitudein interfaceGeoLocation- Returns:
- the longitude in degrees
- See Also:
-
getUser
-
setAllowDelete
public void setAllowDelete(boolean allowDelete) Sets whether the infobox should have a link to allow map entry deletion.- Parameters:
allowDelete- TRUE if the deletion link should be added, otherwise FALSE
-
getIconColor
Display the Google Map icon color.- Specified by:
getIconColorin interfaceMarkerMapEntry- Returns:
- BLUE
-
getInfoBox
Returns the Google Map info box text.- Specified by:
getInfoBoxin interfaceMapEntry- Returns:
- the info box text
-