diff options
Diffstat (limited to 'platform/android/src/style/layers/layer.hpp')
-rw-r--r-- | platform/android/src/style/layers/layer.hpp | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/platform/android/src/style/layers/layer.hpp b/platform/android/src/style/layers/layer.hpp index 024a3c38b7..01eac2280b 100644 --- a/platform/android/src/style/layers/layer.hpp +++ b/platform/android/src/style/layers/layer.hpp @@ -34,10 +34,9 @@ public: virtual jni::jobject* createJavaPeer(jni::JNIEnv&) = 0; - jni::String getId(jni::JNIEnv&); + void addToMap(mbgl::Map&, mbgl::optional<std::string>); - //Release the owned view and return it - std::unique_ptr<mbgl::style::Layer> releaseCoreLayer(); + jni::String getId(jni::JNIEnv&); void setLayoutProperty(jni::JNIEnv&, jni::String, jni::Object<> value); @@ -64,8 +63,16 @@ public: jni::Object<jni::ObjectTag> getVisibility(jni::JNIEnv&); protected: + //Release the owned view and return it + std::unique_ptr<mbgl::style::Layer> releaseCoreLayer(); + + //Owned layer is set when creating a new layer, before adding it to the map std::unique_ptr<mbgl::style::Layer> ownedLayer; + + //Raw reference to the layer mbgl::style::Layer& layer; + + //Map is set when the layer is retrieved or after adding to the map mbgl::Map* map; }; |