Skip to content

Commit

Permalink
Update JSON processing for new hasGeometry structure
Browse files Browse the repository at this point in the history
See #101
  • Loading branch information
fsteeg committed May 9, 2018
1 parent c3ab314 commit f93b2d0
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions app/models/AuthorityResource.java
Original file line number Diff line number Diff line change
Expand Up @@ -107,8 +107,7 @@ public GeoPoint location() {
if (hasGeometry == null)
return null;
@SuppressWarnings("unchecked")
String geoString = ((List<Map<String, Object>>) hasGeometry.get(0).get("asWKT")).get(0).get("@value")
.toString();
String geoString = ((List<String>) hasGeometry.get(0).get("asWKT")).get(0);
List<Double> lonLat = scanGeoCoordinates(geoString);
if (lonLat.size() != 2) {
throw new IllegalArgumentException("Could not scan geo location from: " + geoString + ", got: " + lonLat);
Expand Down

0 comments on commit f93b2d0

Please sign in to comment.