From 5dd98df50ba1210b1eef0d8d6655713a725f2995 Mon Sep 17 00:00:00 2001 From: John Firebaugh Date: Fri, 21 Apr 2017 14:52:19 -0700 Subject: [all] Rationalize style::Image A style has a collection of images, just as it has collections of sources and layers. * Name things appropriately * Use std::unique_ptr --- include/mbgl/map/map.hpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'include/mbgl/map') diff --git a/include/mbgl/map/map.hpp b/include/mbgl/map/map.hpp index 26ac154b8b..0e3cee4e70 100644 --- a/include/mbgl/map/map.hpp +++ b/include/mbgl/map/map.hpp @@ -25,9 +25,9 @@ class Backend; class View; class FileSource; class Scheduler; -class SpriteImage; namespace style { +class Image; class Source; class Layer; } // namespace style @@ -154,9 +154,9 @@ public: LatLng latLngForPixel(const ScreenCoordinate&) const; // Annotations - void addAnnotationIcon(const std::string&, std::shared_ptr); - void removeAnnotationIcon(const std::string&); - double getTopOffsetPixelsForAnnotationIcon(const std::string&); + void addAnnotationImage(const std::string&, std::unique_ptr); + void removeAnnotationImage(const std::string&); + double getTopOffsetPixelsForAnnotationImage(const std::string&); AnnotationID addAnnotation(const Annotation&); void updateAnnotation(AnnotationID, const Annotation&); @@ -174,10 +174,10 @@ public: void addLayer(std::unique_ptr, const optional& beforeLayerID = {}); std::unique_ptr removeLayer(const std::string& layerID); - // Add image, bound to the style - void addImage(const std::string&, std::unique_ptr); + // Images + void addImage(const std::string&, std::unique_ptr); void removeImage(const std::string&); - const SpriteImage* getImage(const std::string&); + const style::Image* getImage(const std::string&); // Defaults std::string getStyleName() const; -- cgit v1.2.1