aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/org/traccar/helper
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/org/traccar/helper')
-rw-r--r--src/main/java/org/traccar/helper/model/GeofenceUtil.java6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/main/java/org/traccar/helper/model/GeofenceUtil.java b/src/main/java/org/traccar/helper/model/GeofenceUtil.java
index f56bf4224..9f063a8b4 100644
--- a/src/main/java/org/traccar/helper/model/GeofenceUtil.java
+++ b/src/main/java/org/traccar/helper/model/GeofenceUtil.java
@@ -15,6 +15,7 @@
*/
package org.traccar.helper.model;
+import org.traccar.config.Config;
import org.traccar.model.Geofence;
import org.traccar.model.Position;
import org.traccar.session.cache.CacheManager;
@@ -27,10 +28,11 @@ public final class GeofenceUtil {
private GeofenceUtil() {
}
- public static List<Long> getCurrentGeofences(CacheManager cacheManager, Position position) {
+ public static List<Long> getCurrentGeofences(Config config, CacheManager cacheManager, Position position) {
List<Long> result = new ArrayList<>();
for (Geofence geofence : cacheManager.getDeviceObjects(position.getDeviceId(), Geofence.class)) {
- if (geofence.getGeometry().containsPoint(position.getLatitude(), position.getLongitude())) {
+ if (geofence.getGeometry().containsPoint(
+ config, geofence, position.getLatitude(), position.getLongitude())) {
result.add(geofence.getId());
}
}