Skip to content

armgit / core

Public Imported from GitHub
0

100% open-source IoT Platform - Integrate your devices, add intelligence, build custom apps

Changed LOCATION AttributeValueType to GEO_JSON_POINT

Rich Turner91c9ecedfb96
diff --git a/model/src/main/java/org/openremote/model/attribute/AttributeType.java b/model/src/main/java/org/openremote/model/attribute/AttributeType.java
index 8d040b177..8b9f48aea 100644
--- a/model/src/main/java/org/openremote/model/attribute/AttributeType.java
+++ b/model/src/main/java/org/openremote/model/attribute/AttributeType.java
@@ -25,7 +25,7 @@ import java.util.Optional;
public enum AttributeType implements AttributeDescriptor {
- LOCATION("location", AttributeValueType.LOCATION),
+ LOCATION("location", AttributeValueType.GEO_JSON_POINT),
CONSOLE_NAME("consoleName", AttributeValueType.STRING),
diff --git a/model/src/main/java/org/openremote/model/attribute/AttributeValueType.java b/model/src/main/java/org/openremote/model/attribute/AttributeValueType.java
index 6498aa903..5778a7ae9 100644
--- a/model/src/main/java/org/openremote/model/attribute/AttributeValueType.java
+++ b/model/src/main/java/org/openremote/model/attribute/AttributeValueType.java
@@ -229,7 +229,7 @@ public enum AttributeValueType {
new MetaItem(FORMAT, Values.create("%0.1f deg"))
),
- LOCATION("map-marker", ValueType.OBJECT, value -> {
+ GEO_JSON_POINT("map-marker", ValueType.OBJECT, value -> {
if (value != null && !GeoJSONPoint.fromValue(value).isPresent()) {
return Optional.of(new ValidationFailure(ValueHolder.ValueFailureReason.VALUE_INVALID));
}