Package globus.glmap
Class MapPoint
- java.lang.Object
-
- globus.glmap.MapPoint
-
- All Implemented Interfaces:
java.io.Serializable
@ParametersAreNonnullByDefault public class MapPoint extends java.lang.Object implements java.io.SerializableMapPointis used store coordinates in map internal format- See Also:
- Serialized Form
-
-
Method Summary
Modifier and Type Method Description MapPointadd(MapPoint other)Add x and y of other pointMapPointassign(double x, double y)Set x and y and return thisMapPointassign(MapPoint point)Copies data from given pointstatic MapPointCreateFromGeoCoordinates(double lat, double lon)Creates map point from geo coordinatesbooleanequals(java.lang.Object other)inthashCode()voidset(MapGeoPoint geoPoint)Sets coordinates of point from geo point
-
-
-
Field Detail
-
Max
public static final int Max
Maximum valid value of x and y- See Also:
- Constant Field Values
-
x
public double x
-
y
public double y
-
-
Constructor Detail
-
MapPoint
public MapPoint()
Default constructor
-
MapPoint
public MapPoint(double x, double y)Constructor with x and y- Parameters:
x- X coordinate. Valid values are in range [0, GLMapPointMax]y- Y coordinate. Valid values are in range [0, GLMapPointMax]
-
MapPoint
public MapPoint(MapGeoPoint geoPoint)
Creates map point from geo coordinates- Parameters:
geoPoint- Geo point
-
MapPoint
public MapPoint(MapPoint point)
Copies constructor- Parameters:
point- source point
-
-
Method Detail
-
set
public void set(MapGeoPoint geoPoint)
Sets coordinates of point from geo point- Parameters:
geoPoint- geo point.
-
CreateFromGeoCoordinates
public static MapPoint CreateFromGeoCoordinates(double lat, double lon)
Creates map point from geo coordinates- Parameters:
lat- latitude of pointlon- longitude of point- Returns:
- MapPoint converted from given coordinates
-
assign
public MapPoint assign(MapPoint point)
Copies data from given point- Parameters:
point- source point- Returns:
- this to use in chain operations
-
assign
public MapPoint assign(double x, double y)
Set x and y and return this- Parameters:
x- new x valuey- bew y value- Returns:
- this to use in chain operations
-
add
public MapPoint add(MapPoint other)
Add x and y of other point- Parameters:
other- point- Returns:
- this to use in chain operations
-
equals
public boolean equals(java.lang.Object other)
- Overrides:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
-