From d96100c67dc70d2307911504233b4320c6ea20e2 Mon Sep 17 00:00:00 2001 From: Taylor Smock Date: Wed, 20 May 2020 11:00:12 -0600 Subject: [PATCH] Actually read type from geojson and the id Signed-off-by: Taylor Smock --- .../plugins/mapwithai/io/mapwithai/MapWithAISourceReader.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/org/openstreetmap/josm/plugins/mapwithai/io/mapwithai/MapWithAISourceReader.java b/src/main/java/org/openstreetmap/josm/plugins/mapwithai/io/mapwithai/MapWithAISourceReader.java index 4c225fe..f80d3a9 100644 --- a/src/main/java/org/openstreetmap/josm/plugins/mapwithai/io/mapwithai/MapWithAISourceReader.java +++ b/src/main/java/org/openstreetmap/josm/plugins/mapwithai/io/mapwithai/MapWithAISourceReader.java @@ -98,9 +98,9 @@ public class MapWithAISourceReader implements Closeable { if (JsonValue.ValueType.OBJECT.equals(entry.getValue().getValueType())) { JsonObject values = entry.getValue().asJsonObject(); String url = values.getString("url", ""); - String type = MapWithAIInfo.MapWithAIType.THIRD_PARTY.getTypeString(); + String type = values.getString("type", MapWithAIInfo.MapWithAIType.THIRD_PARTY.getTypeString()); String eula = values.getString("eula", ""); - String id = name.replace(" ", "_"); + String id = values.getString("id", name.replace(" ", "_")); JsonValue countries = values.getOrDefault("countries", JsonValue.EMPTY_JSON_OBJECT); List bounds = new ArrayList<>(); if (JsonValue.ValueType.OBJECT.equals(countries.getValueType())) {