summaryrefslogtreecommitdiff
path: root/platform/darwin/src/MGLSymbolStyleLayer.mm
diff options
context:
space:
mode:
Diffstat (limited to 'platform/darwin/src/MGLSymbolStyleLayer.mm')
-rw-r--r--platform/darwin/src/MGLSymbolStyleLayer.mm495
1 files changed, 314 insertions, 181 deletions
diff --git a/platform/darwin/src/MGLSymbolStyleLayer.mm b/platform/darwin/src/MGLSymbolStyleLayer.mm
index d1d66f8ffb..31c584b473 100644
--- a/platform/darwin/src/MGLSymbolStyleLayer.mm
+++ b/platform/darwin/src/MGLSymbolStyleLayer.mm
@@ -41,10 +41,10 @@ namespace mbgl {
{ MGLTextAnchorBottomRight, "bottom-right" },
});
- MBGL_DEFINE_ENUM(MGLTextJustify, {
- { MGLTextJustifyLeft, "left" },
- { MGLTextJustifyCenter, "center" },
- { MGLTextJustifyRight, "right" },
+ MBGL_DEFINE_ENUM(MGLTextJustification, {
+ { MGLTextJustificationLeft, "left" },
+ { MGLTextJustificationCenter, "center" },
+ { MGLTextJustificationRight, "right" },
});
MBGL_DEFINE_ENUM(MGLTextPitchAlignment, {
@@ -93,15 +93,26 @@ namespace mbgl {
if (self = [super initWithIdentifier:identifier source:source]) {
auto layer = std::make_unique<mbgl::style::SymbolLayer>(identifier.UTF8String, source.identifier.UTF8String);
_pendingLayer = std::move(layer);
- _rawLayer = _pendingLayer.get();
+ self.rawLayer = _pendingLayer.get();
}
return self;
}
+
+- (mbgl::style::SymbolLayer *)rawLayer
+{
+ return (mbgl::style::SymbolLayer *)super.rawLayer;
+}
+
+- (void)setRawLayer:(mbgl::style::SymbolLayer *)rawLayer
+{
+ super.rawLayer = rawLayer;
+}
+
- (NSString *)sourceLayerIdentifier
{
MGLAssertStyleLayerIsValid();
- auto layerID = _rawLayer->getSourceLayer();
+ auto layerID = self.rawLayer->getSourceLayer();
return layerID.empty() ? nil : @(layerID.c_str());
}
@@ -109,25 +120,26 @@ namespace mbgl {
{
MGLAssertStyleLayerIsValid();
- _rawLayer->setSourceLayer(sourceLayerIdentifier.UTF8String ?: "");
+ self.rawLayer->setSourceLayer(sourceLayerIdentifier.UTF8String ?: "");
}
- (void)setPredicate:(NSPredicate *)predicate
{
MGLAssertStyleLayerIsValid();
- _rawLayer->setFilter(predicate.mgl_filter);
+ self.rawLayer->setFilter(predicate.mgl_filter);
}
- (NSPredicate *)predicate
{
MGLAssertStyleLayerIsValid();
- return [NSPredicate mgl_predicateWithFilter:_rawLayer->getFilter()];
+ return [NSPredicate mgl_predicateWithFilter:self.rawLayer->getFilter()];
}
-#pragma mark - Adding to and removing from a map view
-- (void)addToMapView:(MGLMapView *)mapView
+#pragma mark - Adding to and removing from a map view
+
+- (void)addToMapView:(MGLMapView *)mapView belowLayer:(MGLStyleLayer *)otherLayer
{
if (_pendingLayer == nullptr) {
[NSException raise:@"MGLRedundantLayerException"
@@ -135,11 +147,6 @@ namespace mbgl {
"to the style more than once is invalid.", self, mapView.style];
}
- [self addToMapView:mapView belowLayer:nil];
-}
-
-- (void)addToMapView:(MGLMapView *)mapView belowLayer:(MGLStyleLayer *)otherLayer
-{
if (otherLayer) {
const mbgl::optional<std::string> belowLayerId{otherLayer.identifier.UTF8String};
mapView.mbglMap->addLayer(std::move(_pendingLayer), belowLayerId);
@@ -151,7 +158,7 @@ namespace mbgl {
- (void)removeFromMapView:(MGLMapView *)mapView
{
_pendingLayer = nullptr;
- _rawLayer = nullptr;
+ self.rawLayer = nullptr;
auto removedLayer = mapView.mbglMap->removeLayer(self.identifier.UTF8String);
if (!removedLayer) {
@@ -166,78 +173,91 @@ namespace mbgl {
removedLayer.release();
_pendingLayer = std::unique_ptr<mbgl::style::SymbolLayer>(layer);
- _rawLayer = _pendingLayer.get();
+ self.rawLayer = _pendingLayer.get();
}
#pragma mark - Accessing the Layout Attributes
-- (void)setIconAllowOverlap:(MGLStyleValue<NSNumber *> *)iconAllowOverlap {
+- (void)setIconAllowsOverlap:(MGLStyleValue<NSNumber *> *)iconAllowsOverlap {
MGLAssertStyleLayerIsValid();
- auto mbglValue = MGLStyleValueTransformer<bool, NSNumber *>().toPropertyValue(iconAllowOverlap);
- _rawLayer->setIconAllowOverlap(mbglValue);
+ auto mbglValue = MGLStyleValueTransformer<bool, NSNumber *>().toPropertyValue(iconAllowsOverlap);
+ self.rawLayer->setIconAllowOverlap(mbglValue);
}
-- (MGLStyleValue<NSNumber *> *)iconAllowOverlap {
+- (MGLStyleValue<NSNumber *> *)iconAllowsOverlap {
MGLAssertStyleLayerIsValid();
- auto propertyValue = _rawLayer->getIconAllowOverlap() ?: _rawLayer->getDefaultIconAllowOverlap();
+ auto propertyValue = self.rawLayer->getIconAllowOverlap() ?: self.rawLayer->getDefaultIconAllowOverlap();
return MGLStyleValueTransformer<bool, NSNumber *>().toStyleValue(propertyValue);
}
-- (void)setIconIgnorePlacement:(MGLStyleValue<NSNumber *> *)iconIgnorePlacement {
+
+- (void)setIconAllowOverlap:(MGLStyleValue<NSNumber *> *)iconAllowOverlap {
+ self.iconAllowsOverlap = iconAllowOverlap;
+}
+
+- (MGLStyleValue<NSNumber *> *)iconAllowOverlap {
+ return self.iconAllowsOverlap;
+}
+
+- (void)setIconIgnoresPlacement:(MGLStyleValue<NSNumber *> *)iconIgnoresPlacement {
MGLAssertStyleLayerIsValid();
- auto mbglValue = MGLStyleValueTransformer<bool, NSNumber *>().toPropertyValue(iconIgnorePlacement);
- _rawLayer->setIconIgnorePlacement(mbglValue);
+ auto mbglValue = MGLStyleValueTransformer<bool, NSNumber *>().toPropertyValue(iconIgnoresPlacement);
+ self.rawLayer->setIconIgnorePlacement(mbglValue);
}
-- (MGLStyleValue<NSNumber *> *)iconIgnorePlacement {
+- (MGLStyleValue<NSNumber *> *)iconIgnoresPlacement {
MGLAssertStyleLayerIsValid();
- auto propertyValue = _rawLayer->getIconIgnorePlacement() ?: _rawLayer->getDefaultIconIgnorePlacement();
+ auto propertyValue = self.rawLayer->getIconIgnorePlacement() ?: self.rawLayer->getDefaultIconIgnorePlacement();
return MGLStyleValueTransformer<bool, NSNumber *>().toStyleValue(propertyValue);
}
+
+- (void)setIconIgnorePlacement:(MGLStyleValue<NSNumber *> *)iconIgnorePlacement {
+ self.iconIgnoresPlacement = iconIgnorePlacement;
+}
+
+- (MGLStyleValue<NSNumber *> *)iconIgnorePlacement {
+ return self.iconIgnoresPlacement;
+}
+
- (void)setIconImageName:(MGLStyleValue<NSString *> *)iconImageName {
MGLAssertStyleLayerIsValid();
auto mbglValue = MGLStyleValueTransformer<std::string, NSString *>().toPropertyValue(iconImageName);
- _rawLayer->setIconImage(mbglValue);
+ self.rawLayer->setIconImage(mbglValue);
}
- (MGLStyleValue<NSString *> *)iconImageName {
MGLAssertStyleLayerIsValid();
- auto propertyValue = _rawLayer->getIconImage() ?: _rawLayer->getDefaultIconImage();
+ auto propertyValue = self.rawLayer->getIconImage() ?: self.rawLayer->getDefaultIconImage();
return MGLStyleValueTransformer<std::string, NSString *>().toStyleValue(propertyValue);
}
-- (void)setIconKeepUpright:(MGLStyleValue<NSNumber *> *)iconKeepUpright {
- MGLAssertStyleLayerIsValid();
- auto mbglValue = MGLStyleValueTransformer<bool, NSNumber *>().toPropertyValue(iconKeepUpright);
- _rawLayer->setIconKeepUpright(mbglValue);
+- (void)setIconImage:(MGLStyleValue<NSString *> *)iconImage {
+ self.iconImageName = iconImage;
}
-- (MGLStyleValue<NSNumber *> *)iconKeepUpright {
- MGLAssertStyleLayerIsValid();
-
- auto propertyValue = _rawLayer->getIconKeepUpright() ?: _rawLayer->getDefaultIconKeepUpright();
- return MGLStyleValueTransformer<bool, NSNumber *>().toStyleValue(propertyValue);
+- (MGLStyleValue<NSString *> *)iconImage {
+ return self.iconImageName;
}
- (void)setIconOffset:(MGLStyleValue<NSValue *> *)iconOffset {
MGLAssertStyleLayerIsValid();
auto mbglValue = MGLStyleValueTransformer<std::array<float, 2>, NSValue *>().toPropertyValue(iconOffset);
- _rawLayer->setIconOffset(mbglValue);
+ self.rawLayer->setIconOffset(mbglValue);
}
- (MGLStyleValue<NSValue *> *)iconOffset {
MGLAssertStyleLayerIsValid();
- auto propertyValue = _rawLayer->getIconOffset() ?: _rawLayer->getDefaultIconOffset();
+ auto propertyValue = self.rawLayer->getIconOffset() ?: self.rawLayer->getDefaultIconOffset();
return MGLStyleValueTransformer<std::array<float, 2>, NSValue *>().toStyleValue(propertyValue);
}
@@ -245,13 +265,13 @@ namespace mbgl {
MGLAssertStyleLayerIsValid();
auto mbglValue = MGLStyleValueTransformer<bool, NSNumber *>().toPropertyValue(iconOptional);
- _rawLayer->setIconOptional(mbglValue);
+ self.rawLayer->setIconOptional(mbglValue);
}
-- (MGLStyleValue<NSNumber *> *)iconOptional {
+- (MGLStyleValue<NSNumber *> *)isIconOptional {
MGLAssertStyleLayerIsValid();
- auto propertyValue = _rawLayer->getIconOptional() ?: _rawLayer->getDefaultIconOptional();
+ auto propertyValue = self.rawLayer->getIconOptional() ?: self.rawLayer->getDefaultIconOptional();
return MGLStyleValueTransformer<bool, NSNumber *>().toStyleValue(propertyValue);
}
@@ -259,69 +279,87 @@ namespace mbgl {
MGLAssertStyleLayerIsValid();
auto mbglValue = MGLStyleValueTransformer<float, NSNumber *>().toPropertyValue(iconPadding);
- _rawLayer->setIconPadding(mbglValue);
+ self.rawLayer->setIconPadding(mbglValue);
}
- (MGLStyleValue<NSNumber *> *)iconPadding {
MGLAssertStyleLayerIsValid();
- auto propertyValue = _rawLayer->getIconPadding() ?: _rawLayer->getDefaultIconPadding();
+ auto propertyValue = self.rawLayer->getIconPadding() ?: self.rawLayer->getDefaultIconPadding();
return MGLStyleValueTransformer<float, NSNumber *>().toStyleValue(propertyValue);
}
-- (void)setIconRotate:(MGLStyleValue<NSNumber *> *)iconRotate {
+- (void)setIconRotation:(MGLStyleValue<NSNumber *> *)iconRotation {
MGLAssertStyleLayerIsValid();
- auto mbglValue = MGLStyleValueTransformer<float, NSNumber *>().toPropertyValue(iconRotate);
- _rawLayer->setIconRotate(mbglValue);
+ auto mbglValue = MGLStyleValueTransformer<float, NSNumber *>().toPropertyValue(iconRotation);
+ self.rawLayer->setIconRotate(mbglValue);
}
-- (MGLStyleValue<NSNumber *> *)iconRotate {
+- (MGLStyleValue<NSNumber *> *)iconRotation {
MGLAssertStyleLayerIsValid();
- auto propertyValue = _rawLayer->getIconRotate() ?: _rawLayer->getDefaultIconRotate();
+ auto propertyValue = self.rawLayer->getIconRotate() ?: self.rawLayer->getDefaultIconRotate();
return MGLStyleValueTransformer<float, NSNumber *>().toStyleValue(propertyValue);
}
+
+- (void)setIconRotate:(MGLStyleValue<NSNumber *> *)iconRotate {
+ self.iconRotation = iconRotate;
+}
+
+- (MGLStyleValue<NSNumber *> *)iconRotate {
+ return self.iconRotation;
+}
+
- (void)setIconRotationAlignment:(MGLStyleValue<NSValue *> *)iconRotationAlignment {
MGLAssertStyleLayerIsValid();
auto mbglValue = MGLStyleValueTransformer<mbgl::style::AlignmentType, NSValue *, mbgl::style::AlignmentType, MGLIconRotationAlignment>().toEnumPropertyValue(iconRotationAlignment);
- _rawLayer->setIconRotationAlignment(mbglValue);
+ self.rawLayer->setIconRotationAlignment(mbglValue);
}
- (MGLStyleValue<NSValue *> *)iconRotationAlignment {
MGLAssertStyleLayerIsValid();
- auto propertyValue = _rawLayer->getIconRotationAlignment() ?: _rawLayer->getDefaultIconRotationAlignment();
+ auto propertyValue = self.rawLayer->getIconRotationAlignment() ?: self.rawLayer->getDefaultIconRotationAlignment();
return MGLStyleValueTransformer<mbgl::style::AlignmentType, NSValue *, mbgl::style::AlignmentType, MGLIconRotationAlignment>().toEnumStyleValue(propertyValue);
}
-- (void)setIconSize:(MGLStyleValue<NSNumber *> *)iconSize {
+- (void)setIconScale:(MGLStyleValue<NSNumber *> *)iconScale {
MGLAssertStyleLayerIsValid();
- auto mbglValue = MGLStyleValueTransformer<float, NSNumber *>().toPropertyValue(iconSize);
- _rawLayer->setIconSize(mbglValue);
+ auto mbglValue = MGLStyleValueTransformer<float, NSNumber *>().toPropertyValue(iconScale);
+ self.rawLayer->setIconSize(mbglValue);
}
-- (MGLStyleValue<NSNumber *> *)iconSize {
+- (MGLStyleValue<NSNumber *> *)iconScale {
MGLAssertStyleLayerIsValid();
- auto propertyValue = _rawLayer->getIconSize() ?: _rawLayer->getDefaultIconSize();
+ auto propertyValue = self.rawLayer->getIconSize() ?: self.rawLayer->getDefaultIconSize();
return MGLStyleValueTransformer<float, NSNumber *>().toStyleValue(propertyValue);
}
+
+- (void)setIconSize:(MGLStyleValue<NSNumber *> *)iconSize {
+ self.iconScale = iconSize;
+}
+
+- (MGLStyleValue<NSNumber *> *)iconSize {
+ return self.iconScale;
+}
+
- (void)setIconTextFit:(MGLStyleValue<NSValue *> *)iconTextFit {
MGLAssertStyleLayerIsValid();
auto mbglValue = MGLStyleValueTransformer<mbgl::style::IconTextFitType, NSValue *, mbgl::style::IconTextFitType, MGLIconTextFit>().toEnumPropertyValue(iconTextFit);
- _rawLayer->setIconTextFit(mbglValue);
+ self.rawLayer->setIconTextFit(mbglValue);
}
- (MGLStyleValue<NSValue *> *)iconTextFit {
MGLAssertStyleLayerIsValid();
- auto propertyValue = _rawLayer->getIconTextFit() ?: _rawLayer->getDefaultIconTextFit();
+ auto propertyValue = self.rawLayer->getIconTextFit() ?: self.rawLayer->getDefaultIconTextFit();
return MGLStyleValueTransformer<mbgl::style::IconTextFitType, NSValue *, mbgl::style::IconTextFitType, MGLIconTextFit>().toEnumStyleValue(propertyValue);
}
@@ -329,41 +367,142 @@ namespace mbgl {
MGLAssertStyleLayerIsValid();
auto mbglValue = MGLStyleValueTransformer<std::array<float, 4>, NSValue *>().toPropertyValue(iconTextFitPadding);
- _rawLayer->setIconTextFitPadding(mbglValue);
+ self.rawLayer->setIconTextFitPadding(mbglValue);
}
- (MGLStyleValue<NSValue *> *)iconTextFitPadding {
MGLAssertStyleLayerIsValid();
- auto propertyValue = _rawLayer->getIconTextFitPadding() ?: _rawLayer->getDefaultIconTextFitPadding();
+ auto propertyValue = self.rawLayer->getIconTextFitPadding() ?: self.rawLayer->getDefaultIconTextFitPadding();
return MGLStyleValueTransformer<std::array<float, 4>, NSValue *>().toStyleValue(propertyValue);
}
-- (void)setSymbolAvoidEdges:(MGLStyleValue<NSNumber *> *)symbolAvoidEdges {
+- (void)setKeepsIconUpright:(MGLStyleValue<NSNumber *> *)keepsIconUpright {
MGLAssertStyleLayerIsValid();
- auto mbglValue = MGLStyleValueTransformer<bool, NSNumber *>().toPropertyValue(symbolAvoidEdges);
- _rawLayer->setSymbolAvoidEdges(mbglValue);
+ auto mbglValue = MGLStyleValueTransformer<bool, NSNumber *>().toPropertyValue(keepsIconUpright);
+ self.rawLayer->setIconKeepUpright(mbglValue);
}
-- (MGLStyleValue<NSNumber *> *)symbolAvoidEdges {
+- (MGLStyleValue<NSNumber *> *)keepsIconUpright {
+ MGLAssertStyleLayerIsValid();
+
+ auto propertyValue = self.rawLayer->getIconKeepUpright() ?: self.rawLayer->getDefaultIconKeepUpright();
+ return MGLStyleValueTransformer<bool, NSNumber *>().toStyleValue(propertyValue);
+}
+
+
+- (void)setIconKeepUpright:(MGLStyleValue<NSNumber *> *)iconKeepUpright {
+ self.keepsIconUpright = iconKeepUpright;
+}
+
+- (MGLStyleValue<NSNumber *> *)iconKeepUpright {
+ return self.keepsIconUpright;
+}
+
+- (void)setKeepsTextUpright:(MGLStyleValue<NSNumber *> *)keepsTextUpright {
+ MGLAssertStyleLayerIsValid();
+
+ auto mbglValue = MGLStyleValueTransformer<bool, NSNumber *>().toPropertyValue(keepsTextUpright);
+ self.rawLayer->setTextKeepUpright(mbglValue);
+}
+
+- (MGLStyleValue<NSNumber *> *)keepsTextUpright {
MGLAssertStyleLayerIsValid();
- auto propertyValue = _rawLayer->getSymbolAvoidEdges() ?: _rawLayer->getDefaultSymbolAvoidEdges();
+ auto propertyValue = self.rawLayer->getTextKeepUpright() ?: self.rawLayer->getDefaultTextKeepUpright();
return MGLStyleValueTransformer<bool, NSNumber *>().toStyleValue(propertyValue);
}
+
+- (void)setTextKeepUpright:(MGLStyleValue<NSNumber *> *)textKeepUpright {
+ self.keepsTextUpright = textKeepUpright;
+}
+
+- (MGLStyleValue<NSNumber *> *)textKeepUpright {
+ return self.keepsTextUpright;
+}
+
+- (void)setMaximumTextAngle:(MGLStyleValue<NSNumber *> *)maximumTextAngle {
+ MGLAssertStyleLayerIsValid();
+
+ auto mbglValue = MGLStyleValueTransformer<float, NSNumber *>().toPropertyValue(maximumTextAngle);
+ self.rawLayer->setTextMaxAngle(mbglValue);
+}
+
+- (MGLStyleValue<NSNumber *> *)maximumTextAngle {
+ MGLAssertStyleLayerIsValid();
+
+ auto propertyValue = self.rawLayer->getTextMaxAngle() ?: self.rawLayer->getDefaultTextMaxAngle();
+ return MGLStyleValueTransformer<float, NSNumber *>().toStyleValue(propertyValue);
+}
+
+
+- (void)setTextMaxAngle:(MGLStyleValue<NSNumber *> *)textMaxAngle {
+ self.maximumTextAngle = textMaxAngle;
+}
+
+- (MGLStyleValue<NSNumber *> *)textMaxAngle {
+ return self.maximumTextAngle;
+}
+
+- (void)setMaximumTextWidth:(MGLStyleValue<NSNumber *> *)maximumTextWidth {
+ MGLAssertStyleLayerIsValid();
+
+ auto mbglValue = MGLStyleValueTransformer<float, NSNumber *>().toPropertyValue(maximumTextWidth);
+ self.rawLayer->setTextMaxWidth(mbglValue);
+}
+
+- (MGLStyleValue<NSNumber *> *)maximumTextWidth {
+ MGLAssertStyleLayerIsValid();
+
+ auto propertyValue = self.rawLayer->getTextMaxWidth() ?: self.rawLayer->getDefaultTextMaxWidth();
+ return MGLStyleValueTransformer<float, NSNumber *>().toStyleValue(propertyValue);
+}
+
+
+- (void)setTextMaxWidth:(MGLStyleValue<NSNumber *> *)textMaxWidth {
+ self.maximumTextWidth = textMaxWidth;
+}
+
+- (MGLStyleValue<NSNumber *> *)textMaxWidth {
+ return self.maximumTextWidth;
+}
+
+- (void)setSymbolAvoidsEdges:(MGLStyleValue<NSNumber *> *)symbolAvoidsEdges {
+ MGLAssertStyleLayerIsValid();
+
+ auto mbglValue = MGLStyleValueTransformer<bool, NSNumber *>().toPropertyValue(symbolAvoidsEdges);
+ self.rawLayer->setSymbolAvoidEdges(mbglValue);
+}
+
+- (MGLStyleValue<NSNumber *> *)symbolAvoidsEdges {
+ MGLAssertStyleLayerIsValid();
+
+ auto propertyValue = self.rawLayer->getSymbolAvoidEdges() ?: self.rawLayer->getDefaultSymbolAvoidEdges();
+ return MGLStyleValueTransformer<bool, NSNumber *>().toStyleValue(propertyValue);
+}
+
+
+- (void)setSymbolAvoidEdges:(MGLStyleValue<NSNumber *> *)symbolAvoidEdges {
+ self.symbolAvoidsEdges = symbolAvoidEdges;
+}
+
+- (MGLStyleValue<NSNumber *> *)symbolAvoidEdges {
+ return self.symbolAvoidsEdges;
+}
+
- (void)setSymbolPlacement:(MGLStyleValue<NSValue *> *)symbolPlacement {
MGLAssertStyleLayerIsValid();
auto mbglValue = MGLStyleValueTransformer<mbgl::style::SymbolPlacementType, NSValue *, mbgl::style::SymbolPlacementType, MGLSymbolPlacement>().toEnumPropertyValue(symbolPlacement);
- _rawLayer->setSymbolPlacement(mbglValue);
+ self.rawLayer->setSymbolPlacement(mbglValue);
}
- (MGLStyleValue<NSValue *> *)symbolPlacement {
MGLAssertStyleLayerIsValid();
- auto propertyValue = _rawLayer->getSymbolPlacement() ?: _rawLayer->getDefaultSymbolPlacement();
+ auto propertyValue = self.rawLayer->getSymbolPlacement() ?: self.rawLayer->getDefaultSymbolPlacement();
return MGLStyleValueTransformer<mbgl::style::SymbolPlacementType, NSValue *, mbgl::style::SymbolPlacementType, MGLSymbolPlacement>().toEnumStyleValue(propertyValue);
}
@@ -371,41 +510,50 @@ namespace mbgl {
MGLAssertStyleLayerIsValid();
auto mbglValue = MGLStyleValueTransformer<float, NSNumber *>().toPropertyValue(symbolSpacing);
- _rawLayer->setSymbolSpacing(mbglValue);
+ self.rawLayer->setSymbolSpacing(mbglValue);
}
- (MGLStyleValue<NSNumber *> *)symbolSpacing {
MGLAssertStyleLayerIsValid();
- auto propertyValue = _rawLayer->getSymbolSpacing() ?: _rawLayer->getDefaultSymbolSpacing();
+ auto propertyValue = self.rawLayer->getSymbolSpacing() ?: self.rawLayer->getDefaultSymbolSpacing();
return MGLStyleValueTransformer<float, NSNumber *>().toStyleValue(propertyValue);
}
-- (void)setTextAllowOverlap:(MGLStyleValue<NSNumber *> *)textAllowOverlap {
+- (void)setTextAllowsOverlap:(MGLStyleValue<NSNumber *> *)textAllowsOverlap {
MGLAssertStyleLayerIsValid();
- auto mbglValue = MGLStyleValueTransformer<bool, NSNumber *>().toPropertyValue(textAllowOverlap);
- _rawLayer->setTextAllowOverlap(mbglValue);
+ auto mbglValue = MGLStyleValueTransformer<bool, NSNumber *>().toPropertyValue(textAllowsOverlap);
+ self.rawLayer->setTextAllowOverlap(mbglValue);
}
-- (MGLStyleValue<NSNumber *> *)textAllowOverlap {
+- (MGLStyleValue<NSNumber *> *)textAllowsOverlap {
MGLAssertStyleLayerIsValid();
- auto propertyValue = _rawLayer->getTextAllowOverlap() ?: _rawLayer->getDefaultTextAllowOverlap();
+ auto propertyValue = self.rawLayer->getTextAllowOverlap() ?: self.rawLayer->getDefaultTextAllowOverlap();
return MGLStyleValueTransformer<bool, NSNumber *>().toStyleValue(propertyValue);
}
+
+- (void)setTextAllowOverlap:(MGLStyleValue<NSNumber *> *)textAllowOverlap {
+ self.textAllowsOverlap = textAllowOverlap;
+}
+
+- (MGLStyleValue<NSNumber *> *)textAllowOverlap {
+ return self.textAllowsOverlap;
+}
+
- (void)setTextAnchor:(MGLStyleValue<NSValue *> *)textAnchor {
MGLAssertStyleLayerIsValid();
auto mbglValue = MGLStyleValueTransformer<mbgl::style::TextAnchorType, NSValue *, mbgl::style::TextAnchorType, MGLTextAnchor>().toEnumPropertyValue(textAnchor);
- _rawLayer->setTextAnchor(mbglValue);
+ self.rawLayer->setTextAnchor(mbglValue);
}
- (MGLStyleValue<NSValue *> *)textAnchor {
MGLAssertStyleLayerIsValid();
- auto propertyValue = _rawLayer->getTextAnchor() ?: _rawLayer->getDefaultTextAnchor();
+ auto propertyValue = self.rawLayer->getTextAnchor() ?: self.rawLayer->getDefaultTextAnchor();
return MGLStyleValueTransformer<mbgl::style::TextAnchorType, NSValue *, mbgl::style::TextAnchorType, MGLTextAnchor>().toEnumStyleValue(propertyValue);
}
@@ -413,13 +561,13 @@ namespace mbgl {
MGLAssertStyleLayerIsValid();
auto mbglValue = MGLStyleValueTransformer<std::string, NSString *>().toPropertyValue(textField);
- _rawLayer->setTextField(mbglValue);
+ self.rawLayer->setTextField(mbglValue);
}
- (MGLStyleValue<NSString *> *)textField {
MGLAssertStyleLayerIsValid();
- auto propertyValue = _rawLayer->getTextField() ?: _rawLayer->getDefaultTextField();
+ auto propertyValue = self.rawLayer->getTextField() ?: self.rawLayer->getDefaultTextField();
return MGLStyleValueTransformer<std::string, NSString *>().toStyleValue(propertyValue);
}
@@ -427,69 +575,73 @@ namespace mbgl {
MGLAssertStyleLayerIsValid();
auto mbglValue = MGLStyleValueTransformer<std::vector<std::string>, NSArray<NSString *> *, std::string>().toPropertyValue(textFont);
- _rawLayer->setTextFont(mbglValue);
+ self.rawLayer->setTextFont(mbglValue);
}
- (MGLStyleValue<NSArray<NSString *> *> *)textFont {
MGLAssertStyleLayerIsValid();
- auto propertyValue = _rawLayer->getTextFont() ?: _rawLayer->getDefaultTextFont();
+ auto propertyValue = self.rawLayer->getTextFont() ?: self.rawLayer->getDefaultTextFont();
return MGLStyleValueTransformer<std::vector<std::string>, NSArray<NSString *> *, std::string>().toStyleValue(propertyValue);
}
-- (void)setTextIgnorePlacement:(MGLStyleValue<NSNumber *> *)textIgnorePlacement {
+- (void)setTextIgnoresPlacement:(MGLStyleValue<NSNumber *> *)textIgnoresPlacement {
MGLAssertStyleLayerIsValid();
- auto mbglValue = MGLStyleValueTransformer<bool, NSNumber *>().toPropertyValue(textIgnorePlacement);
- _rawLayer->setTextIgnorePlacement(mbglValue);
+ auto mbglValue = MGLStyleValueTransformer<bool, NSNumber *>().toPropertyValue(textIgnoresPlacement);
+ self.rawLayer->setTextIgnorePlacement(mbglValue);
}
-- (MGLStyleValue<NSNumber *> *)textIgnorePlacement {
+- (MGLStyleValue<NSNumber *> *)textIgnoresPlacement {
MGLAssertStyleLayerIsValid();
- auto propertyValue = _rawLayer->getTextIgnorePlacement() ?: _rawLayer->getDefaultTextIgnorePlacement();
+ auto propertyValue = self.rawLayer->getTextIgnorePlacement() ?: self.rawLayer->getDefaultTextIgnorePlacement();
return MGLStyleValueTransformer<bool, NSNumber *>().toStyleValue(propertyValue);
}
-- (void)setTextJustify:(MGLStyleValue<NSValue *> *)textJustify {
- MGLAssertStyleLayerIsValid();
- auto mbglValue = MGLStyleValueTransformer<mbgl::style::TextJustifyType, NSValue *, mbgl::style::TextJustifyType, MGLTextJustify>().toEnumPropertyValue(textJustify);
- _rawLayer->setTextJustify(mbglValue);
+- (void)setTextIgnorePlacement:(MGLStyleValue<NSNumber *> *)textIgnorePlacement {
+ self.textIgnoresPlacement = textIgnorePlacement;
}
-- (MGLStyleValue<NSValue *> *)textJustify {
+- (MGLStyleValue<NSNumber *> *)textIgnorePlacement {
+ return self.textIgnoresPlacement;
+}
+
+- (void)setTextJustification:(MGLStyleValue<NSValue *> *)textJustification {
MGLAssertStyleLayerIsValid();
- auto propertyValue = _rawLayer->getTextJustify() ?: _rawLayer->getDefaultTextJustify();
- return MGLStyleValueTransformer<mbgl::style::TextJustifyType, NSValue *, mbgl::style::TextJustifyType, MGLTextJustify>().toEnumStyleValue(propertyValue);
+ auto mbglValue = MGLStyleValueTransformer<mbgl::style::TextJustifyType, NSValue *, mbgl::style::TextJustifyType, MGLTextJustification>().toEnumPropertyValue(textJustification);
+ self.rawLayer->setTextJustify(mbglValue);
}
-- (void)setTextKeepUpright:(MGLStyleValue<NSNumber *> *)textKeepUpright {
+- (MGLStyleValue<NSValue *> *)textJustification {
MGLAssertStyleLayerIsValid();
- auto mbglValue = MGLStyleValueTransformer<bool, NSNumber *>().toPropertyValue(textKeepUpright);
- _rawLayer->setTextKeepUpright(mbglValue);
+ auto propertyValue = self.rawLayer->getTextJustify() ?: self.rawLayer->getDefaultTextJustify();
+ return MGLStyleValueTransformer<mbgl::style::TextJustifyType, NSValue *, mbgl::style::TextJustifyType, MGLTextJustification>().toEnumStyleValue(propertyValue);
}
-- (MGLStyleValue<NSNumber *> *)textKeepUpright {
- MGLAssertStyleLayerIsValid();
- auto propertyValue = _rawLayer->getTextKeepUpright() ?: _rawLayer->getDefaultTextKeepUpright();
- return MGLStyleValueTransformer<bool, NSNumber *>().toStyleValue(propertyValue);
+- (void)setTextJustify:(MGLStyleValue<NSValue *> *)textJustify {
+ self.textJustification = textJustify;
+}
+
+- (MGLStyleValue<NSValue *> *)textJustify {
+ return self.textJustification;
}
- (void)setTextLetterSpacing:(MGLStyleValue<NSNumber *> *)textLetterSpacing {
MGLAssertStyleLayerIsValid();
auto mbglValue = MGLStyleValueTransformer<float, NSNumber *>().toPropertyValue(textLetterSpacing);
- _rawLayer->setTextLetterSpacing(mbglValue);
+ self.rawLayer->setTextLetterSpacing(mbglValue);
}
- (MGLStyleValue<NSNumber *> *)textLetterSpacing {
MGLAssertStyleLayerIsValid();
- auto propertyValue = _rawLayer->getTextLetterSpacing() ?: _rawLayer->getDefaultTextLetterSpacing();
+ auto propertyValue = self.rawLayer->getTextLetterSpacing() ?: self.rawLayer->getDefaultTextLetterSpacing();
return MGLStyleValueTransformer<float, NSNumber *>().toStyleValue(propertyValue);
}
@@ -497,41 +649,13 @@ namespace mbgl {
MGLAssertStyleLayerIsValid();
auto mbglValue = MGLStyleValueTransformer<float, NSNumber *>().toPropertyValue(textLineHeight);
- _rawLayer->setTextLineHeight(mbglValue);
+ self.rawLayer->setTextLineHeight(mbglValue);
}
- (MGLStyleValue<NSNumber *> *)textLineHeight {
MGLAssertStyleLayerIsValid();
- auto propertyValue = _rawLayer->getTextLineHeight() ?: _rawLayer->getDefaultTextLineHeight();
- return MGLStyleValueTransformer<float, NSNumber *>().toStyleValue(propertyValue);
-}
-
-- (void)setTextMaxAngle:(MGLStyleValue<NSNumber *> *)textMaxAngle {
- MGLAssertStyleLayerIsValid();
-
- auto mbglValue = MGLStyleValueTransformer<float, NSNumber *>().toPropertyValue(textMaxAngle);
- _rawLayer->setTextMaxAngle(mbglValue);
-}
-
-- (MGLStyleValue<NSNumber *> *)textMaxAngle {
- MGLAssertStyleLayerIsValid();
-
- auto propertyValue = _rawLayer->getTextMaxAngle() ?: _rawLayer->getDefaultTextMaxAngle();
- return MGLStyleValueTransformer<float, NSNumber *>().toStyleValue(propertyValue);
-}
-
-- (void)setTextMaxWidth:(MGLStyleValue<NSNumber *> *)textMaxWidth {
- MGLAssertStyleLayerIsValid();
-
- auto mbglValue = MGLStyleValueTransformer<float, NSNumber *>().toPropertyValue(textMaxWidth);
- _rawLayer->setTextMaxWidth(mbglValue);
-}
-
-- (MGLStyleValue<NSNumber *> *)textMaxWidth {
- MGLAssertStyleLayerIsValid();
-
- auto propertyValue = _rawLayer->getTextMaxWidth() ?: _rawLayer->getDefaultTextMaxWidth();
+ auto propertyValue = self.rawLayer->getTextLineHeight() ?: self.rawLayer->getDefaultTextLineHeight();
return MGLStyleValueTransformer<float, NSNumber *>().toStyleValue(propertyValue);
}
@@ -539,13 +663,13 @@ namespace mbgl {
MGLAssertStyleLayerIsValid();
auto mbglValue = MGLStyleValueTransformer<std::array<float, 2>, NSValue *>().toPropertyValue(textOffset);
- _rawLayer->setTextOffset(mbglValue);
+ self.rawLayer->setTextOffset(mbglValue);
}
- (MGLStyleValue<NSValue *> *)textOffset {
MGLAssertStyleLayerIsValid();
- auto propertyValue = _rawLayer->getTextOffset() ?: _rawLayer->getDefaultTextOffset();
+ auto propertyValue = self.rawLayer->getTextOffset() ?: self.rawLayer->getDefaultTextOffset();
return MGLStyleValueTransformer<std::array<float, 2>, NSValue *>().toStyleValue(propertyValue);
}
@@ -553,13 +677,13 @@ namespace mbgl {
MGLAssertStyleLayerIsValid();
auto mbglValue = MGLStyleValueTransformer<bool, NSNumber *>().toPropertyValue(textOptional);
- _rawLayer->setTextOptional(mbglValue);
+ self.rawLayer->setTextOptional(mbglValue);
}
-- (MGLStyleValue<NSNumber *> *)textOptional {
+- (MGLStyleValue<NSNumber *> *)isTextOptional {
MGLAssertStyleLayerIsValid();
- auto propertyValue = _rawLayer->getTextOptional() ?: _rawLayer->getDefaultTextOptional();
+ auto propertyValue = self.rawLayer->getTextOptional() ?: self.rawLayer->getDefaultTextOptional();
return MGLStyleValueTransformer<bool, NSNumber *>().toStyleValue(propertyValue);
}
@@ -567,13 +691,13 @@ namespace mbgl {
MGLAssertStyleLayerIsValid();
auto mbglValue = MGLStyleValueTransformer<float, NSNumber *>().toPropertyValue(textPadding);
- _rawLayer->setTextPadding(mbglValue);
+ self.rawLayer->setTextPadding(mbglValue);
}
- (MGLStyleValue<NSNumber *> *)textPadding {
MGLAssertStyleLayerIsValid();
- auto propertyValue = _rawLayer->getTextPadding() ?: _rawLayer->getDefaultTextPadding();
+ auto propertyValue = self.rawLayer->getTextPadding() ?: self.rawLayer->getDefaultTextPadding();
return MGLStyleValueTransformer<float, NSNumber *>().toStyleValue(propertyValue);
}
@@ -581,41 +705,50 @@ namespace mbgl {
MGLAssertStyleLayerIsValid();
auto mbglValue = MGLStyleValueTransformer<mbgl::style::AlignmentType, NSValue *, mbgl::style::AlignmentType, MGLTextPitchAlignment>().toEnumPropertyValue(textPitchAlignment);
- _rawLayer->setTextPitchAlignment(mbglValue);
+ self.rawLayer->setTextPitchAlignment(mbglValue);
}
- (MGLStyleValue<NSValue *> *)textPitchAlignment {
MGLAssertStyleLayerIsValid();
- auto propertyValue = _rawLayer->getTextPitchAlignment() ?: _rawLayer->getDefaultTextPitchAlignment();
+ auto propertyValue = self.rawLayer->getTextPitchAlignment() ?: self.rawLayer->getDefaultTextPitchAlignment();
return MGLStyleValueTransformer<mbgl::style::AlignmentType, NSValue *, mbgl::style::AlignmentType, MGLTextPitchAlignment>().toEnumStyleValue(propertyValue);
}
-- (void)setTextRotate:(MGLStyleValue<NSNumber *> *)textRotate {
+- (void)setTextRotation:(MGLStyleValue<NSNumber *> *)textRotation {
MGLAssertStyleLayerIsValid();
- auto mbglValue = MGLStyleValueTransformer<float, NSNumber *>().toPropertyValue(textRotate);
- _rawLayer->setTextRotate(mbglValue);
+ auto mbglValue = MGLStyleValueTransformer<float, NSNumber *>().toPropertyValue(textRotation);
+ self.rawLayer->setTextRotate(mbglValue);
}
-- (MGLStyleValue<NSNumber *> *)textRotate {
+- (MGLStyleValue<NSNumber *> *)textRotation {
MGLAssertStyleLayerIsValid();
- auto propertyValue = _rawLayer->getTextRotate() ?: _rawLayer->getDefaultTextRotate();
+ auto propertyValue = self.rawLayer->getTextRotate() ?: self.rawLayer->getDefaultTextRotate();
return MGLStyleValueTransformer<float, NSNumber *>().toStyleValue(propertyValue);
}
+
+- (void)setTextRotate:(MGLStyleValue<NSNumber *> *)textRotate {
+ self.textRotation = textRotate;
+}
+
+- (MGLStyleValue<NSNumber *> *)textRotate {
+ return self.textRotation;
+}
+
- (void)setTextRotationAlignment:(MGLStyleValue<NSValue *> *)textRotationAlignment {
MGLAssertStyleLayerIsValid();
auto mbglValue = MGLStyleValueTransformer<mbgl::style::AlignmentType, NSValue *, mbgl::style::AlignmentType, MGLTextRotationAlignment>().toEnumPropertyValue(textRotationAlignment);
- _rawLayer->setTextRotationAlignment(mbglValue);
+ self.rawLayer->setTextRotationAlignment(mbglValue);
}
- (MGLStyleValue<NSValue *> *)textRotationAlignment {
MGLAssertStyleLayerIsValid();
- auto propertyValue = _rawLayer->getTextRotationAlignment() ?: _rawLayer->getDefaultTextRotationAlignment();
+ auto propertyValue = self.rawLayer->getTextRotationAlignment() ?: self.rawLayer->getDefaultTextRotationAlignment();
return MGLStyleValueTransformer<mbgl::style::AlignmentType, NSValue *, mbgl::style::AlignmentType, MGLTextRotationAlignment>().toEnumStyleValue(propertyValue);
}
@@ -623,13 +756,13 @@ namespace mbgl {
MGLAssertStyleLayerIsValid();
auto mbglValue = MGLStyleValueTransformer<float, NSNumber *>().toPropertyValue(textSize);
- _rawLayer->setTextSize(mbglValue);
+ self.rawLayer->setTextSize(mbglValue);
}
- (MGLStyleValue<NSNumber *> *)textSize {
MGLAssertStyleLayerIsValid();
- auto propertyValue = _rawLayer->getTextSize() ?: _rawLayer->getDefaultTextSize();
+ auto propertyValue = self.rawLayer->getTextSize() ?: self.rawLayer->getDefaultTextSize();
return MGLStyleValueTransformer<float, NSNumber *>().toStyleValue(propertyValue);
}
@@ -637,13 +770,13 @@ namespace mbgl {
MGLAssertStyleLayerIsValid();
auto mbglValue = MGLStyleValueTransformer<mbgl::style::TextTransformType, NSValue *, mbgl::style::TextTransformType, MGLTextTransform>().toEnumPropertyValue(textTransform);
- _rawLayer->setTextTransform(mbglValue);
+ self.rawLayer->setTextTransform(mbglValue);
}
- (MGLStyleValue<NSValue *> *)textTransform {
MGLAssertStyleLayerIsValid();
- auto propertyValue = _rawLayer->getTextTransform() ?: _rawLayer->getDefaultTextTransform();
+ auto propertyValue = self.rawLayer->getTextTransform() ?: self.rawLayer->getDefaultTextTransform();
return MGLStyleValueTransformer<mbgl::style::TextTransformType, NSValue *, mbgl::style::TextTransformType, MGLTextTransform>().toEnumStyleValue(propertyValue);
}
@@ -653,13 +786,13 @@ namespace mbgl {
MGLAssertStyleLayerIsValid();
auto mbglValue = MGLStyleValueTransformer<mbgl::Color, MGLColor *>().toPropertyValue(iconColor);
- _rawLayer->setIconColor(mbglValue);
+ self.rawLayer->setIconColor(mbglValue);
}
- (MGLStyleValue<MGLColor *> *)iconColor {
MGLAssertStyleLayerIsValid();
- auto propertyValue = _rawLayer->getIconColor() ?: _rawLayer->getDefaultIconColor();
+ auto propertyValue = self.rawLayer->getIconColor() ?: self.rawLayer->getDefaultIconColor();
return MGLStyleValueTransformer<mbgl::Color, MGLColor *>().toStyleValue(propertyValue);
}
@@ -667,13 +800,13 @@ namespace mbgl {
MGLAssertStyleLayerIsValid();
auto mbglValue = MGLStyleValueTransformer<float, NSNumber *>().toPropertyValue(iconHaloBlur);
- _rawLayer->setIconHaloBlur(mbglValue);
+ self.rawLayer->setIconHaloBlur(mbglValue);
}
- (MGLStyleValue<NSNumber *> *)iconHaloBlur {
MGLAssertStyleLayerIsValid();
- auto propertyValue = _rawLayer->getIconHaloBlur() ?: _rawLayer->getDefaultIconHaloBlur();
+ auto propertyValue = self.rawLayer->getIconHaloBlur() ?: self.rawLayer->getDefaultIconHaloBlur();
return MGLStyleValueTransformer<float, NSNumber *>().toStyleValue(propertyValue);
}
@@ -681,13 +814,13 @@ namespace mbgl {
MGLAssertStyleLayerIsValid();
auto mbglValue = MGLStyleValueTransformer<mbgl::Color, MGLColor *>().toPropertyValue(iconHaloColor);
- _rawLayer->setIconHaloColor(mbglValue);
+ self.rawLayer->setIconHaloColor(mbglValue);
}
- (MGLStyleValue<MGLColor *> *)iconHaloColor {
MGLAssertStyleLayerIsValid();
- auto propertyValue = _rawLayer->getIconHaloColor() ?: _rawLayer->getDefaultIconHaloColor();
+ auto propertyValue = self.rawLayer->getIconHaloColor() ?: self.rawLayer->getDefaultIconHaloColor();
return MGLStyleValueTransformer<mbgl::Color, MGLColor *>().toStyleValue(propertyValue);
}
@@ -695,13 +828,13 @@ namespace mbgl {
MGLAssertStyleLayerIsValid();
auto mbglValue = MGLStyleValueTransformer<float, NSNumber *>().toPropertyValue(iconHaloWidth);
- _rawLayer->setIconHaloWidth(mbglValue);
+ self.rawLayer->setIconHaloWidth(mbglValue);
}
- (MGLStyleValue<NSNumber *> *)iconHaloWidth {
MGLAssertStyleLayerIsValid();
- auto propertyValue = _rawLayer->getIconHaloWidth() ?: _rawLayer->getDefaultIconHaloWidth();
+ auto propertyValue = self.rawLayer->getIconHaloWidth() ?: self.rawLayer->getDefaultIconHaloWidth();
return MGLStyleValueTransformer<float, NSNumber *>().toStyleValue(propertyValue);
}
@@ -709,13 +842,13 @@ namespace mbgl {
MGLAssertStyleLayerIsValid();
auto mbglValue = MGLStyleValueTransformer<float, NSNumber *>().toPropertyValue(iconOpacity);
- _rawLayer->setIconOpacity(mbglValue);
+ self.rawLayer->setIconOpacity(mbglValue);
}
- (MGLStyleValue<NSNumber *> *)iconOpacity {
MGLAssertStyleLayerIsValid();
- auto propertyValue = _rawLayer->getIconOpacity() ?: _rawLayer->getDefaultIconOpacity();
+ auto propertyValue = self.rawLayer->getIconOpacity() ?: self.rawLayer->getDefaultIconOpacity();
return MGLStyleValueTransformer<float, NSNumber *>().toStyleValue(propertyValue);
}
@@ -723,13 +856,13 @@ namespace mbgl {
MGLAssertStyleLayerIsValid();
auto mbglValue = MGLStyleValueTransformer<std::array<float, 2>, NSValue *>().toPropertyValue(iconTranslate);
- _rawLayer->setIconTranslate(mbglValue);
+ self.rawLayer->setIconTranslate(mbglValue);
}
- (MGLStyleValue<NSValue *> *)iconTranslate {
MGLAssertStyleLayerIsValid();
- auto propertyValue = _rawLayer->getIconTranslate() ?: _rawLayer->getDefaultIconTranslate();
+ auto propertyValue = self.rawLayer->getIconTranslate() ?: self.rawLayer->getDefaultIconTranslate();
return MGLStyleValueTransformer<std::array<float, 2>, NSValue *>().toStyleValue(propertyValue);
}
@@ -737,13 +870,13 @@ namespace mbgl {
MGLAssertStyleLayerIsValid();
auto mbglValue = MGLStyleValueTransformer<mbgl::style::TranslateAnchorType, NSValue *, mbgl::style::TranslateAnchorType, MGLIconTranslateAnchor>().toEnumPropertyValue(iconTranslateAnchor);
- _rawLayer->setIconTranslateAnchor(mbglValue);
+ self.rawLayer->setIconTranslateAnchor(mbglValue);
}
- (MGLStyleValue<NSValue *> *)iconTranslateAnchor {
MGLAssertStyleLayerIsValid();
- auto propertyValue = _rawLayer->getIconTranslateAnchor() ?: _rawLayer->getDefaultIconTranslateAnchor();
+ auto propertyValue = self.rawLayer->getIconTranslateAnchor() ?: self.rawLayer->getDefaultIconTranslateAnchor();
return MGLStyleValueTransformer<mbgl::style::TranslateAnchorType, NSValue *, mbgl::style::TranslateAnchorType, MGLIconTranslateAnchor>().toEnumStyleValue(propertyValue);
}
@@ -751,13 +884,13 @@ namespace mbgl {
MGLAssertStyleLayerIsValid();
auto mbglValue = MGLStyleValueTransformer<mbgl::Color, MGLColor *>().toPropertyValue(textColor);
- _rawLayer->setTextColor(mbglValue);
+ self.rawLayer->setTextColor(mbglValue);
}
- (MGLStyleValue<MGLColor *> *)textColor {
MGLAssertStyleLayerIsValid();
- auto propertyValue = _rawLayer->getTextColor() ?: _rawLayer->getDefaultTextColor();
+ auto propertyValue = self.rawLayer->getTextColor() ?: self.rawLayer->getDefaultTextColor();
return MGLStyleValueTransformer<mbgl::Color, MGLColor *>().toStyleValue(propertyValue);
}
@@ -765,13 +898,13 @@ namespace mbgl {
MGLAssertStyleLayerIsValid();
auto mbglValue = MGLStyleValueTransformer<float, NSNumber *>().toPropertyValue(textHaloBlur);
- _rawLayer->setTextHaloBlur(mbglValue);
+ self.rawLayer->setTextHaloBlur(mbglValue);
}
- (MGLStyleValue<NSNumber *> *)textHaloBlur {
MGLAssertStyleLayerIsValid();
- auto propertyValue = _rawLayer->getTextHaloBlur() ?: _rawLayer->getDefaultTextHaloBlur();
+ auto propertyValue = self.rawLayer->getTextHaloBlur() ?: self.rawLayer->getDefaultTextHaloBlur();
return MGLStyleValueTransformer<float, NSNumber *>().toStyleValue(propertyValue);
}
@@ -779,13 +912,13 @@ namespace mbgl {
MGLAssertStyleLayerIsValid();
auto mbglValue = MGLStyleValueTransformer<mbgl::Color, MGLColor *>().toPropertyValue(textHaloColor);
- _rawLayer->setTextHaloColor(mbglValue);
+ self.rawLayer->setTextHaloColor(mbglValue);
}
- (MGLStyleValue<MGLColor *> *)textHaloColor {
MGLAssertStyleLayerIsValid();
- auto propertyValue = _rawLayer->getTextHaloColor() ?: _rawLayer->getDefaultTextHaloColor();
+ auto propertyValue = self.rawLayer->getTextHaloColor() ?: self.rawLayer->getDefaultTextHaloColor();
return MGLStyleValueTransformer<mbgl::Color, MGLColor *>().toStyleValue(propertyValue);
}
@@ -793,13 +926,13 @@ namespace mbgl {
MGLAssertStyleLayerIsValid();
auto mbglValue = MGLStyleValueTransformer<float, NSNumber *>().toPropertyValue(textHaloWidth);
- _rawLayer->setTextHaloWidth(mbglValue);
+ self.rawLayer->setTextHaloWidth(mbglValue);
}
- (MGLStyleValue<NSNumber *> *)textHaloWidth {
MGLAssertStyleLayerIsValid();
- auto propertyValue = _rawLayer->getTextHaloWidth() ?: _rawLayer->getDefaultTextHaloWidth();
+ auto propertyValue = self.rawLayer->getTextHaloWidth() ?: self.rawLayer->getDefaultTextHaloWidth();
return MGLStyleValueTransformer<float, NSNumber *>().toStyleValue(propertyValue);
}
@@ -807,13 +940,13 @@ namespace mbgl {
MGLAssertStyleLayerIsValid();
auto mbglValue = MGLStyleValueTransformer<float, NSNumber *>().toPropertyValue(textOpacity);
- _rawLayer->setTextOpacity(mbglValue);
+ self.rawLayer->setTextOpacity(mbglValue);
}
- (MGLStyleValue<NSNumber *> *)textOpacity {
MGLAssertStyleLayerIsValid();
- auto propertyValue = _rawLayer->getTextOpacity() ?: _rawLayer->getDefaultTextOpacity();
+ auto propertyValue = self.rawLayer->getTextOpacity() ?: self.rawLayer->getDefaultTextOpacity();
return MGLStyleValueTransformer<float, NSNumber *>().toStyleValue(propertyValue);
}
@@ -821,13 +954,13 @@ namespace mbgl {
MGLAssertStyleLayerIsValid();
auto mbglValue = MGLStyleValueTransformer<std::array<float, 2>, NSValue *>().toPropertyValue(textTranslate);
- _rawLayer->setTextTranslate(mbglValue);
+ self.rawLayer->setTextTranslate(mbglValue);
}
- (MGLStyleValue<NSValue *> *)textTranslate {
MGLAssertStyleLayerIsValid();
- auto propertyValue = _rawLayer->getTextTranslate() ?: _rawLayer->getDefaultTextTranslate();
+ auto propertyValue = self.rawLayer->getTextTranslate() ?: self.rawLayer->getDefaultTextTranslate();
return MGLStyleValueTransformer<std::array<float, 2>, NSValue *>().toStyleValue(propertyValue);
}
@@ -835,13 +968,13 @@ namespace mbgl {
MGLAssertStyleLayerIsValid();
auto mbglValue = MGLStyleValueTransformer<mbgl::style::TranslateAnchorType, NSValue *, mbgl::style::TranslateAnchorType, MGLTextTranslateAnchor>().toEnumPropertyValue(textTranslateAnchor);
- _rawLayer->setTextTranslateAnchor(mbglValue);
+ self.rawLayer->setTextTranslateAnchor(mbglValue);
}
- (MGLStyleValue<NSValue *> *)textTranslateAnchor {
MGLAssertStyleLayerIsValid();
- auto propertyValue = _rawLayer->getTextTranslateAnchor() ?: _rawLayer->getDefaultTextTranslateAnchor();
+ auto propertyValue = self.rawLayer->getTextTranslateAnchor() ?: self.rawLayer->getDefaultTextTranslateAnchor();
return MGLStyleValueTransformer<mbgl::style::TranslateAnchorType, NSValue *, mbgl::style::TranslateAnchorType, MGLTextTranslateAnchor>().toEnumStyleValue(propertyValue);
}