You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Aug 8, 2023. It is now read-only.
R"(Unknown expression ")" + name + R"(". If you wanted a literal array, use ["literal", [...]].)",
0
);
returnParseResult();
}
Stack:
#0 0x000000010c89280f in mbgl::style::expression::parseCompoundExpression(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, mbgl::style::conversion::Convertible const&, mbgl::style::expression::ParsingContext&) at /Work/Freelance/Ruby/MlkFestival/RNMPGL/mapbox-gl-native/src/mbgl/style/expression/compound_expression.cpp:1042
#1 0x000000010c91e8ec in mbgl::style::expression::ParsingContext::parse(mbgl::style::conversion::Convertible const&, std::experimental::optional<mbgl::style::expression::TypeAnnotationOption>) at /Work/Freelance/Ruby/MlkFestival/RNMPGL/mapbox-gl-native/src/mbgl/style/expression/parsing_context.cpp:161
#2 0x000000010c91e235 in mbgl::style::expression::ParsingContext::parse(mbgl::style::conversion::Convertible const&, unsigned long, std::experimental::optional<mapbox::util::variant<mbgl::style::expression::type::NullType, mbgl::style::expression::type::NumberType, mbgl::style::expression::type::BooleanType, mbgl::style::expression::type::StringType, mbgl::style::expression::type::ColorType, mbgl::style::expression::type::ObjectType, mbgl::style::expression::type::ValueType, mapbox::util::recursive_wrapper<mbgl::style::expression::type::Array>, mbgl::style::expression::type::CollatorType, mbgl::style::expression::type::FormattedType, mbgl::style::expression::type::ErrorType> >, std::experimental::optional<mbgl::style::expression::TypeAnnotationOption>) at /Work/Freelance/Ruby/MlkFestival/RNMPGL/mapbox-gl-native/src/mbgl/style/expression/parsing_context.cpp:88
#3 0x000000010c886646 in mbgl::style::expression::parseComparison(mbgl::style::conversion::Convertible const&, mbgl::style::expression::ParsingContext&) at /Work/Freelance/Ruby/MlkFestival/RNMPGL/mapbox-gl-native/src/mbgl/style/expression/comparison.cpp:221
#4 0x000000010c91e86b in mbgl::style::expression::ParsingContext::parse(mbgl::style::conversion::Convertible const&, std::experimental::optional<mbgl::style::expression::TypeAnnotationOption>) at /Work/Freelance/Ruby/MlkFestival/RNMPGL/mapbox-gl-native/src/mbgl/style/expression/parsing_context.cpp:159
#5 0x000000010c92102f in mbgl::style::expression::ParsingContext::parseExpression(mbgl::style::conversion::Convertible const&, std::experimental::optional<mbgl::style::expression::TypeAnnotationOption>) at /Work/Freelance/Ruby/MlkFestival/RNMPGL/mapbox-gl-native/src/mbgl/style/expression/parsing_context.cpp:229
#6 0x000000010c7cea32 in mbgl::style::conversion::Converter<mbgl::style::Filter, void>::operator()(mbgl::style::conversion::Convertible const&, mbgl::style::conversion::Error&) const at /Work/Freelance/Ruby/MlkFestival/RNMPGL/mapbox-gl-native/src/mbgl/style/conversion/filter.cpp:23
#7 0x000000010c2e18f8 in std::experimental::optional<mbgl::style::Filter> mbgl::style::conversion::convert<mbgl::style::Filter>(mbgl::style::conversion::Convertible const&, mbgl::style::conversion::Error&) at /Work/Freelance/Ruby/MlkFestival/RNMPGL/mapbox-gl-native/include/mbgl/style/conversion_impl.hpp:286
#8 0x000000010c2e1627 in ::-[NSPredicate(MGLPrivateAdditions) mgl_filter]() at /Work/Freelance/Ruby/MlkFestival/RNMPGL/mapbox-gl-native/platform/darwin/src/NSPredicate+MGLAdditions.mm:15
#9 0x000000010c2fba80 in ::-[MGLFillStyleLayer setPredicate:](NSPredicate *) at /Work/Freelance/Ruby/MlkFestival/RNMPGL/mapbox-gl-native/platform/darwin/src/MGLFillStyleLayer.mm:74
As a workaround [NSPredicate predicateWithMGLJSONObject: @[ @"!",@[@"has", @"foo"]]]
!has is part of the filter syntax in the style specification. Filters are deprecated and are no longer supported in the native SDKs. Instead, wrap a has expression inside a ! expression.
@1ec5 thanks, i was just searching for '!has' in docs and was confused by avaiability, as it statediOS > 3.3.0. I have not noticed it's in the filter part of docs.
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
The following code on ios:
results in an exception:
"[1][0]: Unknown expression "!has". If you wanted a literal array, use ["literal", [...]]."
Steps to reproduce
Expected behavior
Work as expected.
Actual behavior
Raises an exception.
Notes:
[NSPredicate predicateWithMGLJSONObject: @[ @"!has", @"foo"]]
isMGL_FUNCTION("!has", "foo") == 1
mgl_jsonExpressionObject
retruns[==,[!has,foo],1]
This is where we set this error:
mapbox-gl-native/src/mbgl/style/expression/compound_expression.cpp
Lines 1037 to 1047 in 64559a2
Stack:
As a workaround
[NSPredicate predicateWithMGLJSONObject: @[ @"!",@[@"has", @"foo"]]]
Configuration
Mapbox SDK versions: 198ed88 - 5.1.0.alpha1
iOS/macOS versions: 12.2/10.14.4
Device/simulator models: iPhone X
Xcode version: 10.2.1
The text was updated successfully, but these errors were encountered: