Fix lowres tiles failig to load correctly

This commit is contained in:
Lukas Rieger (Blue) 2022-07-31 22:19:15 +02:00
parent 77b7854d0f
commit 00b01cd0da
No known key found for this signature in database
GPG Key ID: 2D09EC5ED2687FF2

View File

@ -134,6 +134,10 @@ public static BufferGeometry fromJson(String jsonString) throws IOException {
Map<String, BufferAttribute> attributes = new HashMap<>();
json.beginObject(); // root
while (!"tileGeometry".equals(json.nextName())) json.skipValue(); // find tileGeometry
json.beginObject(); // tileGeometry
while (json.hasNext()) {
String name1 = json.nextName();
@ -186,6 +190,9 @@ else if (name3.equals("count")) {
else json.skipValue();
}
json.endObject(); // tileGeometry
while (json.hasNext()) json.skipValue(); // skip remaining values
json.endObject(); // root
groups.sort((g1, g2) -> (int) Math.signum(g1.getStart() - g2.getStart()));