summaryrefslogtreecommitdiff
path: root/test/src/mbgl/test/map_adapter.hpp
blob: e0fc449f48f3553c03d718a2580e1dc7e86daf29 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#pragma once

#include <mbgl/map/map.hpp>
#include <mbgl/map/map_impl.hpp>

namespace mbgl {

class FileSource;

// Non-public version of mbgl::Map that accepts a file source as parameter.
class MapAdapter : public Map {
public:
    explicit MapAdapter(RendererFrontend& frontend,
                        MapObserver& observer,
                        Size size,
                        float ratio,
                        std::shared_ptr<FileSource> fileSource,
                        Scheduler& scheduler,
                        const MapOptions& options)
        : Map(std::make_unique<Map::Impl>(frontend, observer, scheduler, size, ratio, std::move(fileSource), options)) {}
};

} // namespace mbgl