Skip to content

Commit

Permalink
Merge pull request #27 from mfazekas/autgen-update
Browse files Browse the repository at this point in the history
Updated autogen scripts and ran on updated v8.json
  • Loading branch information
mfazekas authored May 6, 2019
2 parents 5e3b75b + 5eef7a6 commit 0b1513b
Show file tree
Hide file tree
Showing 23 changed files with 2,917 additions and 874 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 @@ -169,6 +171,9 @@ public void onAllImagesLoaded() {
case "linePatternTransition":
RCTMGLStyleFactory.setLinePatternTransition(layer, styleValue);
break;
case "lineGradient":
RCTMGLStyleFactory.setLineGradient(layer, styleValue);
break;
}
}
}
Expand All @@ -192,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 @@ -454,6 +462,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 @@ -565,12 +614,62 @@ 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;
}
}
}
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 @@ -935,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 @@ -959,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 @@ -1591,6 +1706,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 @@ -1799,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 All @@ -1807,6 +1998,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 |
| ---- | :--: | :------: | :----------: |




Loading

0 comments on commit 0b1513b

Please sign in to comment.