public class LatitudeLongitudeTranslator extends Object
Modifier and Type | Field and Description |
---|---|
static double |
MARGIN_RATIO |
Constructor and Description |
---|
LatitudeLongitudeTranslator() |
Modifier and Type | Method and Description |
---|---|
void |
addCoordinates(double latitude,
double longitude) |
void |
drawRoute(Graphics2D g,
double lon1,
double lat1,
double lon2,
double lat2,
boolean straight,
boolean dashed) |
void |
drawSquare(Graphics2D g,
double lon,
double lat,
int diameter) |
void |
drawSquare(Graphics2D g,
double lon,
double lat,
int diameter,
String label) |
int |
getImageHeight() |
int |
getImageWidth() |
void |
prepareFor(double width,
double height) |
int |
translateLatitudeToY(double latitude) |
int |
translateLongitudeToX(double longitude) |
double |
translateXToLongitude(int x) |
double |
translateYToLatitude(double y) |
public static final double MARGIN_RATIO
public void addCoordinates(double latitude, double longitude)
public void prepareFor(double width, double height)
public int translateLongitudeToX(double longitude)
public int translateLatitudeToY(double latitude)
public double translateXToLongitude(int x)
public double translateYToLatitude(double y)
public int getImageWidth()
public int getImageHeight()
public void drawSquare(Graphics2D g, double lon, double lat, int diameter)
public void drawSquare(Graphics2D g, double lon, double lat, int diameter, String label)
public void drawRoute(Graphics2D g, double lon1, double lat1, double lon2, double lat2, boolean straight, boolean dashed)
Copyright © 2006–2020 JBoss by Red Hat. All rights reserved.