Class Coord
java.lang.Object
com.codename1.maps.Coord
- Direct Known Subclasses:
PointLayer
This class declares a coordinate point on a map.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleandoubleGets the Coord LatitudedoubleGets the Coord Longitude.inthashCode()final booleanReturns true if this is a projected CoordinatevoidsetLatitude(double latitude) Sets the Coord Latitude.voidsetLongitude(double longitude) Sets the Coord Longitude.voidsetProjected(boolean projected) Sets Coord projectedtoString()translate(double latitude, double longitude) Create a new Coord object which is translated with the given coordinatesCreate a new Coord object which is translated with the given coordinates
-
Constructor Details
-
Coord
public Coord(double latitude, double longitude) Creates a isProjected Coord
Parameters
-
latitude: the getLatitude of this Coordinate -
longitude: the getLongitude of this Coordinate
-
-
Coord
public Coord(double latitude, double longitude, boolean projected) a Constructor with getLatitude, getLongitude
Parameters
-
latitude: the Coordinate getLatitude -
longitude: the Coordinate getLongitude -
projected: declares if this is a isProjected Coordinate
-
-
Coord
Copy Constructor
Parameters
toClone: to copy
-
-
Method Details
-
getLongitude
public double getLongitude()Gets the Coord Longitude.
Returns
the Coord Longitude
-
setLongitude
public void setLongitude(double longitude) Sets the Coord Longitude. -
getLatitude
public double getLatitude()Gets the Coord Latitude
Returns
the Coord Latitude
-
setLatitude
public void setLatitude(double latitude) Sets the Coord Latitude. -
toString
-
translate
Create a new Coord object which is translated with the given coordinates
Parameters
-
latitude: translate current latitude with this latitude -
longitude: translate current longitude with this longitude
Returns
a new translated Coord object
-
-
translate
-
equals
-
hashCode
-
isProjected
public final boolean isProjected()Returns true if this is a projected Coordinate
Returns
true if projected
-
setProjected
public void setProjected(boolean projected) Sets Coord projected
Parameters
projected: flag
-