summaryrefslogtreecommitdiff
path: root/platform/android/src/style/layers/layers.cpp
diff options
context:
space:
mode:
authorIvo van Dongen <info@ivovandongen.nl>2016-07-26 17:02:52 -0400
committerIvo van Dongen <info@ivovandongen.nl>2016-08-02 16:58:03 -0400
commit10b2cc60a7b274f71b46976b1e9e89031b9e44ca (patch)
tree8f3cccee03e5a4205c4754f7eb723ec73d19c8b5 /platform/android/src/style/layers/layers.cpp
parented821c06d96e414b43db6fd1505389803cb022d4 (diff)
downloadqtlocation-mapboxgl-10b2cc60a7b274f71b46976b1e9e89031b9e44ca.tar.gz
[android] #5610 - Runtime style api - part 2
Diffstat (limited to 'platform/android/src/style/layers/layers.cpp')
-rw-r--r--platform/android/src/style/layers/layers.cpp10
1 files changed, 7 insertions, 3 deletions
diff --git a/platform/android/src/style/layers/layers.cpp b/platform/android/src/style/layers/layers.cpp
index 4ccdc829f2..57dbf6f4b1 100644
--- a/platform/android/src/style/layers/layers.cpp
+++ b/platform/android/src/style/layers/layers.cpp
@@ -6,6 +6,7 @@
#include <mbgl/style/layers/line_layer.hpp>
#include <mbgl/style/layers/raster_layer.hpp>
#include <mbgl/style/layers/symbol_layer.hpp>
+#include <mbgl/style/layers/custom_layer.hpp>
#include "background_layer.hpp"
#include "circle_layer.hpp"
@@ -13,6 +14,7 @@
#include "line_layer.hpp"
#include "raster_layer.hpp"
#include "symbol_layer.hpp"
+#include "custom_layer.hpp"
namespace mbgl {
namespace android {
@@ -31,6 +33,8 @@ Layer* initializeLayerPeer(mbgl::Map& map, mbgl::style::Layer& coreLayer) {
layer = new RasterLayer(map, *coreLayer.as<mbgl::style::RasterLayer>());
} else if (coreLayer.is<mbgl::style::SymbolLayer>()) {
layer = new SymbolLayer(map, *coreLayer.as<mbgl::style::SymbolLayer>());
+ } else if (coreLayer.is<mbgl::style::CustomLayer>()) {
+ layer = new CustomLayer(map, *coreLayer.as<mbgl::style::CustomLayer>());
} else {
throw new std::runtime_error("Layer type not implemented");
}
@@ -42,7 +46,6 @@ jni::jobject* createJavaLayerPeer(jni::JNIEnv& env, mbgl::Map& map, mbgl::style:
std::unique_ptr<Layer> peerLayer = std::unique_ptr<Layer>(initializeLayerPeer(map, coreLayer));
jni::jobject* result = peerLayer->createJavaPeer(env);
peerLayer.release();
-
return result;
}
@@ -54,7 +57,8 @@ void registerNativeLayers(jni::JNIEnv& env) {
LineLayer::registerNative(env);
RasterLayer::registerNative(env);
SymbolLayer::registerNative(env);
+ CustomLayer::registerNative(env);
}
-}
-} \ No newline at end of file
+} //android
+} //mbgl \ No newline at end of file