diff options
author | CGantert345 <57003061+CGantert345@users.noreply.github.com> | 2022-04-11 09:26:40 +0200 |
---|---|---|
committer | CGantert345 <57003061+CGantert345@users.noreply.github.com> | 2022-04-11 09:26:40 +0200 |
commit | 9c1dec2f31e121b0f23a0270211961f3398445ac (patch) | |
tree | b025ff87073e2bd4034a6a8d97588607ef56f1ac /src/main/java/org/uic | |
parent | provide more control on the logging to users (diff) | |
download | UIC-barcode-9c1dec2f31e121b0f23a0270211961f3398445ac.tar UIC-barcode-9c1dec2f31e121b0f23a0270211961f3398445ac.tar.gz UIC-barcode-9c1dec2f31e121b0f23a0270211961f3398445ac.tar.bz2 UIC-barcode-9c1dec2f31e121b0f23a0270211961f3398445ac.tar.lz UIC-barcode-9c1dec2f31e121b0f23a0270211961f3398445ac.tar.xz UIC-barcode-9c1dec2f31e121b0f23a0270211961f3398445ac.tar.zst UIC-barcode-9c1dec2f31e121b0f23a0270211961f3398445ac.zip |
Diffstat (limited to 'src/main/java/org/uic')
-rw-r--r-- | src/main/java/org/uic/barcode/dynamicContent/api/DynamicContentCoder.java | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/src/main/java/org/uic/barcode/dynamicContent/api/DynamicContentCoder.java b/src/main/java/org/uic/barcode/dynamicContent/api/DynamicContentCoder.java index 34406e0..00b5824 100644 --- a/src/main/java/org/uic/barcode/dynamicContent/api/DynamicContentCoder.java +++ b/src/main/java/org/uic/barcode/dynamicContent/api/DynamicContentCoder.java @@ -92,8 +92,12 @@ public class DynamicContentCoder { GeoCoordinateType asnPoint = new GeoCoordinateType();
- asnPoint.setLatitude(point.getLatitude());
- asnPoint.setLongitude(point.getLongitude());
+ if (point.getLatitude() != null) {
+ asnPoint.setLatitude(point.getLatitude());
+ }
+ if (point.getLongitude() != null) {
+ asnPoint.setLongitude(point.getLongitude());
+ }
if (point.getUnit() != IGeoUnitType.milliDegree && point.getUnit() != null){
asnPoint.setGeoUnit(GeoUnitType.valueOf(point.getUnit().name()));
@@ -169,8 +173,12 @@ public class DynamicContentCoder { IGeoCoordinate g = new SimpleGeoCoordinate();
- g.setLatitude(asnCoordinate.getLatitude());
- g.setLongitude(asnCoordinate.getLongitude());
+ if (asnCoordinate.getLatitude() != null) {
+ g.setLatitude(asnCoordinate.getLatitude());
+ }
+ if (asnCoordinate.getLongitude() != null) {
+ g.setLongitude(asnCoordinate.getLongitude());
+ }
if (asnCoordinate.getCoordinateSystem() != null) {
g.setSystem(IGeoCoordinateSystemType.valueOf(asnCoordinate.getCoordinateSystem().name()));
|