[android] Add ImageSource bindings
This commit is contained in:
@@ -2,11 +2,13 @@
|
||||
|
||||
#include <mbgl/style/source.hpp>
|
||||
#include <mbgl/style/sources/geojson_source.hpp>
|
||||
#include <mbgl/style/sources/image_source.hpp>
|
||||
#include <mbgl/style/sources/raster_source.hpp>
|
||||
#include <mbgl/style/sources/vector_source.hpp>
|
||||
|
||||
#include "source.hpp"
|
||||
#include "geojson_source.hpp"
|
||||
#include "image_source.hpp"
|
||||
#include "raster_source.hpp"
|
||||
#include "unknown_source.hpp"
|
||||
#include "vector_source.hpp"
|
||||
@@ -22,6 +24,8 @@ Source* initializeSourcePeer(mbgl::Map& map, mbgl::style::Source& coreSource) {
|
||||
source = new RasterSource(map, *coreSource.as<mbgl::style::RasterSource>());
|
||||
} else if (coreSource.is<mbgl::style::GeoJSONSource>()) {
|
||||
source = new GeoJSONSource(map, *coreSource.as<mbgl::style::GeoJSONSource>());
|
||||
} else if (coreSource.is<mbgl::style::ImageSource>()) {
|
||||
source = new ImageSource(map, *coreSource.as<mbgl::style::ImageSource>());
|
||||
} else {
|
||||
source = new UnknownSource(map, coreSource);
|
||||
}
|
||||
@@ -39,6 +43,7 @@ jni::jobject* createJavaSourcePeer(jni::JNIEnv& env, mbgl::Map& map, mbgl::style
|
||||
void registerNativeSources(jni::JNIEnv& env) {
|
||||
Source::registerNative(env);
|
||||
GeoJSONSource::registerNative(env);
|
||||
ImageSource::registerNative(env);
|
||||
RasterSource::registerNative(env);
|
||||
UnknownSource::registerNative(env);
|
||||
VectorSource::registerNative(env);
|
||||
|
||||
Reference in New Issue
Block a user