public class GeoPointDto extends java.lang.Object implements ILocation, IGeoPointInfo, java.lang.Cloneable
A minimal location or trackpoint implementation of ILocation
, IGeoPointInfo
.
Created by k3b on 07.01.2015.
NO_LAT_LON, NO_ZOOM
Constructor and Description |
---|
GeoPointDto() |
GeoPointDto(double latitude,
double longitude,
int zoomMin) |
GeoPointDto(double latitude,
double longitude,
java.lang.String name,
java.lang.String description) |
GeoPointDto(double latitude,
double longitude,
java.lang.String name,
java.lang.String link,
java.lang.String symbol,
java.lang.String id,
java.lang.String description,
int zoomMin,
int zoomMax,
java.util.Date timeOfMeasurement) |
GeoPointDto(IGeoPointInfo src) |
Modifier and Type | Method and Description |
---|---|
GeoPointDto |
clear()
Sets all members back to defaultvalue to allow reuse of class.
|
GeoPointDto |
clone()
Create a copy.
|
static boolean |
equals(IGeoPointInfo lhs,
IGeoPointInfo rhs) |
boolean |
equals(java.lang.Object other) |
java.lang.String |
getDescription()
Detailed descript of the point displayed in popup on long-click .
|
java.lang.String |
getId()
If not null: A unique id for this item.
|
double |
getLatitude()
Latitude, in degrees north.
|
java.lang.String |
getLink()
Optional: If not null: Link-url belonging to this item.
|
double |
getLongitude()
Longitude, in degrees east.
|
java.lang.String |
getName()
Short non-unique text used as marker label.
|
java.lang.String |
getSymbol()
Optional: If not null: Icon-url belonging to this item.
|
java.util.Date |
getTimeOfMeasurement()
Date when the measurement was taken.
|
int |
getZoomMax()
Filter: This item is only shown if current zoom-level is <= this value.
|
int |
getZoomMin()
Filter: This item is only shown if current zoom-level is >= this value.
|
static boolean |
isEmpty(java.lang.Double value) |
static boolean |
isEmpty(java.lang.Double latitude,
java.lang.Double longitude)
return true if either lat or lon is not set (NaN) or if both are 0.
|
static boolean |
isEmpty(ILocation point)
return true if either lat or lon is not set (NaN) or if both are 0.
|
GeoPointDto |
setDescription(java.lang.String description)
Detailed descript of the point displayed in popup on long-click .
|
GeoPointDto |
setId(java.lang.String id)
If not null: A unique id for this item.
|
GeoPointDto |
setLatitude(double latitude)
Latitude, in degrees north.
|
GeoPointDto |
setLatLon(double latitude,
double longitude) |
GeoPointDto |
setLink(java.lang.String link)
Optional: If not null: Link-url belonging to this item.
|
GeoPointDto |
setLongitude(double longitude)
Longitude, in degrees east.
|
GeoPointDto |
setName(java.lang.String name)
Short non-unique text used as marker label.
|
GeoPointDto |
setSymbol(java.lang.String symbol)
Optional: If not null: Icon-url belonging to this item.
|
GeoPointDto |
setTimeOfMeasurement(java.util.Date timeOfMeasurement)
Date when the measurement was taken.
|
GeoPointDto |
setZoomMax(int zoomMax)
Filter: This item is only shown if current zoom-level is <= this value.
|
GeoPointDto |
setZoomMin(int zoomMin)
Filter: This item is only shown if current zoom-level is >= this value.
|
java.lang.String |
toString()
|
static java.lang.String |
toString(IGeoPointInfo point)
|
public GeoPointDto()
public GeoPointDto(double latitude, double longitude, java.lang.String name, java.lang.String description)
public GeoPointDto(double latitude, double longitude, int zoomMin)
public GeoPointDto(double latitude, double longitude, java.lang.String name, java.lang.String link, java.lang.String symbol, java.lang.String id, java.lang.String description, int zoomMin, int zoomMax, java.util.Date timeOfMeasurement)
public GeoPointDto(IGeoPointInfo src)
public GeoPointDto setLatLon(double latitude, double longitude)
public GeoPointDto setLatitude(double latitude)
Latitude, in degrees north.
IGeoPointInfo.NO_LAT_LON
means “not set”.
public double getLatitude()
Latitude, in degrees north.
IGeoPointInfo.NO_LAT_LON
means “not set”.
getLatitude
in interface IGeoPointInfo
getLatitude
in interface ILocation
public GeoPointDto setLongitude(double longitude)
Longitude, in degrees east.
IGeoPointInfo.NO_LAT_LON
means “not set”.
public double getLongitude()
Longitude, in degrees east.
IGeoPointInfo.NO_LAT_LON
means “not set”.
getLongitude
in interface IGeoPointInfo
getLongitude
in interface ILocation
public GeoPointDto setTimeOfMeasurement(java.util.Date timeOfMeasurement)
Date when the measurement was taken.
Null means unknown.
public java.util.Date getTimeOfMeasurement()
Date when the measurement was taken. Null if unknown.
getTimeOfMeasurement
in interface IGeoPointInfo
getTimeOfMeasurement
in interface ILocation
public GeoPointDto setName(java.lang.String name)
Short non-unique text used as marker label. Null means “not set”.
public java.lang.String getName()
Short non-unique text used as marker label. Null means “not set”.
getName
in interface IGeoPointInfo
public GeoPointDto setDescription(java.lang.String description)
Detailed descript of the point displayed in popup on long-click . Null means “not set”.
public java.lang.String getDescription()
Detailed descript of the point displayed in popup on long-click . Null means “not set”.
getDescription
in interface IGeoPointInfo
public int getZoomMin()
Filter: This item is only shown if current zoom-level is >= this value. NO_ZOOM means no lower bound.
getZoomMin
in interface IGeoPointInfo
public GeoPointDto setZoomMin(int zoomMin)
Filter: This item is only shown if current zoom-level is >= this value. NO_ZOOM means no lower bound.
public int getZoomMax()
Filter: This item is only shown if current zoom-level is <= this value. NO_ZOOM means no upper bound.
getZoomMax
in interface IGeoPointInfo
public GeoPointDto setZoomMax(int zoomMax)
Filter: This item is only shown if current zoom-level is <= this value. NO_ZOOM means no upper bound.
public java.lang.String getId()
If not null: A unique id for this item.
getId
in interface IGeoPointInfo
public GeoPointDto setId(java.lang.String id)
If not null: A unique id for this item.
public java.lang.String getLink()
Optional: If not null: Link-url belonging to this item.
After clicking on “>”-button in “show view” of a marker: opens this url.
Persistet in geo-uri as geo:…&link=https://path/to/file.html.
getLink
in interface IGeoPointInfo
public GeoPointDto setLink(java.lang.String link)
Optional: If not null: Link-url belonging to this item.
After clicking on “>”-button in “show view” of a marker: opens this url.
Persistet in geo-uri as geo:…&link=https://path/to/file.html.
public java.lang.String getSymbol()
Optional: If not null: Icon-url belonging to this item.
Persistet in geo-uri as geo:…&s=https://path/to/file.png
getSymbol
in interface IGeoPointInfo
public GeoPointDto setSymbol(java.lang.String symbol)
Optional: If not null: Icon-url belonging to this item.
Persistet in geo-uri as geo:…&s=https://path/to/file.png
public GeoPointDto clear()
Sets all members back to defaultvalue to allow reuse of class.
clone()
and clear()
are used as factory method when reading a list.
public GeoPointDto clone()
clone
in interface IGeoPointInfo
clone
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object
public static java.lang.String toString(IGeoPointInfo point)
public static boolean isEmpty(ILocation point)
return true if either lat or lon is not set (NaN) or if both are 0.
public static boolean isEmpty(java.lang.Double value)
public static boolean isEmpty(java.lang.Double latitude, java.lang.Double longitude)
return true if either lat or lon is not set (NaN) or if both are 0.
public boolean equals(java.lang.Object other)
equals
in class java.lang.Object
public static boolean equals(IGeoPointInfo lhs, IGeoPointInfo rhs)