[core, ios, macos] Refactor composite stop types and conversions
This commit is contained in:
@@ -155,7 +155,7 @@ public:
|
||||
MGLCompositeStyleFunction<ObjCType> *compositeStyleFunction = (MGLCompositeStyleFunction<ObjCType> *)value;
|
||||
switch (compositeStyleFunction.interpolationMode) {
|
||||
case MGLInterpolationModeExponential: {
|
||||
__block std::map<float, mbgl::style::ExponentialStops<MBGLType>> outerStops = {};
|
||||
__block std::map<float, std::map<float, MBGLType>> outerStops = {};
|
||||
[compositeStyleFunction.stops enumerateKeysAndObjectsUsingBlock:^(NSNumber * _Nonnull zoomKey, NSDictionary * _Nonnull stopValue, BOOL * _Nonnull stop) {
|
||||
std::map<float, MBGLType> stops = {};
|
||||
for (NSNumber *key in stopValue.allKeys) {
|
||||
@@ -166,10 +166,12 @@ public:
|
||||
NSCAssert(mbglStopValue.isConstant(), @"Stops must be constant");
|
||||
stops[key.floatValue] = mbglStopValue.asConstant();
|
||||
}
|
||||
mbgl::style::ExponentialStops<MBGLType> innerStops = {stops, (float)compositeStyleFunction.interpolationBase};
|
||||
outerStops[zoomKey.floatValue] = innerStops;
|
||||
outerStops[zoomKey.floatValue] = stops;
|
||||
}];
|
||||
mbgl::style::CompositeFunction<MBGLType> compositeFunction = {compositeStyleFunction.attributeName.UTF8String, outerStops};
|
||||
mbgl::style::CompositeFunction<MBGLType> compositeFunction {
|
||||
compositeStyleFunction.attributeName.UTF8String,
|
||||
mbgl::style::CompositeExponentialStops<MBGLType> { outerStops, (float)compositeStyleFunction.interpolationBase }
|
||||
};
|
||||
if (compositeStyleFunction.defaultValue) {
|
||||
NSCAssert([compositeStyleFunction.defaultValue isKindOfClass:[MGLStyleConstantValue class]], @"Default value must be constant");
|
||||
MBGLType mbglValue;
|
||||
@@ -181,7 +183,7 @@ public:
|
||||
}
|
||||
break;
|
||||
case MGLInterpolationModeInterval: {
|
||||
__block std::map<float, mbgl::style::IntervalStops<MBGLType>> outerStops = {};
|
||||
__block std::map<float, std::map<float, MBGLType>> outerStops = {};
|
||||
[compositeStyleFunction.stops enumerateKeysAndObjectsUsingBlock:^(NSNumber * _Nonnull zoomKey, NSDictionary * _Nonnull stopValue, BOOL * _Nonnull stop) {
|
||||
std::map<float, MBGLType> stops = {};
|
||||
for (NSNumber *key in stopValue.allKeys) {
|
||||
@@ -192,10 +194,12 @@ public:
|
||||
NSCAssert(mbglStopValue.isConstant(), @"Stops must be constant");
|
||||
stops[key.floatValue] = mbglStopValue.asConstant();
|
||||
}
|
||||
mbgl::style::IntervalStops<MBGLType> innerStops = {stops};
|
||||
outerStops[zoomKey.floatValue] = innerStops;
|
||||
outerStops[zoomKey.floatValue] = stops;
|
||||
}];
|
||||
mbgl::style::CompositeFunction<MBGLType> compositeFunction = {compositeStyleFunction.attributeName.UTF8String, outerStops};
|
||||
mbgl::style::CompositeFunction<MBGLType> compositeFunction {
|
||||
compositeStyleFunction.attributeName.UTF8String,
|
||||
mbgl::style::CompositeIntervalStops<MBGLType> { outerStops }
|
||||
};
|
||||
if (compositeStyleFunction.defaultValue) {
|
||||
NSCAssert([compositeStyleFunction.defaultValue isKindOfClass:[MGLStyleConstantValue class]], @"Default value must be constant");
|
||||
MBGLType mbglValue;
|
||||
@@ -207,7 +211,7 @@ public:
|
||||
}
|
||||
break;
|
||||
case MGLInterpolationModeCategorical: {
|
||||
__block std::map<float, mbgl::style::CategoricalStops<MBGLType>> outerStops = {};
|
||||
__block std::map<float, std::map<mbgl::style::CategoricalValue, MBGLType>> outerStops = {};
|
||||
[compositeStyleFunction.stops enumerateKeysAndObjectsUsingBlock:^(NSNumber * _Nonnull zoomKey, NSDictionary * _Nonnull stopValue, BOOL * _Nonnull stop) {
|
||||
__block std::map<mbgl::style::CategoricalValue, MBGLType> stops = {};
|
||||
[stopValue enumerateKeysAndObjectsUsingBlock:^(id _Nonnull categoryKey, MGLStyleValue<ObjCType> * _Nonnull innerValue, BOOL * _Nonnull stop) {
|
||||
@@ -233,10 +237,12 @@ public:
|
||||
}
|
||||
}
|
||||
}];
|
||||
mbgl::style::CategoricalStops<MBGLType> categoricalStops = {stops};
|
||||
outerStops[zoomKey.floatValue] = categoricalStops;
|
||||
outerStops[zoomKey.floatValue] = stops;
|
||||
}];
|
||||
mbgl::style::CompositeFunction<MBGLType> compositeFunction = {compositeStyleFunction.attributeName.UTF8String, outerStops};
|
||||
mbgl::style::CompositeFunction<MBGLType> compositeFunction {
|
||||
compositeStyleFunction.attributeName.UTF8String,
|
||||
mbgl::style::CompositeCategoricalStops<MBGLType> { outerStops }
|
||||
};
|
||||
if (compositeStyleFunction.defaultValue) {
|
||||
NSCAssert([compositeStyleFunction.defaultValue isKindOfClass:[MGLStyleConstantValue class]], @"Default value must be constant");
|
||||
MBGLType mbglValue;
|
||||
@@ -655,27 +661,25 @@ private: // Private utilities for converting from mbgl to mgl values
|
||||
// Converts a composite function and all possible mbgl stops into an equivilant mgl style value
|
||||
class CompositeFunctionStopsVisitor {
|
||||
public:
|
||||
id operator()(const std::map<float, mbgl::style::ExponentialStops<MBGLType>> &mbglStops) {
|
||||
float base = 1.0f;
|
||||
NSMutableDictionary *stops = [NSMutableDictionary dictionaryWithCapacity:mbglStops.size()];
|
||||
for (auto const& outerStop: mbglStops) {
|
||||
stops[@(outerStop.first)] = toConvertedStops(outerStop.second.stops);
|
||||
base = outerStop.second.base;
|
||||
id operator()(const mbgl::style::CompositeExponentialStops<MBGLType> &mbglStops) {
|
||||
NSMutableDictionary *stops = [NSMutableDictionary dictionaryWithCapacity:mbglStops.stops.size()];
|
||||
for (auto const& outerStop: mbglStops.stops) {
|
||||
stops[@(outerStop.first)] = toConvertedStops(outerStop.second);
|
||||
}
|
||||
MGLCompositeStyleFunction *compositeFunction = [MGLCompositeStyleFunction functionWithInterpolationMode:MGLInterpolationModeExponential
|
||||
stops:stops
|
||||
attributeName:@(mbglFunction.property.c_str())
|
||||
options:@{MGLStyleFunctionOptionInterpolationBase: @(base)}];
|
||||
options:@{MGLStyleFunctionOptionInterpolationBase: @(mbglStops.base)}];
|
||||
if (mbglFunction.defaultValue) {
|
||||
compositeFunction.defaultValue = [MGLStyleValue valueWithRawValue:toMGLRawStyleValue(*mbglFunction.defaultValue)];
|
||||
}
|
||||
return compositeFunction;
|
||||
}
|
||||
|
||||
id operator()(const std::map<float, mbgl::style::IntervalStops<MBGLType>> &mbglStops) {
|
||||
NSMutableDictionary *stops = [NSMutableDictionary dictionaryWithCapacity:mbglStops.size()];
|
||||
for (auto const& outerStop: mbglStops) {
|
||||
stops[@(outerStop.first)] = toConvertedStops(outerStop.second.stops);
|
||||
id operator()(const mbgl::style::CompositeIntervalStops<MBGLType> &mbglStops) {
|
||||
NSMutableDictionary *stops = [NSMutableDictionary dictionaryWithCapacity:mbglStops.stops.size()];
|
||||
for (auto const& outerStop: mbglStops.stops) {
|
||||
stops[@(outerStop.first)] = toConvertedStops(outerStop.second);
|
||||
}
|
||||
MGLCompositeStyleFunction *compositeFunction = [MGLCompositeStyleFunction functionWithInterpolationMode:MGLInterpolationModeInterval
|
||||
stops:stops
|
||||
@@ -687,11 +691,11 @@ private: // Private utilities for converting from mbgl to mgl values
|
||||
return compositeFunction;
|
||||
}
|
||||
|
||||
id operator()(const std::map<float, mbgl::style::CategoricalStops<MBGLType>> &mbglStops) {
|
||||
NSMutableDictionary *stops = [NSMutableDictionary dictionaryWithCapacity:mbglStops.size()];
|
||||
for (auto const& outerStop: mbglStops) {
|
||||
NSMutableDictionary *innerStops = [NSMutableDictionary dictionaryWithCapacity:outerStop.second.stops.size()];
|
||||
for (const auto &mbglStop : outerStop.second.stops) {
|
||||
id operator()(const mbgl::style::CompositeCategoricalStops<MBGLType> &mbglStops) {
|
||||
NSMutableDictionary *stops = [NSMutableDictionary dictionaryWithCapacity:mbglStops.stops.size()];
|
||||
for (auto const& outerStop: mbglStops.stops) {
|
||||
NSMutableDictionary *innerStops = [NSMutableDictionary dictionaryWithCapacity:outerStop.second.size()];
|
||||
for (const auto &mbglStop : outerStop.second) {
|
||||
auto categoricalValue = mbglStop.first;
|
||||
auto rawValue = toMGLRawStyleValue(mbglStop.second);
|
||||
CategoricalValueVisitor categoricalValueVisitor;
|
||||
|
||||
@@ -82,8 +82,8 @@
|
||||
functionStyleValue = [MGLStyleValue<NSNumber *> valueWithInterpolationMode:MGLInterpolationModeExponential compositeStops:@{@10: @{@18: constantStyleValue}} attributeName:@"keyName" options:nil];
|
||||
layer.circleBlur = functionStyleValue;
|
||||
|
||||
mbgl::style::ExponentialStops<float> innerStops = { { {18, 0xff}}, 1.0 };
|
||||
std::map<float, mbgl::style::ExponentialStops<float>> compositeStops = { {10.0, innerStops} };
|
||||
std::map<float, float> innerStops { {18, 0xff} };
|
||||
mbgl::style::CompositeExponentialStops<float> compositeStops { { {10.0, innerStops} }, 1.0 };
|
||||
|
||||
propertyValue = mbgl::style::CompositeFunction<float> { "keyName", compositeStops };
|
||||
|
||||
@@ -139,8 +139,8 @@
|
||||
functionStyleValue = [MGLStyleValue<MGLColor *> valueWithInterpolationMode:MGLInterpolationModeExponential compositeStops:@{@10: @{@18: constantStyleValue}} attributeName:@"keyName" options:nil];
|
||||
layer.circleColor = functionStyleValue;
|
||||
|
||||
mbgl::style::ExponentialStops<mbgl::Color> innerStops = { { {18, { 1, 0, 0, 1 }}}, 1.0 };
|
||||
std::map<float, mbgl::style::ExponentialStops<mbgl::Color>> compositeStops = { {10.0, innerStops} };
|
||||
std::map<float, mbgl::Color> innerStops { {18, { 1, 0, 0, 1 }} };
|
||||
mbgl::style::CompositeExponentialStops<mbgl::Color> compositeStops { { {10.0, innerStops} }, 1.0 };
|
||||
|
||||
propertyValue = mbgl::style::CompositeFunction<mbgl::Color> { "keyName", compositeStops };
|
||||
|
||||
@@ -196,8 +196,8 @@
|
||||
functionStyleValue = [MGLStyleValue<NSNumber *> valueWithInterpolationMode:MGLInterpolationModeExponential compositeStops:@{@10: @{@18: constantStyleValue}} attributeName:@"keyName" options:nil];
|
||||
layer.circleOpacity = functionStyleValue;
|
||||
|
||||
mbgl::style::ExponentialStops<float> innerStops = { { {18, 0xff}}, 1.0 };
|
||||
std::map<float, mbgl::style::ExponentialStops<float>> compositeStops = { {10.0, innerStops} };
|
||||
std::map<float, float> innerStops { {18, 0xff} };
|
||||
mbgl::style::CompositeExponentialStops<float> compositeStops { { {10.0, innerStops} }, 1.0 };
|
||||
|
||||
propertyValue = mbgl::style::CompositeFunction<float> { "keyName", compositeStops };
|
||||
|
||||
@@ -253,8 +253,8 @@
|
||||
functionStyleValue = [MGLStyleValue<NSNumber *> valueWithInterpolationMode:MGLInterpolationModeExponential compositeStops:@{@10: @{@18: constantStyleValue}} attributeName:@"keyName" options:nil];
|
||||
layer.circleRadius = functionStyleValue;
|
||||
|
||||
mbgl::style::ExponentialStops<float> innerStops = { { {18, 0xff}}, 1.0 };
|
||||
std::map<float, mbgl::style::ExponentialStops<float>> compositeStops = { {10.0, innerStops} };
|
||||
std::map<float, float> innerStops { {18, 0xff} };
|
||||
mbgl::style::CompositeExponentialStops<float> compositeStops { { {10.0, innerStops} }, 1.0 };
|
||||
|
||||
propertyValue = mbgl::style::CompositeFunction<float> { "keyName", compositeStops };
|
||||
|
||||
@@ -350,8 +350,8 @@
|
||||
functionStyleValue = [MGLStyleValue<MGLColor *> valueWithInterpolationMode:MGLInterpolationModeExponential compositeStops:@{@10: @{@18: constantStyleValue}} attributeName:@"keyName" options:nil];
|
||||
layer.circleStrokeColor = functionStyleValue;
|
||||
|
||||
mbgl::style::ExponentialStops<mbgl::Color> innerStops = { { {18, { 1, 0, 0, 1 }}}, 1.0 };
|
||||
std::map<float, mbgl::style::ExponentialStops<mbgl::Color>> compositeStops = { {10.0, innerStops} };
|
||||
std::map<float, mbgl::Color> innerStops { {18, { 1, 0, 0, 1 }} };
|
||||
mbgl::style::CompositeExponentialStops<mbgl::Color> compositeStops { { {10.0, innerStops} }, 1.0 };
|
||||
|
||||
propertyValue = mbgl::style::CompositeFunction<mbgl::Color> { "keyName", compositeStops };
|
||||
|
||||
@@ -407,8 +407,8 @@
|
||||
functionStyleValue = [MGLStyleValue<NSNumber *> valueWithInterpolationMode:MGLInterpolationModeExponential compositeStops:@{@10: @{@18: constantStyleValue}} attributeName:@"keyName" options:nil];
|
||||
layer.circleStrokeOpacity = functionStyleValue;
|
||||
|
||||
mbgl::style::ExponentialStops<float> innerStops = { { {18, 0xff}}, 1.0 };
|
||||
std::map<float, mbgl::style::ExponentialStops<float>> compositeStops = { {10.0, innerStops} };
|
||||
std::map<float, float> innerStops { {18, 0xff} };
|
||||
mbgl::style::CompositeExponentialStops<float> compositeStops { { {10.0, innerStops} }, 1.0 };
|
||||
|
||||
propertyValue = mbgl::style::CompositeFunction<float> { "keyName", compositeStops };
|
||||
|
||||
@@ -464,8 +464,8 @@
|
||||
functionStyleValue = [MGLStyleValue<NSNumber *> valueWithInterpolationMode:MGLInterpolationModeExponential compositeStops:@{@10: @{@18: constantStyleValue}} attributeName:@"keyName" options:nil];
|
||||
layer.circleStrokeWidth = functionStyleValue;
|
||||
|
||||
mbgl::style::ExponentialStops<float> innerStops = { { {18, 0xff}}, 1.0 };
|
||||
std::map<float, mbgl::style::ExponentialStops<float>> compositeStops = { {10.0, innerStops} };
|
||||
std::map<float, float> innerStops { {18, 0xff} };
|
||||
mbgl::style::CompositeExponentialStops<float> compositeStops { { {10.0, innerStops} }, 1.0 };
|
||||
|
||||
propertyValue = mbgl::style::CompositeFunction<float> { "keyName", compositeStops };
|
||||
|
||||
|
||||
@@ -122,8 +122,8 @@
|
||||
functionStyleValue = [MGLStyleValue<MGLColor *> valueWithInterpolationMode:MGLInterpolationModeExponential compositeStops:@{@10: @{@18: constantStyleValue}} attributeName:@"keyName" options:nil];
|
||||
layer.fillColor = functionStyleValue;
|
||||
|
||||
mbgl::style::ExponentialStops<mbgl::Color> innerStops = { { {18, { 1, 0, 0, 1 }}}, 1.0 };
|
||||
std::map<float, mbgl::style::ExponentialStops<mbgl::Color>> compositeStops = { {10.0, innerStops} };
|
||||
std::map<float, mbgl::Color> innerStops { {18, { 1, 0, 0, 1 }} };
|
||||
mbgl::style::CompositeExponentialStops<mbgl::Color> compositeStops { { {10.0, innerStops} }, 1.0 };
|
||||
|
||||
propertyValue = mbgl::style::CompositeFunction<mbgl::Color> { "keyName", compositeStops };
|
||||
|
||||
@@ -179,8 +179,8 @@
|
||||
functionStyleValue = [MGLStyleValue<NSNumber *> valueWithInterpolationMode:MGLInterpolationModeExponential compositeStops:@{@10: @{@18: constantStyleValue}} attributeName:@"keyName" options:nil];
|
||||
layer.fillOpacity = functionStyleValue;
|
||||
|
||||
mbgl::style::ExponentialStops<float> innerStops = { { {18, 0xff}}, 1.0 };
|
||||
std::map<float, mbgl::style::ExponentialStops<float>> compositeStops = { {10.0, innerStops} };
|
||||
std::map<float, float> innerStops { {18, 0xff} };
|
||||
mbgl::style::CompositeExponentialStops<float> compositeStops { { {10.0, innerStops} }, 1.0 };
|
||||
|
||||
propertyValue = mbgl::style::CompositeFunction<float> { "keyName", compositeStops };
|
||||
|
||||
@@ -236,8 +236,8 @@
|
||||
functionStyleValue = [MGLStyleValue<MGLColor *> valueWithInterpolationMode:MGLInterpolationModeExponential compositeStops:@{@10: @{@18: constantStyleValue}} attributeName:@"keyName" options:nil];
|
||||
layer.fillOutlineColor = functionStyleValue;
|
||||
|
||||
mbgl::style::ExponentialStops<mbgl::Color> innerStops = { { {18, { 1, 0, 0, 1 }}}, 1.0 };
|
||||
std::map<float, mbgl::style::ExponentialStops<mbgl::Color>> compositeStops = { {10.0, innerStops} };
|
||||
std::map<float, mbgl::Color> innerStops { {18, { 1, 0, 0, 1 }} };
|
||||
mbgl::style::CompositeExponentialStops<mbgl::Color> compositeStops { { {10.0, innerStops} }, 1.0 };
|
||||
|
||||
propertyValue = mbgl::style::CompositeFunction<mbgl::Color> { "keyName", compositeStops };
|
||||
|
||||
|
||||
@@ -230,8 +230,8 @@
|
||||
functionStyleValue = [MGLStyleValue<NSNumber *> valueWithInterpolationMode:MGLInterpolationModeExponential compositeStops:@{@10: @{@18: constantStyleValue}} attributeName:@"keyName" options:nil];
|
||||
layer.lineBlur = functionStyleValue;
|
||||
|
||||
mbgl::style::ExponentialStops<float> innerStops = { { {18, 0xff}}, 1.0 };
|
||||
std::map<float, mbgl::style::ExponentialStops<float>> compositeStops = { {10.0, innerStops} };
|
||||
std::map<float, float> innerStops { {18, 0xff} };
|
||||
mbgl::style::CompositeExponentialStops<float> compositeStops { { {10.0, innerStops} }, 1.0 };
|
||||
|
||||
propertyValue = mbgl::style::CompositeFunction<float> { "keyName", compositeStops };
|
||||
|
||||
@@ -287,8 +287,8 @@
|
||||
functionStyleValue = [MGLStyleValue<MGLColor *> valueWithInterpolationMode:MGLInterpolationModeExponential compositeStops:@{@10: @{@18: constantStyleValue}} attributeName:@"keyName" options:nil];
|
||||
layer.lineColor = functionStyleValue;
|
||||
|
||||
mbgl::style::ExponentialStops<mbgl::Color> innerStops = { { {18, { 1, 0, 0, 1 }}}, 1.0 };
|
||||
std::map<float, mbgl::style::ExponentialStops<mbgl::Color>> compositeStops = { {10.0, innerStops} };
|
||||
std::map<float, mbgl::Color> innerStops { {18, { 1, 0, 0, 1 }} };
|
||||
mbgl::style::CompositeExponentialStops<mbgl::Color> compositeStops { { {10.0, innerStops} }, 1.0 };
|
||||
|
||||
propertyValue = mbgl::style::CompositeFunction<mbgl::Color> { "keyName", compositeStops };
|
||||
|
||||
@@ -384,8 +384,8 @@
|
||||
functionStyleValue = [MGLStyleValue<NSNumber *> valueWithInterpolationMode:MGLInterpolationModeExponential compositeStops:@{@10: @{@18: constantStyleValue}} attributeName:@"keyName" options:nil];
|
||||
layer.lineGapWidth = functionStyleValue;
|
||||
|
||||
mbgl::style::ExponentialStops<float> innerStops = { { {18, 0xff}}, 1.0 };
|
||||
std::map<float, mbgl::style::ExponentialStops<float>> compositeStops = { {10.0, innerStops} };
|
||||
std::map<float, float> innerStops { {18, 0xff} };
|
||||
mbgl::style::CompositeExponentialStops<float> compositeStops { { {10.0, innerStops} }, 1.0 };
|
||||
|
||||
propertyValue = mbgl::style::CompositeFunction<float> { "keyName", compositeStops };
|
||||
|
||||
@@ -441,8 +441,8 @@
|
||||
functionStyleValue = [MGLStyleValue<NSNumber *> valueWithInterpolationMode:MGLInterpolationModeExponential compositeStops:@{@10: @{@18: constantStyleValue}} attributeName:@"keyName" options:nil];
|
||||
layer.lineOffset = functionStyleValue;
|
||||
|
||||
mbgl::style::ExponentialStops<float> innerStops = { { {18, 0xff}}, 1.0 };
|
||||
std::map<float, mbgl::style::ExponentialStops<float>> compositeStops = { {10.0, innerStops} };
|
||||
std::map<float, float> innerStops { {18, 0xff} };
|
||||
mbgl::style::CompositeExponentialStops<float> compositeStops { { {10.0, innerStops} }, 1.0 };
|
||||
|
||||
propertyValue = mbgl::style::CompositeFunction<float> { "keyName", compositeStops };
|
||||
|
||||
@@ -498,8 +498,8 @@
|
||||
functionStyleValue = [MGLStyleValue<NSNumber *> valueWithInterpolationMode:MGLInterpolationModeExponential compositeStops:@{@10: @{@18: constantStyleValue}} attributeName:@"keyName" options:nil];
|
||||
layer.lineOpacity = functionStyleValue;
|
||||
|
||||
mbgl::style::ExponentialStops<float> innerStops = { { {18, 0xff}}, 1.0 };
|
||||
std::map<float, mbgl::style::ExponentialStops<float>> compositeStops = { {10.0, innerStops} };
|
||||
std::map<float, float> innerStops { {18, 0xff} };
|
||||
mbgl::style::CompositeExponentialStops<float> compositeStops { { {10.0, innerStops} }, 1.0 };
|
||||
|
||||
propertyValue = mbgl::style::CompositeFunction<float> { "keyName", compositeStops };
|
||||
|
||||
|
||||
@@ -99,8 +99,8 @@
|
||||
functionStyleValue = [MGLStyleValue<<%- propertyType(property) %>> valueWithInterpolationMode:MGLInterpolationModeExponential compositeStops:@{@10: @{@18: constantStyleValue}} attributeName:@"keyName" options:nil];
|
||||
layer.<%- objCName(property) %> = functionStyleValue;
|
||||
|
||||
mbgl::style::ExponentialStops<<%- mbglType(property) %>> innerStops = { { {18, <%- mbglTestValue(property, type) %>}}, 1.0 };
|
||||
std::map<float, mbgl::style::ExponentialStops<<%- mbglType(property) %>>> compositeStops = { {10.0, innerStops} };
|
||||
std::map<float, <%- mbglType(property) %>> innerStops { {18, <%- mbglTestValue(property, type) %>} };
|
||||
mbgl::style::CompositeExponentialStops<<%- mbglType(property) %>> compositeStops { { {10.0, innerStops} }, 1.0 };
|
||||
|
||||
propertyValue = mbgl::style::CompositeFunction<<%- mbglType(property) %>> { "keyName", compositeStops };
|
||||
|
||||
|
||||
@@ -208,8 +208,8 @@
|
||||
functionStyleValue = [MGLStyleValue<NSValue *> valueWithInterpolationMode:MGLInterpolationModeExponential compositeStops:@{@10: @{@18: constantStyleValue}} attributeName:@"keyName" options:nil];
|
||||
layer.iconOffset = functionStyleValue;
|
||||
|
||||
mbgl::style::ExponentialStops<std::array<float, 2>> innerStops = { { {18, { 1, 1 }}}, 1.0 };
|
||||
std::map<float, mbgl::style::ExponentialStops<std::array<float, 2>>> compositeStops = { {10.0, innerStops} };
|
||||
std::map<float, std::array<float, 2>> innerStops { {18, { 1, 1 }} };
|
||||
mbgl::style::CompositeExponentialStops<std::array<float, 2>> compositeStops { { {10.0, innerStops} }, 1.0 };
|
||||
|
||||
propertyValue = mbgl::style::CompositeFunction<std::array<float, 2>> { "keyName", compositeStops };
|
||||
|
||||
@@ -339,8 +339,8 @@
|
||||
functionStyleValue = [MGLStyleValue<NSNumber *> valueWithInterpolationMode:MGLInterpolationModeExponential compositeStops:@{@10: @{@18: constantStyleValue}} attributeName:@"keyName" options:nil];
|
||||
layer.iconRotation = functionStyleValue;
|
||||
|
||||
mbgl::style::ExponentialStops<float> innerStops = { { {18, 0xff}}, 1.0 };
|
||||
std::map<float, mbgl::style::ExponentialStops<float>> compositeStops = { {10.0, innerStops} };
|
||||
std::map<float, float> innerStops { {18, 0xff} };
|
||||
mbgl::style::CompositeExponentialStops<float> compositeStops { { {10.0, innerStops} }, 1.0 };
|
||||
|
||||
propertyValue = mbgl::style::CompositeFunction<float> { "keyName", compositeStops };
|
||||
|
||||
|
||||
Reference in New Issue
Block a user