summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMikhail Pozdnyakov <mikhail.pozdnyakov@mapbox.com>2019-10-30 12:04:01 +0200
committerMikhail Pozdnyakov <mikhail.pozdnyakov@mapbox.com>2019-10-31 10:24:55 +0200
commit4afb4438ebf0c8e7d4b4ae5fcfd10d363be6c3c7 (patch)
tree8ddf07a7a05a0514df2fe1a9c90b31e37fa9fafd /src
parent8c498cd36c07b1019e5ddb60d5f9f8872f036e25 (diff)
downloadqtlocation-mapboxgl-4afb4438ebf0c8e7d4b4ae5fcfd10d363be6c3c7.tar.gz
[android] Convert GeoJSON features to tiles in background
Composing tiles from the GeoJSON features is an expensive operation that might block UI thread on updating the `GeoJsonSource` with the new data. This change moves tile composing to the background thread and thus unblocks the UI thread.
Diffstat (limited to 'src')
-rw-r--r--src/mbgl/style/sources/geojson_source.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/mbgl/style/sources/geojson_source.cpp b/src/mbgl/style/sources/geojson_source.cpp
index 79e7c23459..3832977cd4 100644
--- a/src/mbgl/style/sources/geojson_source.cpp
+++ b/src/mbgl/style/sources/geojson_source.cpp
@@ -45,6 +45,10 @@ optional<std::string> GeoJSONSource::getURL() const {
return url;
}
+const GeoJSONOptions& GeoJSONSource::getOptions() const {
+ return impl().getOptions();
+}
+
void GeoJSONSource::loadDescription(FileSource& fileSource) {
if (!url) {
loaded = true;