use of javax.microedition.location.QualifiedCoordinates in project CodenameOne by codenameone.
the class MIDPLocationManager method convert.
private Location convert(javax.microedition.location.Location loc) {
QualifiedCoordinates coor = loc.getQualifiedCoordinates();
Location retVal = new Location();
retVal.setAccuracy(coor.getHorizontalAccuracy());
retVal.setAltitude(coor.getAltitude());
if (currentCoordinates != null) {
retVal.setDirection(coor.azimuthTo(currentCoordinates));
}
retVal.setLatitude(coor.getLatitude());
retVal.setLongitude(coor.getLongitude());
retVal.setTimeStamp(loc.getTimestamp());
retVal.setVelocity(loc.getSpeed());
currentCoordinates = coor;
return retVal;
}
use of javax.microedition.location.QualifiedCoordinates in project CodenameOne by codenameone.
the class RIMLocationManager method convert.
private Location convert(javax.microedition.location.Location loc) {
QualifiedCoordinates coor = loc.getQualifiedCoordinates();
Location retVal = new Location();
retVal.setAccuracy(coor.getHorizontalAccuracy());
retVal.setAltitude(coor.getAltitude());
if (currentCoordinates != null) {
retVal.setDirection(coor.azimuthTo(currentCoordinates));
}
retVal.setLatitude(coor.getLatitude());
retVal.setLongitude(coor.getLongitude());
retVal.setTimeStamp(loc.getTimestamp());
retVal.setVelocity(loc.getSpeed());
currentCoordinates = coor;
return retVal;
}
Aggregations