blob: 9b4fa8622bbe8cdb91f6398c84d3fea60bc6eee6 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
|
#ifndef MBGL_MAP_VECTOR_TILE_DATA
#define MBGL_MAP_VECTOR_TILE_DATA
#include <mbgl/map/tile_data.hpp>
#include <mbgl/map/tile_worker.hpp>
#include <mbgl/storage/request_holder.hpp>
#include <atomic>
namespace mbgl {
class Style;
class SourceInfo;
class WorkRequest;
class Request;
class VectorTileData : public TileData {
public:
VectorTileData(const TileID&,
Style&,
const SourceInfo&,
float angle_,
float pitch_,
bool collisionDebug_);
~VectorTileData();
Bucket* getBucket(const StyleLayer&) override;
void request(float pixelRatio,
const std::function<void()>& callback);
bool reparse(std::function<void ()> callback) override;
void redoPlacement(float angle, float pitch, bool collisionDebug) override;
void cancel() override;
private:
Worker& worker;
TileWorker tileWorker;
std::unique_ptr<WorkRequest> workRequest;
bool parsing = false;
const SourceInfo& source;
RequestHolder req;
std::shared_ptr<const std::string> data;
float lastAngle = 0;
float currentAngle;
float lastPitch = 0;
float currentPitch;
bool lastCollisionDebug = 0;
bool currentCollisionDebug = 0;
bool redoingPlacement = false;
};
}
#endif
|