From e6d51c384d0015f4dfbabb1d3f15d84a0502b9ae Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Minh=20Nguye=CC=82=CC=83n?= Date: Tue, 6 Dec 2016 11:21:08 -0800 Subject: [PATCH] [ios, macos] Note corresponding style spec properties MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Documentation for attributes whose names we’ve overridden now mention the original style specification property name, with a link to the style specification documentation for the property. --- platform/darwin/src/MGLLineStyleLayer.h | 2 ++ platform/darwin/src/MGLRasterStyleLayer.h | 4 ++++ platform/darwin/src/MGLStyleLayer.h.ejs | 8 ++++++++ platform/darwin/src/MGLSymbolStyleLayer.h | 4 ++++ 4 files changed, 18 insertions(+) diff --git a/platform/darwin/src/MGLLineStyleLayer.h b/platform/darwin/src/MGLLineStyleLayer.h index 95ef76027..fce755527 100644 --- a/platform/darwin/src/MGLLineStyleLayer.h +++ b/platform/darwin/src/MGLLineStyleLayer.h @@ -141,6 +141,8 @@ typedef NS_ENUM(NSUInteger, MGLLineTranslateAnchor) { This property is measured in line widths. This property is only applied to the style if `linePattern` is set to `nil`. Otherwise, it is ignored. + + This attribute corresponds to the line-dasharray paint property in the Mapbox Style Specification. */ @property (nonatomic, null_resettable) MGLStyleValue *> *lineDashPattern; diff --git a/platform/darwin/src/MGLRasterStyleLayer.h b/platform/darwin/src/MGLRasterStyleLayer.h index 68b187a90..e1b88900b 100644 --- a/platform/darwin/src/MGLRasterStyleLayer.h +++ b/platform/darwin/src/MGLRasterStyleLayer.h @@ -20,6 +20,8 @@ NS_ASSUME_NONNULL_BEGIN Increase or reduce the brightness of the image. The value is the maximum brightness. The default value of this property is an `MGLStyleValue` object containing an `NSNumber` object containing the float `1`. Set this property to `nil` to reset it to the default value. + + This attribute corresponds to the raster-brightness-max paint property in the Mapbox Style Specification. */ @property (nonatomic, null_resettable) MGLStyleValue *maximumRasterBrightness; @@ -27,6 +29,8 @@ NS_ASSUME_NONNULL_BEGIN Increase or reduce the brightness of the image. The value is the minimum brightness. The default value of this property is an `MGLStyleValue` object containing an `NSNumber` object containing the float `0`. Set this property to `nil` to reset it to the default value. + + This attribute corresponds to the raster-brightness-min paint property in the Mapbox Style Specification. */ @property (nonatomic, null_resettable) MGLStyleValue *minimumRasterBrightness; diff --git a/platform/darwin/src/MGLStyleLayer.h.ejs b/platform/darwin/src/MGLStyleLayer.h.ejs index b97d070b9..d454ec0c6 100644 --- a/platform/darwin/src/MGLStyleLayer.h.ejs +++ b/platform/darwin/src/MGLStyleLayer.h.ejs @@ -90,6 +90,10 @@ typedef NS_ENUM(NSUInteger, MGL<%- camelize(property.name) %>) { <% } if (property.requires) { -%> <%- propertyReqs(property, layoutPropertiesByName, type) %> +<% } -%> +<% if (property.original) { -%> + + This attribute corresponds to the <%- property.original -%> layout property in the Mapbox Style Specification. <% } -%> */ @property (nonatomic<% if (!property.required) { %>, null_resettable<% } %>) MGLStyleValue<<%- propertyType(property, true) %>> *<%- camelizeWithLeadingLowercase(property.name) %>; @@ -108,6 +112,10 @@ typedef NS_ENUM(NSUInteger, MGL<%- camelize(property.name) %>) { <% } if (property.requires) { -%> <%- propertyReqs(property, paintPropertiesByName, type) %> +<% } -%> +<% if (property.original) { -%> + + This attribute corresponds to the <%- property.original -%> paint property in the Mapbox Style Specification. <% } -%> */ @property (nonatomic<% if (!property.required) { %>, null_resettable<% } %>) MGLStyleValue<<%- propertyType(property, true) %>> *<%- camelizeWithLeadingLowercase(property.name) %>; diff --git a/platform/darwin/src/MGLSymbolStyleLayer.h b/platform/darwin/src/MGLSymbolStyleLayer.h index 1a97717ad..d0ec648ba 100644 --- a/platform/darwin/src/MGLSymbolStyleLayer.h +++ b/platform/darwin/src/MGLSymbolStyleLayer.h @@ -252,6 +252,8 @@ typedef NS_ENUM(NSUInteger, MGLTextTranslateAnchor) { /** A string with {tokens} replaced, referencing the data property to pull from. + + This attribute corresponds to the icon-image layout property in the Mapbox Style Specification. */ @property (nonatomic, null_resettable) MGLStyleValue *iconImageName; @@ -319,6 +321,8 @@ typedef NS_ENUM(NSUInteger, MGLTextTranslateAnchor) { The default value of this property is an `MGLStyleValue` object containing an `NSNumber` object containing the float `1`. Set this property to `nil` to reset it to the default value. This property is only applied to the style if `iconImage` is non-`nil`. Otherwise, it is ignored. + + This attribute corresponds to the icon-size layout property in the Mapbox Style Specification. */ @property (nonatomic, null_resettable) MGLStyleValue *iconScale;