diff options
author | John Firebaugh <john.firebaugh@gmail.com> | 2015-12-09 16:52:59 -0800 |
---|---|---|
committer | John Firebaugh <john.firebaugh@gmail.com> | 2015-12-11 12:44:54 -0800 |
commit | 65b3220368f669dd7ddbcb06e95019319e0c536a (patch) | |
tree | f0e5a437f11feb231336dc7aa4ce67fd07ebab92 /include/mbgl/map | |
parent | 78691fa9e61dadbb73be28bcac1a606d7a029ad4 (diff) | |
download | qtlocation-mapboxgl-65b3220368f669dd7ddbcb06e95019319e0c536a.tar.gz |
[core] Reduce custom layer API to lowest common denominator
Diffstat (limited to 'include/mbgl/map')
-rw-r--r-- | include/mbgl/map/map.hpp | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/include/mbgl/map/map.hpp b/include/mbgl/map/map.hpp index 8057837546..df7597ced4 100644 --- a/include/mbgl/map/map.hpp +++ b/include/mbgl/map/map.hpp @@ -9,6 +9,7 @@ #include <mbgl/util/noncopyable.hpp> #include <mbgl/util/vec.hpp> #include <mbgl/annotation/annotation.hpp> +#include <mbgl/style/types.hpp> #include <cstdint> #include <string> @@ -27,7 +28,6 @@ class Transform; class PointAnnotation; class ShapeAnnotation; struct CameraOptions; -class StyleLayer; namespace util { template <class T> class Thread; @@ -164,9 +164,12 @@ public: AnnotationIDs getPointAnnotationsInBounds(const LatLngBounds&); LatLngBounds getBoundsForAnnotations(const AnnotationIDs&); - // Style API - void addLayer(std::unique_ptr<StyleLayer>); - void addLayer(std::unique_ptr<StyleLayer>, const std::string& before); + void addCustomLayer(const std::string& id, + CustomLayerInitializeFunction, + CustomLayerRenderFunction, + CustomLayerDeinitializeFunction, + void* context, + const char* before = nullptr); // Memory void setSourceTileCacheSize(size_t); |