Skip to content
This repository has been archived by the owner on Aug 8, 2023. It is now read-only.

Commit

Permalink
[android] flip comment style & [ios, android] update visibility doc
Browse files Browse the repository at this point in the history
  • Loading branch information
incanus committed Sep 30, 2016
1 parent 4da521e commit 357f6a8
Show file tree
Hide file tree
Showing 4 changed files with 136 additions and 76 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,7 @@
*/
public abstract class Property<T> {

/**
* Layer visibility
*/
//VISIBILITY: Whether this layer is displayed.
public static final String VISIBLE = "visible";
public static final String NONE = "none";

Expand All @@ -24,14 +22,18 @@ public abstract class Property<T> {
@Retention(RetentionPolicy.SOURCE)
public @interface VISIBILITY {}

//LINE_CAP: The display of line endings.
/**
* LINE_CAP: The display of line endings.
* A cap with a squared-off end which is drawn to the exact endpoint of the line.
*/
//A cap with a squared-off end which is drawn to the exact endpoint of the line.
public static final String LINE_CAP_BUTT = "butt";
//A cap with a rounded end which is drawn beyond the endpoint of the line at a radius of one-half of the line's width and centered on the endpoint of the line.
/**
* A cap with a rounded end which is drawn beyond the endpoint of the line at a radius of one-half of the line's width and centered on the endpoint of the line.
*/
public static final String LINE_CAP_ROUND = "round";
//A cap with a squared-off end which is drawn beyond the endpoint of the line at a distance of one-half of the line's width.
/**
* A cap with a squared-off end which is drawn beyond the endpoint of the line at a distance of one-half of the line's width.
*/
public static final String LINE_CAP_SQUARE = "square";

@StringDef({
Expand All @@ -42,14 +44,18 @@ public abstract class Property<T> {
@Retention(RetentionPolicy.SOURCE)
public @interface LINE_CAP {}

//LINE_JOIN: The display of lines when joining.
/**
* LINE_JOIN: The display of lines when joining.
* A join with a squared-off end which is drawn beyond the endpoint of the line at a distance of one-half of the line's width.
*/
//A join with a squared-off end which is drawn beyond the endpoint of the line at a distance of one-half of the line's width.
public static final String LINE_JOIN_BEVEL = "bevel";
//A join with a rounded end which is drawn beyond the endpoint of the line at a radius of one-half of the line's width and centered on the endpoint of the line.
/**
* A join with a rounded end which is drawn beyond the endpoint of the line at a radius of one-half of the line's width and centered on the endpoint of the line.
*/
public static final String LINE_JOIN_ROUND = "round";
//A join with a sharp, angled corner which is drawn with the outer sides beyond the endpoint of the path until they meet.
/**
* A join with a sharp, angled corner which is drawn with the outer sides beyond the endpoint of the path until they meet.
*/
public static final String LINE_JOIN_MITER = "miter";

@StringDef({
Expand All @@ -60,12 +66,14 @@ public abstract class Property<T> {
@Retention(RetentionPolicy.SOURCE)
public @interface LINE_JOIN {}

//SYMBOL_PLACEMENT: Label placement relative to its geometry.
/**
* SYMBOL_PLACEMENT: Label placement relative to its geometry.
* The label is placed at the point where the geometry is located.
*/
//The label is placed at the point where the geometry is located.
public static final String SYMBOL_PLACEMENT_POINT = "point";
//The label is placed along the line of the geometry. Can only be used on `LineString` and `Polygon` geometries.
/**
* The label is placed along the line of the geometry. Can only be used on `LineString` and `Polygon` geometries.
*/
public static final String SYMBOL_PLACEMENT_LINE = "line";

@StringDef({
Expand All @@ -75,14 +83,18 @@ public abstract class Property<T> {
@Retention(RetentionPolicy.SOURCE)
public @interface SYMBOL_PLACEMENT {}

//ICON_ROTATION_ALIGNMENT: In combination with `symbol-placement`, determines the rotation behavior of icons.
/**
* ICON_ROTATION_ALIGNMENT: In combination with `symbol-placement`, determines the rotation behavior of icons.
* When `symbol-placement` is set to `point`, aligns icons east-west. When `symbol-placement` is set to `line`, aligns icon x-axes with the line.
*/
//When `symbol-placement` is set to `point`, aligns icons east-west. When `symbol-placement` is set to `line`, aligns icon x-axes with the line.
public static final String ICON_ROTATION_ALIGNMENT_MAP = "map";
//Produces icons whose x-axes are aligned with the x-axis of the viewport, regardless of the value of `symbol-placement`.
/**
* Produces icons whose x-axes are aligned with the x-axis of the viewport, regardless of the value of `symbol-placement`.
*/
public static final String ICON_ROTATION_ALIGNMENT_VIEWPORT = "viewport";
//When `symbol-placement` is set to `point`, this is equivalent to `viewport`. When `symbol-placement` is set to `line`, this is equivalent to `map`.
/**
* When `symbol-placement` is set to `point`, this is equivalent to `viewport`. When `symbol-placement` is set to `line`, this is equivalent to `map`.
*/
public static final String ICON_ROTATION_ALIGNMENT_AUTO = "auto";

@StringDef({
Expand All @@ -93,16 +105,22 @@ public abstract class Property<T> {
@Retention(RetentionPolicy.SOURCE)
public @interface ICON_ROTATION_ALIGNMENT {}

//ICON_TEXT_FIT: Scales the icon to fit around the associated text.
/**
* ICON_TEXT_FIT: Scales the icon to fit around the associated text.
* The icon is displayed at its intrinsic aspect ratio.
*/
//The icon is displayed at its intrinsic aspect ratio.
public static final String ICON_TEXT_FIT_NONE = "none";
//The icon is scaled in the x-dimension to fit the width of the text.
/**
* The icon is scaled in the x-dimension to fit the width of the text.
*/
public static final String ICON_TEXT_FIT_WIDTH = "width";
//The icon is scaled in the y-dimension to fit the height of the text.
/**
* The icon is scaled in the y-dimension to fit the height of the text.
*/
public static final String ICON_TEXT_FIT_HEIGHT = "height";
//The icon is scaled in both x- and y-dimensions.
/**
* The icon is scaled in both x- and y-dimensions.
*/
public static final String ICON_TEXT_FIT_BOTH = "both";

@StringDef({
Expand All @@ -114,14 +132,18 @@ public abstract class Property<T> {
@Retention(RetentionPolicy.SOURCE)
public @interface ICON_TEXT_FIT {}

//TEXT_PITCH_ALIGNMENT: Orientation of text when map is pitched.
/**
* TEXT_PITCH_ALIGNMENT: Orientation of text when map is pitched.
* The text is aligned to the plane of the map.
*/
//The text is aligned to the plane of the map.
public static final String TEXT_PITCH_ALIGNMENT_MAP = "map";
//The text is aligned to the plane of the viewport.
/**
* The text is aligned to the plane of the viewport.
*/
public static final String TEXT_PITCH_ALIGNMENT_VIEWPORT = "viewport";
//Automatically matches the value of `text-rotation-alignment`.
/**
* Automatically matches the value of `text-rotation-alignment`.
*/
public static final String TEXT_PITCH_ALIGNMENT_AUTO = "auto";

@StringDef({
Expand All @@ -132,14 +154,18 @@ public abstract class Property<T> {
@Retention(RetentionPolicy.SOURCE)
public @interface TEXT_PITCH_ALIGNMENT {}

//TEXT_ROTATION_ALIGNMENT: In combination with `symbol-placement`, determines the rotation behavior of the individual glyphs forming the text.
/**
* TEXT_ROTATION_ALIGNMENT: In combination with `symbol-placement`, determines the rotation behavior of the individual glyphs forming the text.
* When `symbol-placement` is set to `point`, aligns text east-west. When `symbol-placement` is set to `line`, aligns text x-axes with the line.
*/
//When `symbol-placement` is set to `point`, aligns text east-west. When `symbol-placement` is set to `line`, aligns text x-axes with the line.
public static final String TEXT_ROTATION_ALIGNMENT_MAP = "map";
//Produces glyphs whose x-axes are aligned with the x-axis of the viewport, regardless of the value of `symbol-placement`.
/**
* Produces glyphs whose x-axes are aligned with the x-axis of the viewport, regardless of the value of `symbol-placement`.
*/
public static final String TEXT_ROTATION_ALIGNMENT_VIEWPORT = "viewport";
//When `symbol-placement` is set to `point`, this is equivalent to `viewport`. When `symbol-placement` is set to `line`, this is equivalent to `map`.
/**
* When `symbol-placement` is set to `point`, this is equivalent to `viewport`. When `symbol-placement` is set to `line`, this is equivalent to `map`.
*/
public static final String TEXT_ROTATION_ALIGNMENT_AUTO = "auto";

@StringDef({
Expand All @@ -150,14 +176,18 @@ public abstract class Property<T> {
@Retention(RetentionPolicy.SOURCE)
public @interface TEXT_ROTATION_ALIGNMENT {}

//TEXT_JUSTIFY: Text justification options.
/**
* TEXT_JUSTIFY: Text justification options.
* The text is aligned to the left.
*/
//The text is aligned to the left.
public static final String TEXT_JUSTIFY_LEFT = "left";
//The text is centered.
/**
* The text is centered.
*/
public static final String TEXT_JUSTIFY_CENTER = "center";
//The text is aligned to the right.
/**
* The text is aligned to the right.
*/
public static final String TEXT_JUSTIFY_RIGHT = "right";

@StringDef({
Expand All @@ -168,26 +198,42 @@ public abstract class Property<T> {
@Retention(RetentionPolicy.SOURCE)
public @interface TEXT_JUSTIFY {}

//TEXT_ANCHOR: Part of the text placed closest to the anchor.
/**
* TEXT_ANCHOR: Part of the text placed closest to the anchor.
* The center of the text is placed closest to the anchor.
*/
//The center of the text is placed closest to the anchor.
public static final String TEXT_ANCHOR_CENTER = "center";
//The left side of the text is placed closest to the anchor.
/**
* The left side of the text is placed closest to the anchor.
*/
public static final String TEXT_ANCHOR_LEFT = "left";
//The right side of the text is placed closest to the anchor.
/**
* The right side of the text is placed closest to the anchor.
*/
public static final String TEXT_ANCHOR_RIGHT = "right";
//The top of the text is placed closest to the anchor.
/**
* The top of the text is placed closest to the anchor.
*/
public static final String TEXT_ANCHOR_TOP = "top";
//The bottom of the text is placed closest to the anchor.
/**
* The bottom of the text is placed closest to the anchor.
*/
public static final String TEXT_ANCHOR_BOTTOM = "bottom";
//The top left corner of the text is placed closest to the anchor.
/**
* The top left corner of the text is placed closest to the anchor.
*/
public static final String TEXT_ANCHOR_TOP_LEFT = "top-left";
//The top right corner of the text is placed closest to the anchor.
/**
* The top right corner of the text is placed closest to the anchor.
*/
public static final String TEXT_ANCHOR_TOP_RIGHT = "top-right";
//The bottom left corner of the text is placed closest to the anchor.
/**
* The bottom left corner of the text is placed closest to the anchor.
*/
public static final String TEXT_ANCHOR_BOTTOM_LEFT = "bottom-left";
//The bottom right corner of the text is placed closest to the anchor.
/**
* The bottom right corner of the text is placed closest to the anchor.
*/
public static final String TEXT_ANCHOR_BOTTOM_RIGHT = "bottom-right";

@StringDef({
Expand All @@ -204,14 +250,18 @@ public abstract class Property<T> {
@Retention(RetentionPolicy.SOURCE)
public @interface TEXT_ANCHOR {}

//TEXT_TRANSFORM: Specifies how to capitalize text, similar to the CSS `text-transform` property.
/**
* TEXT_TRANSFORM: Specifies how to capitalize text, similar to the CSS `text-transform` property.
* The text is not altered.
*/
//The text is not altered.
public static final String TEXT_TRANSFORM_NONE = "none";
//Forces all letters to be displayed in uppercase.
/**
* Forces all letters to be displayed in uppercase.
*/
public static final String TEXT_TRANSFORM_UPPERCASE = "uppercase";
//Forces all letters to be displayed in lowercase.
/**
* Forces all letters to be displayed in lowercase.
*/
public static final String TEXT_TRANSFORM_LOWERCASE = "lowercase";

@StringDef({
Expand All @@ -222,12 +272,14 @@ public abstract class Property<T> {
@Retention(RetentionPolicy.SOURCE)
public @interface TEXT_TRANSFORM {}

//FILL_TRANSLATE_ANCHOR: Controls the translation reference point.
/**
* FILL_TRANSLATE_ANCHOR: Controls the translation reference point.
* The fill is translated relative to the map.
*/
//The fill is translated relative to the map.
public static final String FILL_TRANSLATE_ANCHOR_MAP = "map";
//The fill is translated relative to the viewport.
/**
* The fill is translated relative to the viewport.
*/
public static final String FILL_TRANSLATE_ANCHOR_VIEWPORT = "viewport";

@StringDef({
Expand All @@ -237,12 +289,14 @@ public abstract class Property<T> {
@Retention(RetentionPolicy.SOURCE)
public @interface FILL_TRANSLATE_ANCHOR {}

//LINE_TRANSLATE_ANCHOR: Controls the translation reference point.
/**
* LINE_TRANSLATE_ANCHOR: Controls the translation reference point.
* The line is translated relative to the map.
*/
//The line is translated relative to the map.
public static final String LINE_TRANSLATE_ANCHOR_MAP = "map";
//The line is translated relative to the viewport.
/**
* The line is translated relative to the viewport.
*/
public static final String LINE_TRANSLATE_ANCHOR_VIEWPORT = "viewport";

@StringDef({
Expand All @@ -252,12 +306,14 @@ public abstract class Property<T> {
@Retention(RetentionPolicy.SOURCE)
public @interface LINE_TRANSLATE_ANCHOR {}

//ICON_TRANSLATE_ANCHOR: Controls the translation reference point.
/**
* ICON_TRANSLATE_ANCHOR: Controls the translation reference point.
* Icons are translated relative to the map.
*/
//Icons are translated relative to the map.
public static final String ICON_TRANSLATE_ANCHOR_MAP = "map";
//Icons are translated relative to the viewport.
/**
* Icons are translated relative to the viewport.
*/
public static final String ICON_TRANSLATE_ANCHOR_VIEWPORT = "viewport";

@StringDef({
Expand All @@ -267,12 +323,14 @@ public abstract class Property<T> {
@Retention(RetentionPolicy.SOURCE)
public @interface ICON_TRANSLATE_ANCHOR {}

//TEXT_TRANSLATE_ANCHOR: Controls the translation reference point.
/**
* TEXT_TRANSLATE_ANCHOR: Controls the translation reference point.
* The text is translated relative to the map.
*/
//The text is translated relative to the map.
public static final String TEXT_TRANSLATE_ANCHOR_MAP = "map";
//The text is translated relative to the viewport.
/**
* The text is translated relative to the viewport.
*/
public static final String TEXT_TRANSLATE_ANCHOR_VIEWPORT = "viewport";

@StringDef({
Expand All @@ -282,12 +340,14 @@ public abstract class Property<T> {
@Retention(RetentionPolicy.SOURCE)
public @interface TEXT_TRANSLATE_ANCHOR {}

//CIRCLE_TRANSLATE_ANCHOR: Controls the translation reference point.
/**
* CIRCLE_TRANSLATE_ANCHOR: Controls the translation reference point.
* The circle is translated relative to the map.
*/
//The circle is translated relative to the map.
public static final String CIRCLE_TRANSLATE_ANCHOR_MAP = "map";
//The circle is translated relative to the viewport.
/**
* The circle is translated relative to the viewport.
*/
public static final String CIRCLE_TRANSLATE_ANCHOR_VIEWPORT = "viewport";

@StringDef({
Expand All @@ -297,12 +357,14 @@ public abstract class Property<T> {
@Retention(RetentionPolicy.SOURCE)
public @interface CIRCLE_TRANSLATE_ANCHOR {}

//CIRCLE_PITCH_SCALE: Controls the scaling behavior of the circle when the map is pitched.
/**
* CIRCLE_PITCH_SCALE: Controls the scaling behavior of the circle when the map is pitched.
* Circles are scaled according to their apparent distance to the camera.
*/
//Circles are scaled according to their apparent distance to the camera.
public static final String CIRCLE_PITCH_SCALE_MAP = "map";
//Circles are not scaled.
/**
* Circles are not scaled.
*/
public static final String CIRCLE_PITCH_SCALE_VIEWPORT = "viewport";

@StringDef({
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1342,7 +1342,7 @@ public static Property<Function<String>> iconTextFit(Function<String> function)
}

/**
* Size of the additional area added to dimensions determined by `iconTextFix`, in clockwise order: top, right, bottom, left.
* Size of the additional area added to dimensions determined by `iconTextFit`, in clockwise order: top, right, bottom, left.
*
* @param value a Float[] value
* @return property wrapper around Float[]
Expand All @@ -1352,7 +1352,7 @@ public static Property<Float[]> iconTextFitPadding(Float[] value) {
}

/**
* Size of the additional area added to dimensions determined by `iconTextFix`, in clockwise order: top, right, bottom, left.
* Size of the additional area added to dimensions determined by `iconTextFit`, in clockwise order: top, right, bottom, left.
*
* @param function a wrapper function for Float[]
* @return property wrapper around a Float[] function
Expand Down
Loading

0 comments on commit 357f6a8

Please sign in to comment.