summaryrefslogtreecommitdiff
path: root/src/mbgl/style/sources/image_source_impl.hpp
blob: e0999c34a5da7184a8d85d3a7ed0453cd8b6122a (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
#pragma once

#include <mbgl/style/source_impl.hpp>
#include <mbgl/style/sources/image_source.hpp>
#include <mbgl/util/image.hpp>
#include <mbgl/util/geo.hpp>

namespace mbgl {

namespace style {

class ImageSource::Impl : public Source::Impl {
public:
    Impl(std::string id, std::array<LatLng, 4> coords);
    Impl(const Impl& rhs, std::array<LatLng, 4> coords);
    Impl(const Impl& rhs, UnassociatedImage&& image);

    ~Impl() final;

    std::shared_ptr<UnassociatedImage> getImage() const;
    std::array<LatLng, 4> getCoordinates() const;

    optional<std::string> getAttribution() const final;
private:
    std::array<LatLng, 4> coords;
    std::shared_ptr<UnassociatedImage> image;
};

} // namespace style
} // namespace mbgl