diff options
Diffstat (limited to 'examples/location/geojson_viewer/main.cpp')
-rw-r--r-- | examples/location/geojson_viewer/main.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/examples/location/geojson_viewer/main.cpp b/examples/location/geojson_viewer/main.cpp index 3995ff08..91c926a0 100644 --- a/examples/location/geojson_viewer/main.cpp +++ b/examples/location/geojson_viewer/main.cpp @@ -158,8 +158,11 @@ public: } features.append(entry); } - if (nodeType.isEmpty()) // Dirty hack to handle (=skip) the first MIV used to process the fictitious list with 1 element + if (nodeType.isEmpty()) { // Dirty hack to handle (=skip) the first MIV used to process the fictitious list with 1 element + if (features.isEmpty()) + return root; return features.first().toMap(); + } root["data"] = features; return root; } |