diff options
Diffstat (limited to 'src/org/traccar/model')
-rw-r--r-- | src/org/traccar/model/Geofence.java | 4 | ||||
-rw-r--r-- | src/org/traccar/model/Position.java | 2 |
2 files changed, 5 insertions, 1 deletions
diff --git a/src/org/traccar/model/Geofence.java b/src/org/traccar/model/Geofence.java index 7042325dc..8560d22e9 100644 --- a/src/org/traccar/model/Geofence.java +++ b/src/org/traccar/model/Geofence.java @@ -65,7 +65,9 @@ public class Geofence extends ScheduledModel { } else if (area.startsWith("POLYGON")) { geometry = new GeofencePolygon(area); } else if (area.startsWith("LINESTRING")) { - geometry = new GeofencePolyline(area, Context.getConfig().getDouble("geofence.polylineDistance", 25)); + final double distance = getDouble("polylineDistance"); + geometry = new GeofencePolyline(area, distance > 0 ? distance + : Context.getConfig().getDouble("geofence.polylineDistance", 25)); } else { throw new ParseException("Unknown geometry type", 0); } diff --git a/src/org/traccar/model/Position.java b/src/org/traccar/model/Position.java index 981c2292f..fca0f16e3 100644 --- a/src/org/traccar/model/Position.java +++ b/src/org/traccar/model/Position.java @@ -58,6 +58,7 @@ public class Position extends Message { public static final String KEY_TYPE = "type"; public static final String KEY_IGNITION = "ignition"; public static final String KEY_FLAGS = "flags"; + public static final String KEY_ANTENNA = "antenna"; public static final String KEY_CHARGE = "charge"; public static final String KEY_IP = "ip"; public static final String KEY_ARCHIVE = "archive"; @@ -115,6 +116,7 @@ public class Position extends Message { public static final String ALARM_GPS_ANTENNA_CUT = "gpsAntennaCut"; public static final String ALARM_ACCIDENT = "accident"; public static final String ALARM_TOW = "tow"; + public static final String ALARM_IDLE = "idle"; public static final String ALARM_ACCELERATION = "hardAcceleration"; public static final String ALARM_BRAKING = "hardBraking"; public static final String ALARM_CORNERING = "hardCornering"; |