Skip to content

Commit

Permalink
geo+json query puts location as default geometry now
Browse files Browse the repository at this point in the history
  • Loading branch information
ScorpioBroker committed Sep 6, 2023
1 parent ff1f980 commit 85bcb82
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -219,6 +219,9 @@ private static Object generateGeoJson(Object result, String geometry, Object con
Map<String, Object> entryMap = (Map<String, Object>) result;
resultMap.put(NGSIConstants.QUERY_PARAMETER_ID, entryMap.remove(NGSIConstants.QUERY_PARAMETER_ID));
resultMap.put(NGSIConstants.TYPE, NGSIConstants.FEATURE);
if(geometry == null) {
geometry = NGSIConstants.NGSI_LD_LOCATION_SHORT;
}
Object geometryEntry = entryMap.get(geometry);
if (geometryEntry != null) {
resultMap.put(NGSIConstants.GEOMETRY, ((Map<String, Object>) geometryEntry).get(NGSIConstants.VALUE));
Expand Down

0 comments on commit 85bcb82

Please sign in to comment.