summaryrefslogtreecommitdiff
path: root/platform/darwin/src/MGLCircleStyleLayer.mm
diff options
context:
space:
mode:
authorJohn Firebaugh <john.firebaugh@gmail.com>2016-12-08 13:14:52 -0800
committerJohn Firebaugh <john.firebaugh@gmail.com>2016-12-09 09:35:21 -0800
commit82856fd08b0b50902c72a56b5fe640447c94609e (patch)
tree8d1ecf2ae64db34cb295790fc122c8accb11d1ed /platform/darwin/src/MGLCircleStyleLayer.mm
parent3b2a4216a2e3929a557dbddd0d239758641c285f (diff)
downloadqtlocation-mapboxgl-82856fd08b0b50902c72a56b5fe640447c94609e.tar.gz
[darwin, android] SDK bindings for circle-stroke properties
Diffstat (limited to 'platform/darwin/src/MGLCircleStyleLayer.mm')
-rw-r--r--platform/darwin/src/MGLCircleStyleLayer.mm42
1 files changed, 42 insertions, 0 deletions
diff --git a/platform/darwin/src/MGLCircleStyleLayer.mm b/platform/darwin/src/MGLCircleStyleLayer.mm
index 91f91a7bcd..781682d4d1 100644
--- a/platform/darwin/src/MGLCircleStyleLayer.mm
+++ b/platform/darwin/src/MGLCircleStyleLayer.mm
@@ -187,6 +187,48 @@ namespace mbgl {
return MGLStyleValueTransformer<float, NSNumber *>().toStyleValue(propertyValue);
}
+- (void)setCircleStrokeColor:(MGLStyleValue<MGLColor *> *)circleStrokeColor {
+ MGLAssertStyleLayerIsValid();
+
+ auto mbglValue = MGLStyleValueTransformer<mbgl::Color, MGLColor *>().toPropertyValue(circleStrokeColor);
+ _rawLayer->setCircleStrokeColor(mbglValue);
+}
+
+- (MGLStyleValue<MGLColor *> *)circleStrokeColor {
+ MGLAssertStyleLayerIsValid();
+
+ auto propertyValue = _rawLayer->getCircleStrokeColor() ?: _rawLayer->getDefaultCircleStrokeColor();
+ return MGLStyleValueTransformer<mbgl::Color, MGLColor *>().toStyleValue(propertyValue);
+}
+
+- (void)setCircleStrokeOpacity:(MGLStyleValue<NSNumber *> *)circleStrokeOpacity {
+ MGLAssertStyleLayerIsValid();
+
+ auto mbglValue = MGLStyleValueTransformer<float, NSNumber *>().toPropertyValue(circleStrokeOpacity);
+ _rawLayer->setCircleStrokeOpacity(mbglValue);
+}
+
+- (MGLStyleValue<NSNumber *> *)circleStrokeOpacity {
+ MGLAssertStyleLayerIsValid();
+
+ auto propertyValue = _rawLayer->getCircleStrokeOpacity() ?: _rawLayer->getDefaultCircleStrokeOpacity();
+ return MGLStyleValueTransformer<float, NSNumber *>().toStyleValue(propertyValue);
+}
+
+- (void)setCircleStrokeWidth:(MGLStyleValue<NSNumber *> *)circleStrokeWidth {
+ MGLAssertStyleLayerIsValid();
+
+ auto mbglValue = MGLStyleValueTransformer<float, NSNumber *>().toPropertyValue(circleStrokeWidth);
+ _rawLayer->setCircleStrokeWidth(mbglValue);
+}
+
+- (MGLStyleValue<NSNumber *> *)circleStrokeWidth {
+ MGLAssertStyleLayerIsValid();
+
+ auto propertyValue = _rawLayer->getCircleStrokeWidth() ?: _rawLayer->getDefaultCircleStrokeWidth();
+ return MGLStyleValueTransformer<float, NSNumber *>().toStyleValue(propertyValue);
+}
+
- (void)setCircleTranslate:(MGLStyleValue<NSValue *> *)circleTranslate {
MGLAssertStyleLayerIsValid();