summaryrefslogtreecommitdiffstats
path: root/src/main
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/main/java/org/uic/barcode/dynamicContent/api/DynamicContentCoder.java16
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()));