diff options
Diffstat (limited to 'platform/android/src/style/layers/layer.hpp')
-rw-r--r-- | platform/android/src/style/layers/layer.hpp | 21 |
1 files changed, 7 insertions, 14 deletions
diff --git a/platform/android/src/style/layers/layer.hpp b/platform/android/src/style/layers/layer.hpp index 5717852d0c..557990844c 100644 --- a/platform/android/src/style/layers/layer.hpp +++ b/platform/android/src/style/layers/layer.hpp @@ -1,11 +1,11 @@ #pragma once #include <mbgl/layermanager/layer_factory.hpp> -#include <mbgl/map/map.hpp> #include <mbgl/style/layer.hpp> +#include <mbgl/style/style.hpp> #include "../../gson/json_array.hpp" -#include "../value.hpp" #include "../../gson/json_element.hpp" +#include "../value.hpp" #include <jni/jni.hpp> @@ -27,7 +27,7 @@ public: */ void setLayer(std::unique_ptr<mbgl::style::Layer>); - void addToMap(mbgl::Map&, mbgl::optional<std::string>); + void addToStyle(mbgl::style::Style&, mbgl::optional<std::string>); // Release the owned view and return it std::unique_ptr<mbgl::style::Layer> releaseCoreLayer(); @@ -68,16 +68,11 @@ protected: /* * Called when a non-owning peer object is created on the c++ side */ - Layer(mbgl::Map&, mbgl::style::Layer&); + Layer(mbgl::style::Layer&); /* * Called when a owning peer object is created on the c++ side */ - Layer(mbgl::Map&, std::unique_ptr<mbgl::style::Layer>); - - /* - * Called when a Java object was created from the jvm side - */ Layer(std::unique_ptr<mbgl::style::Layer>); // Owned layer is set when creating a new layer, before adding it to the map @@ -85,9 +80,6 @@ protected: // 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; }; /** @@ -99,12 +91,13 @@ public: /** * @brief Create a non-owning peer. */ - virtual jni::Local<jni::Object<Layer>> createJavaLayerPeer(jni::JNIEnv&, mbgl::Map&, mbgl::style::Layer&) = 0; + virtual jni::Local<jni::Object<Layer>> createJavaLayerPeer(jni::JNIEnv&, mbgl::style::Layer&) = 0; /** * @brief Create an owning peer. */ - virtual jni::Local<jni::Object<Layer>> createJavaLayerPeer(jni::JNIEnv& env, mbgl::Map& map, std::unique_ptr<mbgl::style::Layer>) = 0; + virtual jni::Local<jni::Object<Layer>> createJavaLayerPeer(jni::JNIEnv& env, + std::unique_ptr<mbgl::style::Layer>) = 0; /** * @brief Register peer methods. |