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

update style generation code for new style spec enum values docs #6508

Merged
merged 16 commits into from
Sep 30, 2016
Merged
Show file tree
Hide file tree
Changes from 10 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"ejs": "^2.4.1",
"express": "^4.11.1",
"mapbox-gl-shaders": "mapbox/mapbox-gl-shaders#de2ab007455aa2587c552694c68583f94c9f2747",
"mapbox-gl-style-spec": "mapbox/mapbox-gl-style-spec#23155c0f34e1e6833ca772dc8b19111ee6cd40e9",
"mapbox-gl-style-spec": "mapbox/mapbox-gl-style-spec#cc63f58948abdf659012b7014ad7187e7e484d83",
"mapbox-gl-test-suite": "mapbox/mapbox-gl-test-suite#694f0d0728f229d64d1639dc5ee7aff7f4b8ca41",
"mkdirp": "^0.5.1",
"node-cmake": "^1.2.1",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ public CircleLayer(String layerId, String sourceId) {

protected native void initialize(String layerId, String sourceId);

/**
/**
* Set the source layer.
*
* @param sourceLayer the source layer to set
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ public FillLayer(String layerId, String sourceId) {

protected native void initialize(String layerId, String sourceId);

/**
/**
* Set the source layer.
*
* @param sourceLayer the source layer to set
Expand Down Expand Up @@ -143,7 +143,7 @@ public PropertyValue<String> getFillColor() {
return (PropertyValue<String>) new PropertyValue(nativeGetFillColor());
}
/**
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some funky indentation going on here.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Think I got this in caeee4f.

* The color of the filled part of this layer. This color can be specified as rgba with an alpha component and the color's opacity will not affect the opacity of the 1px stroke, if it is used.
* The color of the filled part of this layer. This color can be specified as `rgba` with an alpha component and the color's opacity will not affect the opacity of the 1px stroke, if it is used.
*
* @return int representation of a rgba string color
* @throws RuntimeException thrown if property isn't a value
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ public LineLayer(String layerId, String sourceId) {

protected native void initialize(String layerId, String sourceId);

/**
/**
* Set the source layer.
*
* @param sourceLayer the source layer to set
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,9 @@
*/
public abstract class Property<T> {

//visibility
/**
* Layer visibility
*/
public static final String VISIBLE = "visible";
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@incanus If you document in this way, it is only applied to the first constant VISIBLE. The // I used don't show up at all in javadoc. I use those more as you'd use #pragma mark, to organize the source, not to document. If you apply javadoc, you need to do it on all constants I'm afraid.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

public static final String NONE = "none";

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

//line-cap
/**
* LINE_CAP: The display of line endings.
*/
//A cap with a squared-off end which is drawn to the exact endpoint of the line.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same thing here. I would invert this, start the header with // and the individual comments with /** */

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.
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.
public static final String LINE_CAP_SQUARE = "square";

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

//line-join
/**
* 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.
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.
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.
public static final String LINE_JOIN_MITER = "miter";

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

//symbol-placement
/**
* SYMBOL_PLACEMENT: Label placement relative to its geometry.
*/
//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.
public static final String SYMBOL_PLACEMENT_LINE = "line";

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

//icon-rotation-alignment
/**
* 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.
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`.
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`.
public static final String ICON_ROTATION_ALIGNMENT_AUTO = "auto";

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

//icon-text-fit
/**
* ICON_TEXT_FIT: Scales the icon to fit around the associated text.
*/
//The icon is displayed at its intrinsic aspect ratio.
public static final String ICON_TEXT_FIT_NONE = "none";
public static final String ICON_TEXT_FIT_BOTH = "both";
//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.
public static final String ICON_TEXT_FIT_HEIGHT = "height";
//The icon is scaled in both x- and y-dimensions.
public static final String ICON_TEXT_FIT_BOTH = "both";

@StringDef({
ICON_TEXT_FIT_NONE,
ICON_TEXT_FIT_BOTH,
ICON_TEXT_FIT_WIDTH,
ICON_TEXT_FIT_HEIGHT,
ICON_TEXT_FIT_BOTH,
})
@Retention(RetentionPolicy.SOURCE)
public @interface ICON_TEXT_FIT {}

//text-pitch-alignment
/**
* TEXT_PITCH_ALIGNMENT: Orientation of text when map is pitched.
*/
//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.
public static final String TEXT_PITCH_ALIGNMENT_VIEWPORT = "viewport";
//Automatically matches the value of `text-rotation-alignment`.
public static final String TEXT_PITCH_ALIGNMENT_AUTO = "auto";

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

//text-rotation-alignment
/**
* 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.
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`.
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`.
public static final String TEXT_ROTATION_ALIGNMENT_AUTO = "auto";

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

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

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

//text-anchor
/**
* TEXT_ANCHOR: Part of the text 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.
public static final String TEXT_ANCHOR_LEFT = "left";
//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.
public static final String TEXT_ANCHOR_TOP = "top";
//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.
public static final String TEXT_ANCHOR_TOP_LEFT = "top-left";
//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.
public static final String TEXT_ANCHOR_BOTTOM_LEFT = "bottom-left";
//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 @@ -151,9 +204,14 @@ public abstract class Property<T> {
@Retention(RetentionPolicy.SOURCE)
public @interface TEXT_ANCHOR {}

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

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

//fill-translate-anchor
/**
* FILL_TRANSLATE_ANCHOR: Controls the translation reference point.
*/
//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.
public static final String FILL_TRANSLATE_ANCHOR_VIEWPORT = "viewport";

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

//line-translate-anchor
/**
* LINE_TRANSLATE_ANCHOR: Controls the translation reference point.
*/
//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.
public static final String LINE_TRANSLATE_ANCHOR_VIEWPORT = "viewport";

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

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

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

//text-translate-anchor
/**
* TEXT_TRANSLATE_ANCHOR: Controls the translation reference point.
*/
//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.
public static final String TEXT_TRANSLATE_ANCHOR_VIEWPORT = "viewport";

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

//circle-translate-anchor
/**
* CIRCLE_TRANSLATE_ANCHOR: Controls the translation reference point.
*/
//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.
public static final String CIRCLE_TRANSLATE_ANCHOR_VIEWPORT = "viewport";

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

//circle-pitch-scale
/**
* 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.
public static final String CIRCLE_PITCH_SCALE_MAP = "map";
//Circles are not scaled.
public static final String CIRCLE_PITCH_SCALE_VIEWPORT = "viewport";

@StringDef({
Expand Down
Loading