diff options
Diffstat (limited to 'platform/darwin/src/MGLStyleValue_Private.h')
-rw-r--r-- | platform/darwin/src/MGLStyleValue_Private.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/platform/darwin/src/MGLStyleValue_Private.h b/platform/darwin/src/MGLStyleValue_Private.h index 75e422fb45..cc1950bfb8 100644 --- a/platform/darwin/src/MGLStyleValue_Private.h +++ b/platform/darwin/src/MGLStyleValue_Private.h @@ -162,6 +162,11 @@ private: // Private utilities for converting from mgl to mbgl values mbglValue = rawValue.UTF8String; } + // Formatted + void getMBGLValue(NSString *rawValue, mbgl::style::expression::Formatted &mbglValue) { + mbglValue = mbgl::style::expression::Formatted(rawValue.UTF8String); + } + // Offsets void getMBGLValue(id rawValue, std::array<float, 2> &mbglValue) { if ([rawValue isKindOfClass:[NSValue class]]) { @@ -250,6 +255,11 @@ private: // Private utilities for converting from mbgl to mgl values return @(mbglStopValue.c_str()); } + // Formatted + static NSString *toMGLRawStyleValue(const mbgl::style::expression::Formatted &mbglStopValue) { + return @(mbglStopValue.toString().c_str()); + } + // Offsets static NSValue *toMGLRawStyleValue(const std::array<float, 2> &mbglStopValue) { return [NSValue mgl_valueWithOffsetArray:mbglStopValue]; |