Skip to content

Commit

Permalink
Updated to latest styles v8.json and rerand autgonerate
Browse files Browse the repository at this point in the history
  • Loading branch information
mfazekas committed May 5, 2019
1 parent a1d4916 commit 5eef7a6
Show file tree
Hide file tree
Showing 14 changed files with 867 additions and 206 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,9 @@ public void onAllImagesLoaded() {
case "linePatternTransition":
RCTMGLStyleFactory.setLinePatternTransition(layer, styleValue);
break;
case "lineGradient":
RCTMGLStyleFactory.setLineGradient(layer, styleValue);
break;
}
}
}
Expand All @@ -194,6 +197,9 @@ public static void setSymbolLayerStyle(final SymbolLayer layer, RCTMGLStyle styl
case "symbolAvoidEdges":
RCTMGLStyleFactory.setSymbolAvoidEdges(layer, styleValue);
break;
case "symbolZOrder":
RCTMGLStyleFactory.setSymbolZOrder(layer, styleValue);
break;
case "iconAllowOverlap":
RCTMGLStyleFactory.setIconAllowOverlap(layer, styleValue);
break;
Expand Down Expand Up @@ -608,6 +614,9 @@ public static void setRasterLayerStyle(final RasterLayer layer, RCTMGLStyle styl
case "rasterContrastTransition":
RCTMGLStyleFactory.setRasterContrastTransition(layer, styleValue);
break;
case "rasterResampling":
RCTMGLStyleFactory.setRasterResampling(layer, styleValue);
break;
case "rasterFadeDuration":
RCTMGLStyleFactory.setRasterFadeDuration(layer, styleValue);
break;
Expand Down Expand Up @@ -1025,6 +1034,14 @@ public static void setLinePatternTransition(LineLayer layer, RCTMGLStyleValue st
}
}

public static void setLineGradient(LineLayer layer, RCTMGLStyleValue styleValue) {
if (styleValue.isExpression()) {
layer.setProperties(PropertyFactory.lineGradient(styleValue.getExpression()));
} else {
layer.setProperties(PropertyFactory.lineGradient(styleValue.getInt(VALUE_KEY)));
}
}

public static void setSymbolPlacement(SymbolLayer layer, RCTMGLStyleValue styleValue) {
if (styleValue.isExpression()) {
layer.setProperties(PropertyFactory.symbolPlacement(styleValue.getExpression()));
Expand All @@ -1049,6 +1066,14 @@ public static void setSymbolAvoidEdges(SymbolLayer layer, RCTMGLStyleValue style
}
}

public static void setSymbolZOrder(SymbolLayer layer, RCTMGLStyleValue styleValue) {
if (styleValue.isExpression()) {
layer.setProperties(PropertyFactory.symbolZOrder(styleValue.getExpression()));
} else {
layer.setProperties(PropertyFactory.symbolZOrder(styleValue.getString(VALUE_KEY)));
}
}

public static void setIconAllowOverlap(SymbolLayer layer, RCTMGLStyleValue styleValue) {
if (styleValue.isExpression()) {
layer.setProperties(PropertyFactory.iconAllowOverlap(styleValue.getExpression()));
Expand Down Expand Up @@ -1957,6 +1982,14 @@ public static void setRasterContrastTransition(RasterLayer layer, RCTMGLStyleVal
}
}

public static void setRasterResampling(RasterLayer layer, RCTMGLStyleValue styleValue) {
if (styleValue.isExpression()) {
layer.setProperties(PropertyFactory.rasterResampling(styleValue.getExpression()));
} else {
layer.setProperties(PropertyFactory.rasterResampling(styleValue.getString(VALUE_KEY)));
}
}

public static void setRasterFadeDuration(RasterLayer layer, RCTMGLStyleValue styleValue) {
if (styleValue.isExpression()) {
layer.setProperties(PropertyFactory.rasterFadeDuration(styleValue.getExpression()));
Expand Down
14 changes: 7 additions & 7 deletions docs/CircleLayer.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ Circle radius.

#### Expression

Parameters: `zoom, feature`
Parameters: `zoom, feature, feature-state`

___

Expand All @@ -90,7 +90,7 @@ The fill color of the circle.

#### Expression

Parameters: `zoom, feature`
Parameters: `zoom, feature, feature-state`

___

Expand All @@ -108,7 +108,7 @@ Amount to blur the circle. 1 blurs the circle such that only the centerpoint is

#### Expression

Parameters: `zoom, feature`
Parameters: `zoom, feature, feature-state`

___

Expand All @@ -132,7 +132,7 @@ The opacity at which the circle will be drawn.

#### Expression

Parameters: `zoom, feature`
Parameters: `zoom, feature, feature-state`

___

Expand Down Expand Up @@ -246,7 +246,7 @@ The width of the circle's stroke. Strokes are placed outside of the `circleRadiu

#### Expression

Parameters: `zoom, feature`
Parameters: `zoom, feature, feature-state`

___

Expand All @@ -264,7 +264,7 @@ The stroke color of the circle.

#### Expression

Parameters: `zoom, feature`
Parameters: `zoom, feature, feature-state`

___

Expand All @@ -288,5 +288,5 @@ The opacity of the circle's stroke.

#### Expression

Parameters: `zoom, feature`
Parameters: `zoom, feature, feature-state`

8 changes: 4 additions & 4 deletions docs/FillExtrusionLayer.md
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ The base color of the extruded fill. The extrusion's surfaces will be shaded dif

#### Expression

Parameters: `zoom, feature`
Parameters: `zoom, feature, feature-state`

___

Expand Down Expand Up @@ -151,7 +151,7 @@ Name of image in sprite to use for drawing images on extruded fills. For seamles

#### Expression

Parameters: `zoom`
Parameters: `zoom, feature`

___

Expand All @@ -175,7 +175,7 @@ The height with which to extrude this layer.

#### Expression

Parameters: `zoom, feature`
Parameters: `zoom, feature, feature-state`

___

Expand All @@ -202,5 +202,5 @@ The height with which to extrude the base of this layer. Must be less than or eq

#### Expression

Parameters: `zoom, feature`
Parameters: `zoom, feature, feature-state`

8 changes: 4 additions & 4 deletions docs/FillLayer.md
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ The opacity of the entire fill layer. In contrast to the `fillColor`, this value

#### Expression

Parameters: `zoom, feature`
Parameters: `zoom, feature, feature-state`

___

Expand All @@ -107,7 +107,7 @@ The color of the filled part of this layer. This color can be specified as `rgba

#### Expression

Parameters: `zoom, feature`
Parameters: `zoom, feature, feature-state`

___

Expand All @@ -126,7 +126,7 @@ The outline color of the fill. Matches the value of `fillColor` if unspecified.

#### Expression

Parameters: `zoom, feature`
Parameters: `zoom, feature, feature-state`

___

Expand Down Expand Up @@ -188,5 +188,5 @@ Name of image in sprite to use for drawing image fills. For seamless patterns, i

#### Expression

Parameters: `zoom`
Parameters: `zoom, feature`

34 changes: 27 additions & 7 deletions docs/LineLayer.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
* <a href="#name-12">lineBlur</a><br/>
* <a href="#name-13">lineDasharray</a><br/>
* <a href="#name-14">linePattern</a><br/>
* <a href="#name-15">lineGradient</a><br/>

___

Expand Down Expand Up @@ -159,7 +160,7 @@ The opacity at which the line will be drawn.

#### Expression

Parameters: `zoom, feature`
Parameters: `zoom, feature, feature-state`

___

Expand All @@ -180,7 +181,7 @@ The color with which the line will be drawn.

#### Expression

Parameters: `zoom, feature`
Parameters: `zoom, feature, feature-state`

___

Expand Down Expand Up @@ -252,7 +253,7 @@ Stroke thickness.
`camera`
#### Expression

Parameters: `zoom, feature`
Parameters: `zoom, feature, feature-state`

___

Expand All @@ -276,7 +277,7 @@ Draws a line casing outside of a line's actual path. Value indicates the width o

#### Expression

Parameters: `zoom, feature`
Parameters: `zoom, feature, feature-state`

___

Expand All @@ -297,7 +298,7 @@ The line's offset. For linear features, a positive value offsets the line to the

#### Expression

Parameters: `zoom, feature`
Parameters: `zoom, feature, feature-state`

___

Expand All @@ -321,7 +322,7 @@ Blur applied to the line, in pixels.

#### Expression

Parameters: `zoom, feature`
Parameters: `zoom, feature, feature-state`

___

Expand Down Expand Up @@ -362,5 +363,24 @@ Name of image in sprite to use for drawing image lines. For seamless patterns, i

#### Expression

Parameters: `zoom`
Parameters: `zoom, feature`

___

#### Name
`lineGradient`

#### Description
Defines a gradient with which to color a line feature. Can only be used with GeoJSON sources that specify `"lineMetrics": true`.

#### Type
`color`


#### Disabled By
`lineDasharray, linePattern`

#### Expression

Parameters: `line-progress`

25 changes: 24 additions & 1 deletion docs/RasterLayer.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@
* <a href="#name-4">rasterBrightnessMax</a><br/>
* <a href="#name-5">rasterSaturation</a><br/>
* <a href="#name-6">rasterContrast</a><br/>
* <a href="#name-7">rasterFadeDuration</a><br/>
* <a href="#name-7">rasterResampling</a><br/>
* <a href="#name-8">rasterFadeDuration</a><br/>

___

Expand Down Expand Up @@ -183,6 +184,28 @@ Increase or reduce the contrast of the image.
#### Maximum
`1`

#### Expression

Parameters: `zoom`

___

#### Name
`rasterResampling`

#### Description
The resampling/interpolation method to use for overscaling, also known as texture magnification filter

#### Type
`enum`
#### Default Value
`linear`

#### Supported Values
**linear** - (Bi)linear filtering interpolates pixel values using the weighted average of the four closest original source pixels creating a smooth but blurry look when overscaled<br />
**nearest** - Nearest neighbor filtering interpolates pixel values using the nearest original source pixel creating a sharp but pixelated look when overscaled<br />


#### Expression

Parameters: `zoom`
Expand Down
Loading

0 comments on commit 5eef7a6

Please sign in to comment.