[core] place symbol layers in correct order
Previously, the placement of symbols depended on the order in which the glyphs they need were loaded. The placement order should be based on the style. To fix this, symbol layers are placed in `placementPending` after they are parsed. After all layers are parsed, symbol layers (stored in `placementPending`) are placed and returned.
This commit is contained in:
@@ -39,9 +39,10 @@ public:
|
||||
}
|
||||
|
||||
void parsePendingGeometryTileLayers(TileWorker* worker,
|
||||
PlacementConfig config,
|
||||
std::function<void(TileParseResult)> callback) {
|
||||
try {
|
||||
callback(worker->parsePendingLayers());
|
||||
callback(worker->parsePendingLayers(config));
|
||||
} catch (...) {
|
||||
callback(std::current_exception());
|
||||
}
|
||||
@@ -87,10 +88,11 @@ Worker::parseGeometryTile(TileWorker& worker,
|
||||
|
||||
std::unique_ptr<WorkRequest>
|
||||
Worker::parsePendingGeometryTileLayers(TileWorker& worker,
|
||||
PlacementConfig config,
|
||||
std::function<void(TileParseResult)> callback) {
|
||||
current = (current + 1) % threads.size();
|
||||
return threads[current]->invokeWithCallback(&Worker::Impl::parsePendingGeometryTileLayers,
|
||||
callback, &worker);
|
||||
callback, &worker, config);
|
||||
}
|
||||
|
||||
std::unique_ptr<WorkRequest>
|
||||
|
||||
Reference in New Issue
Block a user