[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.
This commit is contained in:
Mikhail Pozdnyakov
2019-10-30 12:04:01 +02:00
parent 8c498cd36c
commit 4afb4438eb
4 changed files with 54 additions and 49 deletions

View File

@@ -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;