diff options
author | Mikhail Pozdnyakov <mikhail.pozdnyakov@mapbox.com> | 2019-10-30 12:04:01 +0200 |
---|---|---|
committer | Mikhail Pozdnyakov <mikhail.pozdnyakov@mapbox.com> | 2019-10-31 10:24:55 +0200 |
commit | 4afb4438ebf0c8e7d4b4ae5fcfd10d363be6c3c7 (patch) | |
tree | 8ddf07a7a05a0514df2fe1a9c90b31e37fa9fafd /src/mbgl/style/sources | |
parent | 8c498cd36c07b1019e5ddb60d5f9f8872f036e25 (diff) | |
download | qtlocation-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/mbgl/style/sources')
-rw-r--r-- | src/mbgl/style/sources/geojson_source.cpp | 4 |
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; |