diff --git a/platform/darwin/src/MGLStyleAttributeFunction_Private.h b/platform/darwin/src/MGLStyleAttributeFunction_Private.h index 18977fa78..996f9e747 100644 --- a/platform/darwin/src/MGLStyleAttributeFunction_Private.h +++ b/platform/darwin/src/MGLStyleAttributeFunction_Private.h @@ -33,7 +33,15 @@ if (property.isConstant()) { \ return [NSValue value:&property.asConstant() withObjCType:type]; \ } else if (property.isFunction()) { \ - return nil; \ + MGLStyleAttributeFunction *function = [[MGLStyleAttributeFunction alloc] init]; \ + auto stops = property.asFunction().getStops(); \ + NSMutableDictionary *convertedStops = [NSMutableDictionary dictionaryWithCapacity:stops.size()]; \ + for (auto stop : stops) { \ + convertedStops[@(stop.first)] = [NSValue value:&stop.second withObjCType:type]; \ + } \ + function.base = @(property.asFunction().getBase()); \ + function.stops = convertedStops; \ + return function; \ } else { \ return nil; \ }