[android] fix ownership of style layer after delete
This commit is contained in:
committed by
Ivo van Dongen
parent
f0de56cffa
commit
609cdb0fd7
@@ -9,14 +9,27 @@
|
||||
namespace mbgl {
|
||||
namespace android {
|
||||
|
||||
/**
|
||||
* Creates an owning peer object (for layers not attached to the map) from the JVM side
|
||||
*/
|
||||
RasterLayer::RasterLayer(jni::JNIEnv& env, jni::String layerId, jni::String sourceId)
|
||||
: Layer(env, std::make_unique<mbgl::style::RasterLayer>(jni::Make<std::string>(env, layerId), jni::Make<std::string>(env, sourceId))) {
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a non-owning peer object (for layers currently attached to the map)
|
||||
*/
|
||||
RasterLayer::RasterLayer(mbgl::Map& map, mbgl::style::RasterLayer& coreLayer)
|
||||
: Layer(map, coreLayer) {
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates an owning peer object (for layers not attached to the map)
|
||||
*/
|
||||
RasterLayer::RasterLayer(mbgl::Map& map, std::unique_ptr<mbgl::style::RasterLayer> coreLayer)
|
||||
: Layer(map, std::move(coreLayer)) {
|
||||
}
|
||||
|
||||
RasterLayer::~RasterLayer() = default;
|
||||
|
||||
// Property getters
|
||||
|
||||
Reference in New Issue
Block a user