platform/android/MapboxGLAndroidSDK/src/cpp/style/sources/custom_geometry_source.cpp
static style::CustomGeometrySource::Options convertCustomGeometrySourceOptions(jni::JNIEnv& env,
                                                                                   const jni::Object<>& options,
                                                                                   style::TileFunction fetchFn,
                                                                                   style::TileFunction cancelFn) {
        using namespace mbgl::style::conversion;
        if (!options) {
            return style::CustomGeometrySource::Options();
        }
        Error error;
        optional<style::CustomGeometrySource::Options> result = convert<style::CustomGeometrySource::Options>(Value(env, options), error);
        if (!result) {
            throw std::logic_error(error.message);
        }
        result->fetchTileFunction = fetchFn;
        result->cancelTileFunction = cancelFn;
        return *result;
    }
// This conversion is expected not to fail because it's used only in contexts where
// the value was originally a CustomGeometrySourceOptions object on the Java side. If it fails
// to convert, it's a bug in our serialization or Java-side static typing.
This conversion is expected not to fail because it's used only in contexts where
the value was originally a CustomGeometrySourceOptions object on the Java side. If it fails
to convert, it's a bug in our serialization or Java-side static typing.
This conversion is expected not to fail because it ' s used only in contexts where the value was originally a CustomGeometrySourceOptions object on the Java side . If it fails to convert it ' s a bug in our serialization or Java - side static typing .
static style::CustomGeometrySource::Options convertCustomGeometrySourceOptions(jni::JNIEnv& env,
                                                                                   const jni::Object<>& options,
                                                                                   style::TileFunction fetchFn,
                                                                                   style::TileFunction cancelFn) {
        using namespace mbgl::style::conversion;
        if (!options) {
            return style::CustomGeometrySource::Options();
        }
        Error error;
        optional<style::CustomGeometrySource::Options> result = convert<style::CustomGeometrySource::Options>(Value(env, options), error);
        if (!result) {
            throw std::logic_error(error.message);
        }
        result->fetchTileFunction = fetchFn;
        result->cancelTileFunction = cancelFn;
        return *result;
    }
static style :: CustomGeometrySource :: Options convertCustomGeometrySourceOptions ( jni :: JNIEnv & env , const jni :: Object < > & options , style :: TileFunction fetchFn , style :: TileFunction cancelFn ) { using namespace mbgl :: style :: conversion ; if ( ! options ) { return style :: CustomGeometrySource :: Options ( ) ; } Error error ; optional < style :: CustomGeometrySource :: Options > result = convert < style :: CustomGeometrySource :: Options > ( Value ( env , options ) , error ) ; if ( ! result ) { throw std :: logic_error ( error . message ) ; } result -> fetchTileFunction = fetchFn ; result -> cancelTileFunction = cancelFn ; return * result ; }
This conversion is expected not to fail because it's used only in contexts where
the value was originally a CustomGeometrySourceOptions object on the Java side.
This conversion is expected not to fail because it ' s used only in contexts where the value was originally a CustomGeometrySourceOptions object on the Java side .