From cc1ea759a681cadcfd06fd7bdda79ca6deb38c62 Mon Sep 17 00:00:00 2001 From: John Firebaugh Date: Mon, 15 May 2017 14:09:06 -0700 Subject: [core, node, darwin, android, qt] Make image ID part of Image More like Source and Layer. --- include/mbgl/map/map.hpp | 4 ++-- include/mbgl/style/image.hpp | 6 +++++- 2 files changed, 7 insertions(+), 3 deletions(-) (limited to 'include') diff --git a/include/mbgl/map/map.hpp b/include/mbgl/map/map.hpp index 6b86684faa..00131cc5ea 100644 --- a/include/mbgl/map/map.hpp +++ b/include/mbgl/map/map.hpp @@ -148,7 +148,7 @@ public: LatLng latLngForPixel(const ScreenCoordinate&) const; // Annotations - void addAnnotationImage(const std::string&, std::unique_ptr); + void addAnnotationImage(std::unique_ptr); void removeAnnotationImage(const std::string&); double getTopOffsetPixelsForAnnotationImage(const std::string&); @@ -169,7 +169,7 @@ public: std::unique_ptr removeLayer(const std::string& layerID); // Images - void addImage(const std::string&, std::unique_ptr); + void addImage(std::unique_ptr); void removeImage(const std::string&); const style::Image* getImage(const std::string&); diff --git a/include/mbgl/style/image.hpp b/include/mbgl/style/image.hpp index 528b2ecb95..3877086bd6 100644 --- a/include/mbgl/style/image.hpp +++ b/include/mbgl/style/image.hpp @@ -3,12 +3,16 @@ #include #include +#include + namespace mbgl { namespace style { class Image { public: - Image(PremultipliedImage&&, float pixelRatio, bool sdf = false); + Image(std::string id, PremultipliedImage&&, float pixelRatio, bool sdf = false); + + std::string getID() const; const PremultipliedImage& getImage() const; -- cgit v1.2.1