Skip to content

Commit

Permalink
Updated augen scripts to run with current(old) v8.json
Browse files Browse the repository at this point in the history
  • Loading branch information
mfazekas committed May 5, 2019
1 parent 5e3b75b commit 17d23e8
Show file tree
Hide file tree
Showing 20 changed files with 1,909 additions and 699 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@
import com.mapbox.mapboxsdk.style.layers.PropertyValue;
import com.mapbox.mapboxsdk.style.layers.RasterLayer;
import com.mapbox.mapboxsdk.style.layers.SymbolLayer;
import com.mapbox.mapboxsdk.style.layers.HeatmapLayer;
import com.mapbox.mapboxsdk.style.layers.HillshadeLayer;
import com.mapbox.mapboxsdk.style.layers.TransitionOptions;
import com.mapbox.mapboxsdk.style.light.Light;
import com.mapbox.mapboxsdk.style.light.Position;
Expand Down Expand Up @@ -454,6 +456,47 @@ public static void setCircleLayerStyle(final CircleLayer layer, RCTMGLStyle styl
}
}
}
public static void setHeatmapLayerStyle(final HeatmapLayer layer, RCTMGLStyle style) {
List<String> styleKeys = style.getAllStyleKeys();

if (styleKeys.size() == 0) {
return;
}

for (String styleKey : styleKeys) {
final RCTMGLStyleValue styleValue = style.getStyleValueForKey(styleKey);

switch (styleKey) {
case "visibility":
RCTMGLStyleFactory.setVisibility(layer, styleValue);
break;
case "heatmapRadius":
RCTMGLStyleFactory.setHeatmapRadius(layer, styleValue);
break;
case "heatmapRadiusTransition":
RCTMGLStyleFactory.setHeatmapRadiusTransition(layer, styleValue);
break;
case "heatmapWeight":
RCTMGLStyleFactory.setHeatmapWeight(layer, styleValue);
break;
case "heatmapIntensity":
RCTMGLStyleFactory.setHeatmapIntensity(layer, styleValue);
break;
case "heatmapIntensityTransition":
RCTMGLStyleFactory.setHeatmapIntensityTransition(layer, styleValue);
break;
case "heatmapColor":
RCTMGLStyleFactory.setHeatmapColor(layer, styleValue);
break;
case "heatmapOpacity":
RCTMGLStyleFactory.setHeatmapOpacity(layer, styleValue);
break;
case "heatmapOpacityTransition":
RCTMGLStyleFactory.setHeatmapOpacityTransition(layer, styleValue);
break;
}
}
}
public static void setFillExtrusionLayerStyle(final FillExtrusionLayer layer, RCTMGLStyle style) {
List<String> styleKeys = style.getAllStyleKeys();

Expand Down Expand Up @@ -571,6 +614,53 @@ public static void setRasterLayerStyle(final RasterLayer layer, RCTMGLStyle styl
}
}
}
public static void setHillshadeLayerStyle(final HillshadeLayer layer, RCTMGLStyle style) {
List<String> styleKeys = style.getAllStyleKeys();

if (styleKeys.size() == 0) {
return;
}

for (String styleKey : styleKeys) {
final RCTMGLStyleValue styleValue = style.getStyleValueForKey(styleKey);

switch (styleKey) {
case "visibility":
RCTMGLStyleFactory.setVisibility(layer, styleValue);
break;
case "hillshadeIlluminationDirection":
RCTMGLStyleFactory.setHillshadeIlluminationDirection(layer, styleValue);
break;
case "hillshadeIlluminationAnchor":
RCTMGLStyleFactory.setHillshadeIlluminationAnchor(layer, styleValue);
break;
case "hillshadeExaggeration":
RCTMGLStyleFactory.setHillshadeExaggeration(layer, styleValue);
break;
case "hillshadeExaggerationTransition":
RCTMGLStyleFactory.setHillshadeExaggerationTransition(layer, styleValue);
break;
case "hillshadeShadowColor":
RCTMGLStyleFactory.setHillshadeShadowColor(layer, styleValue);
break;
case "hillshadeShadowColorTransition":
RCTMGLStyleFactory.setHillshadeShadowColorTransition(layer, styleValue);
break;
case "hillshadeHighlightColor":
RCTMGLStyleFactory.setHillshadeHighlightColor(layer, styleValue);
break;
case "hillshadeHighlightColorTransition":
RCTMGLStyleFactory.setHillshadeHighlightColorTransition(layer, styleValue);
break;
case "hillshadeAccentColor":
RCTMGLStyleFactory.setHillshadeAccentColor(layer, styleValue);
break;
case "hillshadeAccentColorTransition":
RCTMGLStyleFactory.setHillshadeAccentColorTransition(layer, styleValue);
break;
}
}
}
public static void setBackgroundLayerStyle(final BackgroundLayer layer, RCTMGLStyle style) {
List<String> styleKeys = style.getAllStyleKeys();

Expand Down Expand Up @@ -1591,6 +1681,74 @@ public static void setCircleStrokeOpacityTransition(CircleLayer layer, RCTMGLSty
}
}

public static void setVisibility(HeatmapLayer layer, RCTMGLStyleValue styleValue) {
layer.setProperties(PropertyFactory.visibility(styleValue.getString(VALUE_KEY)));
}

public static void setHeatmapRadius(HeatmapLayer layer, RCTMGLStyleValue styleValue) {
if (styleValue.isExpression()) {
layer.setProperties(PropertyFactory.heatmapRadius(styleValue.getExpression()));
} else {
layer.setProperties(PropertyFactory.heatmapRadius(styleValue.getFloat(VALUE_KEY)));
}
}


public static void setHeatmapRadiusTransition(HeatmapLayer layer, RCTMGLStyleValue styleValue) {
TransitionOptions transition = styleValue.getTransition();
if (transition != null) {
layer.setHeatmapRadiusTransition(transition);
}
}

public static void setHeatmapWeight(HeatmapLayer layer, RCTMGLStyleValue styleValue) {
if (styleValue.isExpression()) {
layer.setProperties(PropertyFactory.heatmapWeight(styleValue.getExpression()));
} else {
layer.setProperties(PropertyFactory.heatmapWeight(styleValue.getFloat(VALUE_KEY)));
}
}

public static void setHeatmapIntensity(HeatmapLayer layer, RCTMGLStyleValue styleValue) {
if (styleValue.isExpression()) {
layer.setProperties(PropertyFactory.heatmapIntensity(styleValue.getExpression()));
} else {
layer.setProperties(PropertyFactory.heatmapIntensity(styleValue.getFloat(VALUE_KEY)));
}
}


public static void setHeatmapIntensityTransition(HeatmapLayer layer, RCTMGLStyleValue styleValue) {
TransitionOptions transition = styleValue.getTransition();
if (transition != null) {
layer.setHeatmapIntensityTransition(transition);
}
}

public static void setHeatmapColor(HeatmapLayer layer, RCTMGLStyleValue styleValue) {
if (styleValue.isExpression()) {
layer.setProperties(PropertyFactory.heatmapColor(styleValue.getExpression()));
} else {
layer.setProperties(PropertyFactory.heatmapColor(styleValue.getInt(VALUE_KEY)));
}
}

public static void setHeatmapOpacity(HeatmapLayer layer, RCTMGLStyleValue styleValue) {
if (styleValue.isExpression()) {
layer.setProperties(PropertyFactory.heatmapOpacity(styleValue.getExpression()));
} else {
layer.setProperties(PropertyFactory.heatmapOpacity(styleValue.getFloat(VALUE_KEY)));
}
}


public static void setHeatmapOpacityTransition(HeatmapLayer layer, RCTMGLStyleValue styleValue) {
TransitionOptions transition = styleValue.getTransition();
if (transition != null) {
layer.setHeatmapOpacityTransition(transition);
}
}

public static void setVisibility(FillExtrusionLayer layer, RCTMGLStyleValue styleValue) {
layer.setProperties(PropertyFactory.visibility(styleValue.getString(VALUE_KEY)));
}
Expand Down Expand Up @@ -1807,6 +1965,90 @@ public static void setRasterFadeDuration(RasterLayer layer, RCTMGLStyleValue sty
}
}

public static void setVisibility(HillshadeLayer layer, RCTMGLStyleValue styleValue) {
layer.setProperties(PropertyFactory.visibility(styleValue.getString(VALUE_KEY)));
}

public static void setHillshadeIlluminationDirection(HillshadeLayer layer, RCTMGLStyleValue styleValue) {
if (styleValue.isExpression()) {
layer.setProperties(PropertyFactory.hillshadeIlluminationDirection(styleValue.getExpression()));
} else {
layer.setProperties(PropertyFactory.hillshadeIlluminationDirection(styleValue.getFloat(VALUE_KEY)));
}
}

public static void setHillshadeIlluminationAnchor(HillshadeLayer layer, RCTMGLStyleValue styleValue) {
if (styleValue.isExpression()) {
layer.setProperties(PropertyFactory.hillshadeIlluminationAnchor(styleValue.getExpression()));
} else {
layer.setProperties(PropertyFactory.hillshadeIlluminationAnchor(styleValue.getString(VALUE_KEY)));
}
}

public static void setHillshadeExaggeration(HillshadeLayer layer, RCTMGLStyleValue styleValue) {
if (styleValue.isExpression()) {
layer.setProperties(PropertyFactory.hillshadeExaggeration(styleValue.getExpression()));
} else {
layer.setProperties(PropertyFactory.hillshadeExaggeration(styleValue.getFloat(VALUE_KEY)));
}
}


public static void setHillshadeExaggerationTransition(HillshadeLayer layer, RCTMGLStyleValue styleValue) {
TransitionOptions transition = styleValue.getTransition();
if (transition != null) {
layer.setHillshadeExaggerationTransition(transition);
}
}

public static void setHillshadeShadowColor(HillshadeLayer layer, RCTMGLStyleValue styleValue) {
if (styleValue.isExpression()) {
layer.setProperties(PropertyFactory.hillshadeShadowColor(styleValue.getExpression()));
} else {
layer.setProperties(PropertyFactory.hillshadeShadowColor(styleValue.getInt(VALUE_KEY)));
}
}


public static void setHillshadeShadowColorTransition(HillshadeLayer layer, RCTMGLStyleValue styleValue) {
TransitionOptions transition = styleValue.getTransition();
if (transition != null) {
layer.setHillshadeShadowColorTransition(transition);
}
}

public static void setHillshadeHighlightColor(HillshadeLayer layer, RCTMGLStyleValue styleValue) {
if (styleValue.isExpression()) {
layer.setProperties(PropertyFactory.hillshadeHighlightColor(styleValue.getExpression()));
} else {
layer.setProperties(PropertyFactory.hillshadeHighlightColor(styleValue.getInt(VALUE_KEY)));
}
}


public static void setHillshadeHighlightColorTransition(HillshadeLayer layer, RCTMGLStyleValue styleValue) {
TransitionOptions transition = styleValue.getTransition();
if (transition != null) {
layer.setHillshadeHighlightColorTransition(transition);
}
}

public static void setHillshadeAccentColor(HillshadeLayer layer, RCTMGLStyleValue styleValue) {
if (styleValue.isExpression()) {
layer.setProperties(PropertyFactory.hillshadeAccentColor(styleValue.getExpression()));
} else {
layer.setProperties(PropertyFactory.hillshadeAccentColor(styleValue.getInt(VALUE_KEY)));
}
}


public static void setHillshadeAccentColorTransition(HillshadeLayer layer, RCTMGLStyleValue styleValue) {
TransitionOptions transition = styleValue.getTransition();
if (transition != null) {
layer.setHillshadeAccentColorTransition(transition);
}
}

public static void setVisibility(BackgroundLayer layer, RCTMGLStyleValue styleValue) {
layer.setProperties(PropertyFactory.visibility(styleValue.getString(VALUE_KEY)));
}
Expand Down
36 changes: 36 additions & 0 deletions docs/Annotation.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
## <MapboxGL.Annotation />
###

### props
| Prop | Type | Default | Required | Description |
| ---- | :--: | :-----: | :------: | :----------: |
| id | `string` | `none` | `true` | FIX ME NO DESCRIPTION |
| animated | `bool` | `false` | `false` | FIX ME NO DESCRIPTION |
| animationDuration | `number` | `1000` | `false` | FIX ME NO DESCRIPTION |
| animationEasingFunction | `func` | `Easing.linear` | `false` | FIX ME NO DESCRIPTION |
| coordinates | `arrayOf` | `none` | `false` | FIX ME NO DESCRIPTION |
| onPress | `func` | `none` | `false` | FIX ME NO DESCRIPTION |
| icon | `union` | `none` | `false` | FIX ME NO DESCRIPTION |

### methods
#### onPress()



##### arguments
| Name | Type | Required | Description |
| ---- | :--: | :------: | :----------: |



#### symbolStyle()



##### arguments
| Name | Type | Required | Description |
| ---- | :--: | :------: | :----------: |




17 changes: 10 additions & 7 deletions docs/BackgroundLayer.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,23 +59,25 @@ The color with which the background will be drawn.
#### Disabled By
`backgroundPattern`

#### Supported Style Functions
`camera`
#### Expression

Parameters: `zoom`

___

#### Name
`backgroundPattern`

#### Description
Name of image in sprite to use for drawing an image background. For seamless patterns, image width and height must be a factor of two (2, 4, 8, ..., 512).
Name of image in sprite to use for drawing an image background. For seamless patterns, image width and height must be a factor of two (2, 4, 8, ..., 512). Note that zoomDependent expressions will be evaluated only at integer zoom levels.

#### Type
`string`


#### Supported Style Functions
`camera`
#### Expression

Parameters: `zoom`

___

Expand All @@ -97,6 +99,7 @@ The opacity at which the background will be drawn.
#### Maximum
`1`

#### Supported Style Functions
`camera`
#### Expression

Parameters: `zoom`

25 changes: 25 additions & 0 deletions docs/Camera.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
## <MapboxGL.Camera />
###

### props
| Prop | Type | Default | Required | Description |
| ---- | :--: | :-----: | :------: | :----------: |
| animationDuration | `number` | `2000` | `false` | FIX ME NO DESCRIPTION |
| animationMode | `enum` | `'easeTo'` | `false` | FIX ME NO DESCRIPTION |
| centerCoordinate | `arrayOf` | `none` | `false` | FIX ME NO DESCRIPTION |
| heading | `number` | `none` | `false` | FIX ME NO DESCRIPTION |
| pitch | `number` | `none` | `false` | FIX ME NO DESCRIPTION |
| bounds | `shape` | `none` | `false` | FIX ME NO DESCRIPTION |
| zoomLevel | `number` | `none` | `false` | FIX ME NO DESCRIPTION |
| minZoomLevel | `number` | `none` | `false` | FIX ME NO DESCRIPTION |
| maxZoomLevel | `number` | `none` | `false` | FIX ME NO DESCRIPTION |
| followUserLocation | `bool` | `none` | `false` | FIX ME NO DESCRIPTION |
| followUserMode | `enum` | `none` | `false` | FIX ME NO DESCRIPTION |
| followZoomLevel | `number` | `none` | `false` | FIX ME NO DESCRIPTION |
| followPitch | `number` | `none` | `false` | FIX ME NO DESCRIPTION |
| followHeading | `number` | `none` | `false` | FIX ME NO DESCRIPTION |
| triggerKey | `any` | `none` | `false` | FIX ME NO DESCRIPTION |
| alignment | `arrayOf` | `none` | `false` | FIX ME NO DESCRIPTION |
| isUserInteraction | `FIX ME UNKNOWN TYPE` | `false` | `false` | FIX ME NO DESCRIPTION |


Loading

0 comments on commit 17d23e8

Please sign in to comment.