kopia lustrzana https://github.com/JOSM/MapWithAI
rodzic
a81bc7a62b
commit
21a76831b0
|
@ -59,11 +59,17 @@ public final class MapWithAIAvailability {
|
||||||
.filter(entry -> "objects".equals(entry.getKey())).findFirst();
|
.filter(entry -> "objects".equals(entry.getKey())).findFirst();
|
||||||
if (objects.isPresent()) {
|
if (objects.isPresent()) {
|
||||||
final JsonObject value = objects.get().getValue().asJsonObject();
|
final JsonObject value = objects.get().getValue().asJsonObject();
|
||||||
|
if (value != null) {
|
||||||
final JsonObject centroid = value.getJsonObject("rapid_releases_points");
|
final JsonObject centroid = value.getJsonObject("rapid_releases_points");
|
||||||
|
if (centroid != null) {
|
||||||
final JsonArray countries = centroid.getJsonArray("geometries");
|
final JsonArray countries = centroid.getJsonArray("geometries");
|
||||||
|
if (countries != null) {
|
||||||
COUNTRIES.clear();
|
COUNTRIES.clear();
|
||||||
COUNTRIES.putAll(parseForCountries(countries));
|
COUNTRIES.putAll(parseForCountries(countries));
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
Logging.debug(e);
|
Logging.debug(e);
|
||||||
}
|
}
|
||||||
|
|
Ładowanie…
Reference in New Issue