diff --git a/plugin-annotation/scripts/annotation.java.ejs b/plugin-annotation/scripts/annotation.java.ejs index 27b4680d1..095068a41 100644 --- a/plugin-annotation/scripts/annotation.java.ejs +++ b/plugin-annotation/scripts/annotation.java.ejs @@ -50,14 +50,14 @@ public class <%- camelize(type) %> extends Annotation<<%- geometryType(type) %>> void setUsedDataDrivenProperties() { <% for (const property of properties) { -%> <% if (supportsPropertyFunction(property)) { -%> - if (!(jsonObject.get(<%- camelize(type) %>Options.PROPERTY_<%- camelizeWithLeadingLowercase(property.name) %>) instanceof JsonNull)) { - annotationManager.enableDataDrivenProperty(<%- camelize(type) %>Options.PROPERTY_<%- camelizeWithLeadingLowercase(property.name) %>); + if (!(jsonObject.get(<%- camelize(type) %>Options.PROPERTY_<%- snakeCaseUpper(property.name) %>) instanceof JsonNull)) { + annotationManager.enableDataDrivenProperty(<%- camelize(type) %>Options.PROPERTY_<%- snakeCaseUpper(property.name) %>); } <% } -%> <% } -%> <% if (type === "symbol") { -%> - if (!(jsonObject.get(<%- camelize(type) %>Options.PROPERTY_zIndex) instanceof JsonNull)) { - annotationManager.enableDataDrivenProperty(<%- camelize(type) %>Options.PROPERTY_zIndex); + if (!(jsonObject.get(<%- camelize(type) %>Options.PROPERTY_Z_INDEX) instanceof JsonNull)) { + annotationManager.enableDataDrivenProperty(<%- camelize(type) %>Options.PROPERTY_Z_INDEX); } <% } -%> } @@ -174,7 +174,7 @@ public class <%- camelize(type) %> extends Annotation<<%- geometryType(type) %>> * @param index the z-index value */ public void setZIndex(int index) { - jsonObject.addProperty(<%- camelize(type) %>Options.PROPERTY_zIndex, index); + jsonObject.addProperty(<%- camelize(type) %>Options.PROPERTY_Z_INDEX, index); } /** @@ -183,7 +183,7 @@ public class <%- camelize(type) %> extends Annotation<<%- geometryType(type) %>> * @return the z-index value, 0 if not set */ public int getZIndex() { - return jsonObject.get(<%- camelize(type) %>Options.PROPERTY_zIndex).getAsInt(); + return jsonObject.get(<%- camelize(type) %>Options.PROPERTY_Z_INDEX).getAsInt(); } <% } -%> @@ -202,7 +202,7 @@ public class <%- camelize(type) %> extends Annotation<<%- geometryType(type) %>> * @return PointF value for <%- propertyType(property) %> */ public PointF get<%- camelize(property.name) %>() { - JsonArray jsonArray = jsonObject.getAsJsonArray(<%- camelize(type) %>Options.PROPERTY_<%- camelizeWithLeadingLowercase(property.name) %>); + JsonArray jsonArray = jsonObject.getAsJsonArray(<%- camelize(type) %>Options.PROPERTY_<%- snakeCaseUpper(property.name) %>); return new PointF(jsonArray.get(0).getAsFloat(), jsonArray.get(1).getAsFloat()); } @@ -221,7 +221,7 @@ public class <%- camelize(type) %> extends Annotation<<%- geometryType(type) %>> JsonArray jsonArray = new JsonArray(); jsonArray.add(pointF.x); jsonArray.add(pointF.y); - jsonObject.add(<%- camelize(type) %>Options.PROPERTY_<%- camelizeWithLeadingLowercase(property.name) %>, jsonArray); + jsonObject.add(<%- camelize(type) %>Options.PROPERTY_<%- snakeCaseUpper(property.name) %>, jsonArray); } <% } else { -%> @@ -234,7 +234,7 @@ public class <%- camelize(type) %> extends Annotation<<%- geometryType(type) %>> * @return property wrapper value around <%- propertyType(property) %> */ public <%- propertyType(property) %> get<%- camelize(property.name) %>() { - JsonArray jsonArray = jsonObject.getAsJsonArray(<%- camelize(type) %>Options.PROPERTY_<%- camelizeWithLeadingLowercase(property.name) %>); + JsonArray jsonArray = jsonObject.getAsJsonArray(<%- camelize(type) %>Options.PROPERTY_<%- snakeCaseUpper(property.name) %>); <%- propertyType(property) %> value = new <%- propertyType(property).substring(0, propertyType(property).length-1) %>jsonArray.size()]; for (int i = 0; i < jsonArray.size(); i++) { value[i] = jsonArray.get(i).getAs<%- propertyType(property).substring(0, propertyType(property).length-2) %>(); @@ -258,7 +258,7 @@ public class <%- camelize(type) %> extends Annotation<<%- geometryType(type) %>> for (<%- propertyType(property).substring(0, propertyType(property).length-2) %> element : value) { jsonArray.add(element); } - jsonObject.add(<%- camelize(type) %>Options.PROPERTY_<%- camelizeWithLeadingLowercase(property.name) %>, jsonArray); + jsonObject.add(<%- camelize(type) %>Options.PROPERTY_<%- snakeCaseUpper(property.name) %>, jsonArray); } <% } -%> <% } else if (property.type == 'color') { -%> @@ -273,7 +273,7 @@ public class <%- camelize(type) %> extends Annotation<<%- geometryType(type) %>> */ @ColorInt public int get<%- camelize(property.name) %>AsInt() { - return ColorUtils.rgbaToColor(jsonObject.get(<%- camelize(type) %>Options.PROPERTY_<%- camelizeWithLeadingLowercase(property.name) %>).getAs<%- propertyType(property) %>()); + return ColorUtils.rgbaToColor(jsonObject.get(<%- camelize(type) %>Options.PROPERTY_<%- snakeCaseUpper(property.name) %>).getAs<%- propertyType(property) %>()); } /** @@ -285,7 +285,7 @@ public class <%- camelize(type) %> extends Annotation<<%- geometryType(type) %>> * @return color value for <%- propertyType(property) %> */ public String get<%- camelize(property.name) %>() { - return jsonObject.get(<%- camelize(type) %>Options.PROPERTY_<%- camelizeWithLeadingLowercase(property.name) %>).getAs<%- propertyType(property) %>(); + return jsonObject.get(<%- camelize(type) %>Options.PROPERTY_<%- snakeCaseUpper(property.name) %>).getAs<%- propertyType(property) %>(); } /** @@ -300,7 +300,7 @@ public class <%- camelize(type) %> extends Annotation<<%- geometryType(type) %>> * @param color value for <%- propertyType(property) %> */ public void set<%- camelize(property.name) %>(@ColorInt int color) { - jsonObject.addProperty(<%- camelize(type) %>Options.PROPERTY_<%- camelizeWithLeadingLowercase(property.name) %>, ColorUtils.colorToRgbaString(color)); + jsonObject.addProperty(<%- camelize(type) %>Options.PROPERTY_<%- snakeCaseUpper(property.name) %>, ColorUtils.colorToRgbaString(color)); } /** @@ -328,7 +328,7 @@ public class <%- camelize(type) %> extends Annotation<<%- geometryType(type) %>> * @return property wrapper value around <%- propertyType(property) %> */ public <%- propertyType(property) %> get<%- camelize(property.name) %>() { - return jsonObject.get(<%- camelize(type) %>Options.PROPERTY_<%- camelizeWithLeadingLowercase(property.name) %>).getAs<%- propertyType(property) %>(); + return jsonObject.get(<%- camelize(type) %>Options.PROPERTY_<%- snakeCaseUpper(property.name) %>).getAs<%- propertyType(property) %>(); } /** @@ -343,7 +343,7 @@ public class <%- camelize(type) %> extends Annotation<<%- geometryType(type) %>> * @param value constant property value for <%- propertyType(property) %> */ public void set<%- camelize(property.name) %>(<%- propertyTypeAnnotation(property) %><%- iff(() => propertyTypeAnnotation(property), " ") %><%- propertyType(property) %> value) { - jsonObject.addProperty(<%- camelize(type) %>Options.PROPERTY_<%- camelizeWithLeadingLowercase(property.name) %>, value); + jsonObject.addProperty(<%- camelize(type) %>Options.PROPERTY_<%- snakeCaseUpper(property.name) %>, value); } <% } -%> <% } -%> diff --git a/plugin-annotation/scripts/annotation_manager.java.ejs b/plugin-annotation/scripts/annotation_manager.java.ejs index 27b924854..94a7a44ba 100644 --- a/plugin-annotation/scripts/annotation_manager.java.ejs +++ b/plugin-annotation/scripts/annotation_manager.java.ejs @@ -41,7 +41,7 @@ public class <%- camelize(type) %>Manager extends AnnotationManager<<%- camelize <% for (const property of properties) { -%> <% if (!supportsPropertyFunction(property) && property.name !== "line-gradient" && property.name !== "symbol-z-order") { -%> - private static final String PROPERTY_<%- camelizeWithLeadingLowercase(property.name) %> = "<%- property.name %>"; + private static final String PROPERTY_<%- snakeCaseUpper(property.name) %> = "<%- property.name %>"; <% } -%> <% } -%> @@ -110,11 +110,11 @@ public class <%- camelize(type) %>Manager extends AnnotationManager<<%- camelize void initializeDataDrivenPropertyMap() { <% for (const property of properties) { -%> <% if (supportsPropertyFunction(property)) { -%> - dataDrivenPropertyUsageMap.put(<%- camelize(type) %>Options.PROPERTY_<%- camelizeWithLeadingLowercase(property.name) %>, false); + dataDrivenPropertyUsageMap.put(<%- camelize(type) %>Options.PROPERTY_<%- snakeCaseUpper(property.name) %>, false); <% } -%> <% } -%> <% if (type === "symbol") { -%> - dataDrivenPropertyUsageMap.put(<%- camelize(type) %>Options.PROPERTY_zIndex, false); + dataDrivenPropertyUsageMap.put(<%- camelize(type) %>Options.PROPERTY_Z_INDEX, false); <% } -%> } @@ -123,13 +123,13 @@ public class <%- camelize(type) %>Manager extends AnnotationManager<<%- camelize switch (property) { <% for (const property of properties) { -%> <% if (supportsPropertyFunction(property)) { -%> - case <%- camelize(type) %>Options.PROPERTY_<%- camelizeWithLeadingLowercase(property.name) %>: - layer.setProperties(<%- camelizeWithLeadingLowercase(property.name) %>(get(<%- camelize(type) %>Options.PROPERTY_<%- camelizeWithLeadingLowercase(property.name) %>))); + case <%- camelize(type) %>Options.PROPERTY_<%- snakeCaseUpper(property.name) %>: + layer.setProperties(<%- camelizeWithLeadingLowercase(property.name) %>(get(<%- camelize(type) %>Options.PROPERTY_<%- snakeCaseUpper(property.name) %>))); break; <% } -%> <% } -%> <% if (type === "symbol") { -%> - case <%- camelize(type) %>Options.PROPERTY_zIndex: + case <%- camelize(type) %>Options.PROPERTY_Z_INDEX: layer.setProperties(symbolZOrder(Property.SYMBOL_Z_ORDER_SOURCE)); break; <% } -%> @@ -144,7 +144,7 @@ public class <%- camelize(type) %>Manager extends AnnotationManager<<%- camelize * All supported properties are:
<% for (const property of properties) { -%> <% if (supportsPropertyFunction(property)) { -%> - * <%- camelize(type) %>Options.PROPERTY_<%- camelizeWithLeadingLowercase(property.name) %> - <%- propertyType(property) -%>
+ * <%- camelize(type) %>Options.PROPERTY_<%- snakeCaseUpper(property.name) %> - <%- propertyType(property) -%>
<% } -%> <% } -%> * Learn more about above properties in the Style specification. @@ -171,7 +171,7 @@ public class <%- camelize(type) %>Manager extends AnnotationManager<<%- camelize * All supported properties are:
<% for (const property of properties) { -%> <% if (supportsPropertyFunction(property)) { -%> - * <%- camelize(type) %>Options.PROPERTY_<%- camelizeWithLeadingLowercase(property.name) %> - <%- propertyType(property) -%>
+ * <%- camelize(type) %>Options.PROPERTY_<%- snakeCaseUpper(property.name) %> - <%- propertyType(property) -%>
<% } -%> <% } -%> * Learn more about above properties in the Style specification. @@ -245,7 +245,7 @@ public class <%- camelize(type) %>Manager extends AnnotationManager<<%- camelize */ public void set<%- camelize(property.name) %>(<%- propertyTypeAnnotation(property) %><%- iff(() => propertyTypeAnnotation(property), "") %> <%- propertyType(property) %> value) { PropertyValue propertyValue = <%- camelizeWithLeadingLowercase(property.name) %>(value); - constantPropertyUsageMap.put(PROPERTY_<%- camelizeWithLeadingLowercase(property.name) %>, propertyValue); + constantPropertyUsageMap.put(PROPERTY_<%- snakeCaseUpper(property.name) %>, propertyValue); layer.setProperties(propertyValue); } diff --git a/plugin-annotation/scripts/annotation_options.java.ejs b/plugin-annotation/scripts/annotation_options.java.ejs index f1a07c815..5988e994e 100644 --- a/plugin-annotation/scripts/annotation_options.java.ejs +++ b/plugin-annotation/scripts/annotation_options.java.ejs @@ -43,13 +43,13 @@ public class <%- camelize(type) %>Options extends Options<<%- camelize(type) %>> <% for (const property of properties) { -%> <% if (supportsPropertyFunction(property)) { -%> - static final String PROPERTY_<%- camelizeWithLeadingLowercase(property.name) %> = "<%- property.name %>"; + static final String PROPERTY_<%- snakeCaseUpper(property.name) %> = "<%- property.name %>"; <% } -%> <% } -%> <% if (type === "symbol") { -%> - static final String PROPERTY_zIndex = "z-index"; + static final String PROPERTY_Z_INDEX = "z-index"; <% } -%> - private static final String PROPERTY_isDraggable = "is-draggable"; + private static final String PROPERTY_IS_DRAGGABLE = "is-draggable"; <% for (const property of properties) { -%> <% if (supportsPropertyFunction(property)) { -%> @@ -215,14 +215,14 @@ public class <%- camelize(type) %>Options extends Options<<%- camelize(type) %>> <% for (const property of properties) { -%> <% if (supportsPropertyFunction(property)) { -%> <% if (propertyType(property).endsWith("[]")) { -%> - jsonObject.add(PROPERTY_<%- camelizeWithLeadingLowercase(property.name) %>, convertArray(<%- camelizeWithLeadingLowercase(property.name) %>)); + jsonObject.add(PROPERTY_<%- snakeCaseUpper(property.name) %>, convertArray(<%- camelizeWithLeadingLowercase(property.name) %>)); <% } else { -%> - jsonObject.addProperty(PROPERTY_<%- camelizeWithLeadingLowercase(property.name) %>, <%- camelizeWithLeadingLowercase(property.name) %>); + jsonObject.addProperty(PROPERTY_<%- snakeCaseUpper(property.name) %>, <%- camelizeWithLeadingLowercase(property.name) %>); <% } -%> <% } -%> <% } -%> <% if (type === "symbol") { -%> - jsonObject.addProperty(PROPERTY_zIndex, zIndex); + jsonObject.addProperty(PROPERTY_Z_INDEX, zIndex); <% } -%> <%- camelize(type) %> <%- type %> = new <%- camelize(type) %>(id, annotationManager, jsonObject, geometry); <%- type %>.setDraggable(isDraggable); @@ -253,23 +253,23 @@ public class <%- camelize(type) %>Options extends Options<<%- camelize(type) %>> <% for (const property of properties) { -%> <% if (supportsPropertyFunction(property)) { -%> <% if (propertyType(property).endsWith("[]")) { -%> - if (feature.hasProperty(PROPERTY_<%- camelizeWithLeadingLowercase(property.name) %>)) { - options.<%- camelizeWithLeadingLowercase(property.name) %> = to<%- propertyType(property).slice(0, -2) -%>Array(feature.getProperty(PROPERTY_<%- camelizeWithLeadingLowercase(property.name) %>).getAsJsonArray()); + if (feature.hasProperty(PROPERTY_<%- snakeCaseUpper(property.name) %>)) { + options.<%- camelizeWithLeadingLowercase(property.name) %> = to<%- propertyType(property).slice(0, -2) -%>Array(feature.getProperty(PROPERTY_<%- snakeCaseUpper(property.name) %>).getAsJsonArray()); } <% } else { -%> - if (feature.hasProperty(PROPERTY_<%- camelizeWithLeadingLowercase(property.name) %>)) { - options.<%- camelizeWithLeadingLowercase(property.name) %> = feature.getProperty(PROPERTY_<%- camelizeWithLeadingLowercase(property.name) %>).getAs<%- propertyType(property) %>(); + if (feature.hasProperty(PROPERTY_<%- snakeCaseUpper(property.name) %>)) { + options.<%- camelizeWithLeadingLowercase(property.name) %> = feature.getProperty(PROPERTY_<%- snakeCaseUpper(property.name) %>).getAs<%- propertyType(property) %>(); } <% } -%> <% } -%> <% } -%> <% if (type === "symbol") { -%> - if (feature.hasProperty(PROPERTY_zIndex)) { - options.zIndex = feature.getProperty(PROPERTY_zIndex).getAsInt(); + if (feature.hasProperty(PROPERTY_Z_INDEX)) { + options.zIndex = feature.getProperty(PROPERTY_Z_INDEX).getAsInt(); } <% } -%> - if (feature.hasProperty(PROPERTY_isDraggable)) { - options.isDraggable = feature.getProperty(PROPERTY_isDraggable).getAsBoolean(); + if (feature.hasProperty(PROPERTY_IS_DRAGGABLE)) { + options.isDraggable = feature.getProperty(PROPERTY_IS_DRAGGABLE).getAsBoolean(); } return options; } diff --git a/plugin-annotation/src/main/java/com/mapbox/mapboxsdk/plugins/annotation/Circle.java b/plugin-annotation/src/main/java/com/mapbox/mapboxsdk/plugins/annotation/Circle.java index ea6efffe4..fac544e4c 100644 --- a/plugin-annotation/src/main/java/com/mapbox/mapboxsdk/plugins/annotation/Circle.java +++ b/plugin-annotation/src/main/java/com/mapbox/mapboxsdk/plugins/annotation/Circle.java @@ -43,26 +43,26 @@ public class Circle extends Annotation { @Override void setUsedDataDrivenProperties() { - if (!(jsonObject.get(CircleOptions.PROPERTY_circleRadius) instanceof JsonNull)) { - annotationManager.enableDataDrivenProperty(CircleOptions.PROPERTY_circleRadius); + if (!(jsonObject.get(CircleOptions.PROPERTY_CIRCLE_RADIUS) instanceof JsonNull)) { + annotationManager.enableDataDrivenProperty(CircleOptions.PROPERTY_CIRCLE_RADIUS); } - if (!(jsonObject.get(CircleOptions.PROPERTY_circleColor) instanceof JsonNull)) { - annotationManager.enableDataDrivenProperty(CircleOptions.PROPERTY_circleColor); + if (!(jsonObject.get(CircleOptions.PROPERTY_CIRCLE_COLOR) instanceof JsonNull)) { + annotationManager.enableDataDrivenProperty(CircleOptions.PROPERTY_CIRCLE_COLOR); } - if (!(jsonObject.get(CircleOptions.PROPERTY_circleBlur) instanceof JsonNull)) { - annotationManager.enableDataDrivenProperty(CircleOptions.PROPERTY_circleBlur); + if (!(jsonObject.get(CircleOptions.PROPERTY_CIRCLE_BLUR) instanceof JsonNull)) { + annotationManager.enableDataDrivenProperty(CircleOptions.PROPERTY_CIRCLE_BLUR); } - if (!(jsonObject.get(CircleOptions.PROPERTY_circleOpacity) instanceof JsonNull)) { - annotationManager.enableDataDrivenProperty(CircleOptions.PROPERTY_circleOpacity); + if (!(jsonObject.get(CircleOptions.PROPERTY_CIRCLE_OPACITY) instanceof JsonNull)) { + annotationManager.enableDataDrivenProperty(CircleOptions.PROPERTY_CIRCLE_OPACITY); } - if (!(jsonObject.get(CircleOptions.PROPERTY_circleStrokeWidth) instanceof JsonNull)) { - annotationManager.enableDataDrivenProperty(CircleOptions.PROPERTY_circleStrokeWidth); + if (!(jsonObject.get(CircleOptions.PROPERTY_CIRCLE_STROKE_WIDTH) instanceof JsonNull)) { + annotationManager.enableDataDrivenProperty(CircleOptions.PROPERTY_CIRCLE_STROKE_WIDTH); } - if (!(jsonObject.get(CircleOptions.PROPERTY_circleStrokeColor) instanceof JsonNull)) { - annotationManager.enableDataDrivenProperty(CircleOptions.PROPERTY_circleStrokeColor); + if (!(jsonObject.get(CircleOptions.PROPERTY_CIRCLE_STROKE_COLOR) instanceof JsonNull)) { + annotationManager.enableDataDrivenProperty(CircleOptions.PROPERTY_CIRCLE_STROKE_COLOR); } - if (!(jsonObject.get(CircleOptions.PROPERTY_circleStrokeOpacity) instanceof JsonNull)) { - annotationManager.enableDataDrivenProperty(CircleOptions.PROPERTY_circleStrokeOpacity); + if (!(jsonObject.get(CircleOptions.PROPERTY_CIRCLE_STROKE_OPACITY) instanceof JsonNull)) { + annotationManager.enableDataDrivenProperty(CircleOptions.PROPERTY_CIRCLE_STROKE_OPACITY); } } @@ -99,7 +99,7 @@ public LatLng getLatLng() { * @return property wrapper value around Float */ public Float getCircleRadius() { - return jsonObject.get(CircleOptions.PROPERTY_circleRadius).getAsFloat(); + return jsonObject.get(CircleOptions.PROPERTY_CIRCLE_RADIUS).getAsFloat(); } /** @@ -114,7 +114,7 @@ public Float getCircleRadius() { * @param value constant property value for Float */ public void setCircleRadius(Float value) { - jsonObject.addProperty(CircleOptions.PROPERTY_circleRadius, value); + jsonObject.addProperty(CircleOptions.PROPERTY_CIRCLE_RADIUS, value); } /** @@ -127,7 +127,7 @@ public void setCircleRadius(Float value) { */ @ColorInt public int getCircleColorAsInt() { - return ColorUtils.rgbaToColor(jsonObject.get(CircleOptions.PROPERTY_circleColor).getAsString()); + return ColorUtils.rgbaToColor(jsonObject.get(CircleOptions.PROPERTY_CIRCLE_COLOR).getAsString()); } /** @@ -139,7 +139,7 @@ public int getCircleColorAsInt() { * @return color value for String */ public String getCircleColor() { - return jsonObject.get(CircleOptions.PROPERTY_circleColor).getAsString(); + return jsonObject.get(CircleOptions.PROPERTY_CIRCLE_COLOR).getAsString(); } /** @@ -154,7 +154,7 @@ public String getCircleColor() { * @param color value for String */ public void setCircleColor(@ColorInt int color) { - jsonObject.addProperty(CircleOptions.PROPERTY_circleColor, ColorUtils.colorToRgbaString(color)); + jsonObject.addProperty(CircleOptions.PROPERTY_CIRCLE_COLOR, ColorUtils.colorToRgbaString(color)); } /** @@ -181,7 +181,7 @@ public void setCircleColor(@NonNull String color) { * @return property wrapper value around Float */ public Float getCircleBlur() { - return jsonObject.get(CircleOptions.PROPERTY_circleBlur).getAsFloat(); + return jsonObject.get(CircleOptions.PROPERTY_CIRCLE_BLUR).getAsFloat(); } /** @@ -196,7 +196,7 @@ public Float getCircleBlur() { * @param value constant property value for Float */ public void setCircleBlur(Float value) { - jsonObject.addProperty(CircleOptions.PROPERTY_circleBlur, value); + jsonObject.addProperty(CircleOptions.PROPERTY_CIRCLE_BLUR, value); } /** @@ -208,7 +208,7 @@ public void setCircleBlur(Float value) { * @return property wrapper value around Float */ public Float getCircleOpacity() { - return jsonObject.get(CircleOptions.PROPERTY_circleOpacity).getAsFloat(); + return jsonObject.get(CircleOptions.PROPERTY_CIRCLE_OPACITY).getAsFloat(); } /** @@ -223,7 +223,7 @@ public Float getCircleOpacity() { * @param value constant property value for Float */ public void setCircleOpacity(Float value) { - jsonObject.addProperty(CircleOptions.PROPERTY_circleOpacity, value); + jsonObject.addProperty(CircleOptions.PROPERTY_CIRCLE_OPACITY, value); } /** @@ -235,7 +235,7 @@ public void setCircleOpacity(Float value) { * @return property wrapper value around Float */ public Float getCircleStrokeWidth() { - return jsonObject.get(CircleOptions.PROPERTY_circleStrokeWidth).getAsFloat(); + return jsonObject.get(CircleOptions.PROPERTY_CIRCLE_STROKE_WIDTH).getAsFloat(); } /** @@ -250,7 +250,7 @@ public Float getCircleStrokeWidth() { * @param value constant property value for Float */ public void setCircleStrokeWidth(Float value) { - jsonObject.addProperty(CircleOptions.PROPERTY_circleStrokeWidth, value); + jsonObject.addProperty(CircleOptions.PROPERTY_CIRCLE_STROKE_WIDTH, value); } /** @@ -263,7 +263,7 @@ public void setCircleStrokeWidth(Float value) { */ @ColorInt public int getCircleStrokeColorAsInt() { - return ColorUtils.rgbaToColor(jsonObject.get(CircleOptions.PROPERTY_circleStrokeColor).getAsString()); + return ColorUtils.rgbaToColor(jsonObject.get(CircleOptions.PROPERTY_CIRCLE_STROKE_COLOR).getAsString()); } /** @@ -275,7 +275,7 @@ public int getCircleStrokeColorAsInt() { * @return color value for String */ public String getCircleStrokeColor() { - return jsonObject.get(CircleOptions.PROPERTY_circleStrokeColor).getAsString(); + return jsonObject.get(CircleOptions.PROPERTY_CIRCLE_STROKE_COLOR).getAsString(); } /** @@ -290,7 +290,7 @@ public String getCircleStrokeColor() { * @param color value for String */ public void setCircleStrokeColor(@ColorInt int color) { - jsonObject.addProperty(CircleOptions.PROPERTY_circleStrokeColor, ColorUtils.colorToRgbaString(color)); + jsonObject.addProperty(CircleOptions.PROPERTY_CIRCLE_STROKE_COLOR, ColorUtils.colorToRgbaString(color)); } /** @@ -317,7 +317,7 @@ public void setCircleStrokeColor(@NonNull String color) { * @return property wrapper value around Float */ public Float getCircleStrokeOpacity() { - return jsonObject.get(CircleOptions.PROPERTY_circleStrokeOpacity).getAsFloat(); + return jsonObject.get(CircleOptions.PROPERTY_CIRCLE_STROKE_OPACITY).getAsFloat(); } /** @@ -332,7 +332,7 @@ public Float getCircleStrokeOpacity() { * @param value constant property value for Float */ public void setCircleStrokeOpacity(Float value) { - jsonObject.addProperty(CircleOptions.PROPERTY_circleStrokeOpacity, value); + jsonObject.addProperty(CircleOptions.PROPERTY_CIRCLE_STROKE_OPACITY, value); } @Override diff --git a/plugin-annotation/src/main/java/com/mapbox/mapboxsdk/plugins/annotation/CircleManager.java b/plugin-annotation/src/main/java/com/mapbox/mapboxsdk/plugins/annotation/CircleManager.java index bc244ea2c..a6b660ff3 100644 --- a/plugin-annotation/src/main/java/com/mapbox/mapboxsdk/plugins/annotation/CircleManager.java +++ b/plugin-annotation/src/main/java/com/mapbox/mapboxsdk/plugins/annotation/CircleManager.java @@ -34,10 +34,10 @@ public class CircleManager extends AnnotationManager * All supported properties are:
- * CircleOptions.PROPERTY_circleRadius - Float
- * CircleOptions.PROPERTY_circleColor - String
- * CircleOptions.PROPERTY_circleBlur - Float
- * CircleOptions.PROPERTY_circleOpacity - Float
- * CircleOptions.PROPERTY_circleStrokeWidth - Float
- * CircleOptions.PROPERTY_circleStrokeColor - String
- * CircleOptions.PROPERTY_circleStrokeOpacity - Float
+ * CircleOptions.PROPERTY_CIRCLE_RADIUS - Float
+ * CircleOptions.PROPERTY_CIRCLE_COLOR - String
+ * CircleOptions.PROPERTY_CIRCLE_BLUR - Float
+ * CircleOptions.PROPERTY_CIRCLE_OPACITY - Float
+ * CircleOptions.PROPERTY_CIRCLE_STROKE_WIDTH - Float
+ * CircleOptions.PROPERTY_CIRCLE_STROKE_COLOR - String
+ * CircleOptions.PROPERTY_CIRCLE_STROKE_OPACITY - Float
* Learn more about above properties in the Style specification. *

* Out of spec properties:
@@ -166,13 +166,13 @@ public List create(@NonNull String json) { * Circles are going to be created only for features with a matching geometry. *

* All supported properties are:
- * CircleOptions.PROPERTY_circleRadius - Float
- * CircleOptions.PROPERTY_circleColor - String
- * CircleOptions.PROPERTY_circleBlur - Float
- * CircleOptions.PROPERTY_circleOpacity - Float
- * CircleOptions.PROPERTY_circleStrokeWidth - Float
- * CircleOptions.PROPERTY_circleStrokeColor - String
- * CircleOptions.PROPERTY_circleStrokeOpacity - Float
+ * CircleOptions.PROPERTY_CIRCLE_RADIUS - Float
+ * CircleOptions.PROPERTY_CIRCLE_COLOR - String
+ * CircleOptions.PROPERTY_CIRCLE_BLUR - Float
+ * CircleOptions.PROPERTY_CIRCLE_OPACITY - Float
+ * CircleOptions.PROPERTY_CIRCLE_STROKE_WIDTH - Float
+ * CircleOptions.PROPERTY_CIRCLE_STROKE_COLOR - String
+ * CircleOptions.PROPERTY_CIRCLE_STROKE_OPACITY - Float
* Learn more about above properties in the Style specification. *

* Out of spec properties:
@@ -239,7 +239,7 @@ public Float[] getCircleTranslate() { */ public void setCircleTranslate( Float[] value) { PropertyValue propertyValue = circleTranslate(value); - constantPropertyUsageMap.put(PROPERTY_circleTranslate, propertyValue); + constantPropertyUsageMap.put(PROPERTY_CIRCLE_TRANSLATE, propertyValue); layer.setProperties(propertyValue); } @@ -265,7 +265,7 @@ public String getCircleTranslateAnchor() { */ public void setCircleTranslateAnchor(@Property.CIRCLE_TRANSLATE_ANCHOR String value) { PropertyValue propertyValue = circleTranslateAnchor(value); - constantPropertyUsageMap.put(PROPERTY_circleTranslateAnchor, propertyValue); + constantPropertyUsageMap.put(PROPERTY_CIRCLE_TRANSLATE_ANCHOR, propertyValue); layer.setProperties(propertyValue); } @@ -291,7 +291,7 @@ public String getCirclePitchScale() { */ public void setCirclePitchScale(@Property.CIRCLE_PITCH_SCALE String value) { PropertyValue propertyValue = circlePitchScale(value); - constantPropertyUsageMap.put(PROPERTY_circlePitchScale, propertyValue); + constantPropertyUsageMap.put(PROPERTY_CIRCLE_PITCH_SCALE, propertyValue); layer.setProperties(propertyValue); } @@ -317,7 +317,7 @@ public String getCirclePitchAlignment() { */ public void setCirclePitchAlignment(@Property.CIRCLE_PITCH_ALIGNMENT String value) { PropertyValue propertyValue = circlePitchAlignment(value); - constantPropertyUsageMap.put(PROPERTY_circlePitchAlignment, propertyValue); + constantPropertyUsageMap.put(PROPERTY_CIRCLE_PITCH_ALIGNMENT, propertyValue); layer.setProperties(propertyValue); } diff --git a/plugin-annotation/src/main/java/com/mapbox/mapboxsdk/plugins/annotation/CircleOptions.java b/plugin-annotation/src/main/java/com/mapbox/mapboxsdk/plugins/annotation/CircleOptions.java index b83488652..b9bc7c0d7 100644 --- a/plugin-annotation/src/main/java/com/mapbox/mapboxsdk/plugins/annotation/CircleOptions.java +++ b/plugin-annotation/src/main/java/com/mapbox/mapboxsdk/plugins/annotation/CircleOptions.java @@ -35,14 +35,14 @@ public class CircleOptions extends Options { private String circleStrokeColor; private Float circleStrokeOpacity; - static final String PROPERTY_circleRadius = "circle-radius"; - static final String PROPERTY_circleColor = "circle-color"; - static final String PROPERTY_circleBlur = "circle-blur"; - static final String PROPERTY_circleOpacity = "circle-opacity"; - static final String PROPERTY_circleStrokeWidth = "circle-stroke-width"; - static final String PROPERTY_circleStrokeColor = "circle-stroke-color"; - static final String PROPERTY_circleStrokeOpacity = "circle-stroke-opacity"; - private static final String PROPERTY_isDraggable = "is-draggable"; + static final String PROPERTY_CIRCLE_RADIUS = "circle-radius"; + static final String PROPERTY_CIRCLE_COLOR = "circle-color"; + static final String PROPERTY_CIRCLE_BLUR = "circle-blur"; + static final String PROPERTY_CIRCLE_OPACITY = "circle-opacity"; + static final String PROPERTY_CIRCLE_STROKE_WIDTH = "circle-stroke-width"; + static final String PROPERTY_CIRCLE_STROKE_COLOR = "circle-stroke-color"; + static final String PROPERTY_CIRCLE_STROKE_OPACITY = "circle-stroke-opacity"; + private static final String PROPERTY_IS_DRAGGABLE = "is-draggable"; /** * Set circle-radius to initialise the circle with. @@ -260,13 +260,13 @@ Circle build(long id, AnnotationManager annotationManager throw new RuntimeException("geometry field is required"); } JsonObject jsonObject = new JsonObject(); - jsonObject.addProperty(PROPERTY_circleRadius, circleRadius); - jsonObject.addProperty(PROPERTY_circleColor, circleColor); - jsonObject.addProperty(PROPERTY_circleBlur, circleBlur); - jsonObject.addProperty(PROPERTY_circleOpacity, circleOpacity); - jsonObject.addProperty(PROPERTY_circleStrokeWidth, circleStrokeWidth); - jsonObject.addProperty(PROPERTY_circleStrokeColor, circleStrokeColor); - jsonObject.addProperty(PROPERTY_circleStrokeOpacity, circleStrokeOpacity); + jsonObject.addProperty(PROPERTY_CIRCLE_RADIUS, circleRadius); + jsonObject.addProperty(PROPERTY_CIRCLE_COLOR, circleColor); + jsonObject.addProperty(PROPERTY_CIRCLE_BLUR, circleBlur); + jsonObject.addProperty(PROPERTY_CIRCLE_OPACITY, circleOpacity); + jsonObject.addProperty(PROPERTY_CIRCLE_STROKE_WIDTH, circleStrokeWidth); + jsonObject.addProperty(PROPERTY_CIRCLE_STROKE_COLOR, circleStrokeColor); + jsonObject.addProperty(PROPERTY_CIRCLE_STROKE_OPACITY, circleStrokeOpacity); Circle circle = new Circle(id, annotationManager, jsonObject, geometry); circle.setDraggable(isDraggable); return circle; @@ -288,29 +288,29 @@ static CircleOptions fromFeature(@NonNull Feature feature) { CircleOptions options = new CircleOptions(); options.geometry = (Point) feature.geometry(); - if (feature.hasProperty(PROPERTY_circleRadius)) { - options.circleRadius = feature.getProperty(PROPERTY_circleRadius).getAsFloat(); + if (feature.hasProperty(PROPERTY_CIRCLE_RADIUS)) { + options.circleRadius = feature.getProperty(PROPERTY_CIRCLE_RADIUS).getAsFloat(); } - if (feature.hasProperty(PROPERTY_circleColor)) { - options.circleColor = feature.getProperty(PROPERTY_circleColor).getAsString(); + if (feature.hasProperty(PROPERTY_CIRCLE_COLOR)) { + options.circleColor = feature.getProperty(PROPERTY_CIRCLE_COLOR).getAsString(); } - if (feature.hasProperty(PROPERTY_circleBlur)) { - options.circleBlur = feature.getProperty(PROPERTY_circleBlur).getAsFloat(); + if (feature.hasProperty(PROPERTY_CIRCLE_BLUR)) { + options.circleBlur = feature.getProperty(PROPERTY_CIRCLE_BLUR).getAsFloat(); } - if (feature.hasProperty(PROPERTY_circleOpacity)) { - options.circleOpacity = feature.getProperty(PROPERTY_circleOpacity).getAsFloat(); + if (feature.hasProperty(PROPERTY_CIRCLE_OPACITY)) { + options.circleOpacity = feature.getProperty(PROPERTY_CIRCLE_OPACITY).getAsFloat(); } - if (feature.hasProperty(PROPERTY_circleStrokeWidth)) { - options.circleStrokeWidth = feature.getProperty(PROPERTY_circleStrokeWidth).getAsFloat(); + if (feature.hasProperty(PROPERTY_CIRCLE_STROKE_WIDTH)) { + options.circleStrokeWidth = feature.getProperty(PROPERTY_CIRCLE_STROKE_WIDTH).getAsFloat(); } - if (feature.hasProperty(PROPERTY_circleStrokeColor)) { - options.circleStrokeColor = feature.getProperty(PROPERTY_circleStrokeColor).getAsString(); + if (feature.hasProperty(PROPERTY_CIRCLE_STROKE_COLOR)) { + options.circleStrokeColor = feature.getProperty(PROPERTY_CIRCLE_STROKE_COLOR).getAsString(); } - if (feature.hasProperty(PROPERTY_circleStrokeOpacity)) { - options.circleStrokeOpacity = feature.getProperty(PROPERTY_circleStrokeOpacity).getAsFloat(); + if (feature.hasProperty(PROPERTY_CIRCLE_STROKE_OPACITY)) { + options.circleStrokeOpacity = feature.getProperty(PROPERTY_CIRCLE_STROKE_OPACITY).getAsFloat(); } - if (feature.hasProperty(PROPERTY_isDraggable)) { - options.isDraggable = feature.getProperty(PROPERTY_isDraggable).getAsBoolean(); + if (feature.hasProperty(PROPERTY_IS_DRAGGABLE)) { + options.isDraggable = feature.getProperty(PROPERTY_IS_DRAGGABLE).getAsBoolean(); } return options; } diff --git a/plugin-annotation/src/main/java/com/mapbox/mapboxsdk/plugins/annotation/Fill.java b/plugin-annotation/src/main/java/com/mapbox/mapboxsdk/plugins/annotation/Fill.java index 03d119961..9f667ac9c 100644 --- a/plugin-annotation/src/main/java/com/mapbox/mapboxsdk/plugins/annotation/Fill.java +++ b/plugin-annotation/src/main/java/com/mapbox/mapboxsdk/plugins/annotation/Fill.java @@ -43,17 +43,17 @@ public class Fill extends Annotation { @Override void setUsedDataDrivenProperties() { - if (!(jsonObject.get(FillOptions.PROPERTY_fillOpacity) instanceof JsonNull)) { - annotationManager.enableDataDrivenProperty(FillOptions.PROPERTY_fillOpacity); + if (!(jsonObject.get(FillOptions.PROPERTY_FILL_OPACITY) instanceof JsonNull)) { + annotationManager.enableDataDrivenProperty(FillOptions.PROPERTY_FILL_OPACITY); } - if (!(jsonObject.get(FillOptions.PROPERTY_fillColor) instanceof JsonNull)) { - annotationManager.enableDataDrivenProperty(FillOptions.PROPERTY_fillColor); + if (!(jsonObject.get(FillOptions.PROPERTY_FILL_COLOR) instanceof JsonNull)) { + annotationManager.enableDataDrivenProperty(FillOptions.PROPERTY_FILL_COLOR); } - if (!(jsonObject.get(FillOptions.PROPERTY_fillOutlineColor) instanceof JsonNull)) { - annotationManager.enableDataDrivenProperty(FillOptions.PROPERTY_fillOutlineColor); + if (!(jsonObject.get(FillOptions.PROPERTY_FILL_OUTLINE_COLOR) instanceof JsonNull)) { + annotationManager.enableDataDrivenProperty(FillOptions.PROPERTY_FILL_OUTLINE_COLOR); } - if (!(jsonObject.get(FillOptions.PROPERTY_fillPattern) instanceof JsonNull)) { - annotationManager.enableDataDrivenProperty(FillOptions.PROPERTY_fillPattern); + if (!(jsonObject.get(FillOptions.PROPERTY_FILL_PATTERN) instanceof JsonNull)) { + annotationManager.enableDataDrivenProperty(FillOptions.PROPERTY_FILL_PATTERN); } } @@ -110,7 +110,7 @@ public List> getLatLngs() { * @return property wrapper value around Float */ public Float getFillOpacity() { - return jsonObject.get(FillOptions.PROPERTY_fillOpacity).getAsFloat(); + return jsonObject.get(FillOptions.PROPERTY_FILL_OPACITY).getAsFloat(); } /** @@ -125,7 +125,7 @@ public Float getFillOpacity() { * @param value constant property value for Float */ public void setFillOpacity(Float value) { - jsonObject.addProperty(FillOptions.PROPERTY_fillOpacity, value); + jsonObject.addProperty(FillOptions.PROPERTY_FILL_OPACITY, value); } /** @@ -138,7 +138,7 @@ public void setFillOpacity(Float value) { */ @ColorInt public int getFillColorAsInt() { - return ColorUtils.rgbaToColor(jsonObject.get(FillOptions.PROPERTY_fillColor).getAsString()); + return ColorUtils.rgbaToColor(jsonObject.get(FillOptions.PROPERTY_FILL_COLOR).getAsString()); } /** @@ -150,7 +150,7 @@ public int getFillColorAsInt() { * @return color value for String */ public String getFillColor() { - return jsonObject.get(FillOptions.PROPERTY_fillColor).getAsString(); + return jsonObject.get(FillOptions.PROPERTY_FILL_COLOR).getAsString(); } /** @@ -165,7 +165,7 @@ public String getFillColor() { * @param color value for String */ public void setFillColor(@ColorInt int color) { - jsonObject.addProperty(FillOptions.PROPERTY_fillColor, ColorUtils.colorToRgbaString(color)); + jsonObject.addProperty(FillOptions.PROPERTY_FILL_COLOR, ColorUtils.colorToRgbaString(color)); } /** @@ -193,7 +193,7 @@ public void setFillColor(@NonNull String color) { */ @ColorInt public int getFillOutlineColorAsInt() { - return ColorUtils.rgbaToColor(jsonObject.get(FillOptions.PROPERTY_fillOutlineColor).getAsString()); + return ColorUtils.rgbaToColor(jsonObject.get(FillOptions.PROPERTY_FILL_OUTLINE_COLOR).getAsString()); } /** @@ -205,7 +205,7 @@ public int getFillOutlineColorAsInt() { * @return color value for String */ public String getFillOutlineColor() { - return jsonObject.get(FillOptions.PROPERTY_fillOutlineColor).getAsString(); + return jsonObject.get(FillOptions.PROPERTY_FILL_OUTLINE_COLOR).getAsString(); } /** @@ -220,7 +220,7 @@ public String getFillOutlineColor() { * @param color value for String */ public void setFillOutlineColor(@ColorInt int color) { - jsonObject.addProperty(FillOptions.PROPERTY_fillOutlineColor, ColorUtils.colorToRgbaString(color)); + jsonObject.addProperty(FillOptions.PROPERTY_FILL_OUTLINE_COLOR, ColorUtils.colorToRgbaString(color)); } /** @@ -247,7 +247,7 @@ public void setFillOutlineColor(@NonNull String color) { * @return property wrapper value around String */ public String getFillPattern() { - return jsonObject.get(FillOptions.PROPERTY_fillPattern).getAsString(); + return jsonObject.get(FillOptions.PROPERTY_FILL_PATTERN).getAsString(); } /** @@ -262,7 +262,7 @@ public String getFillPattern() { * @param value constant property value for String */ public void setFillPattern(String value) { - jsonObject.addProperty(FillOptions.PROPERTY_fillPattern, value); + jsonObject.addProperty(FillOptions.PROPERTY_FILL_PATTERN, value); } @Override diff --git a/plugin-annotation/src/main/java/com/mapbox/mapboxsdk/plugins/annotation/FillManager.java b/plugin-annotation/src/main/java/com/mapbox/mapboxsdk/plugins/annotation/FillManager.java index 71e663dbb..ff18385fb 100644 --- a/plugin-annotation/src/main/java/com/mapbox/mapboxsdk/plugins/annotation/FillManager.java +++ b/plugin-annotation/src/main/java/com/mapbox/mapboxsdk/plugins/annotation/FillManager.java @@ -34,9 +34,9 @@ public class FillManager extends AnnotationManager * All supported properties are:
- * FillOptions.PROPERTY_fillOpacity - Float
- * FillOptions.PROPERTY_fillColor - String
- * FillOptions.PROPERTY_fillOutlineColor - String
- * FillOptions.PROPERTY_fillPattern - String
+ * FillOptions.PROPERTY_FILL_OPACITY - Float
+ * FillOptions.PROPERTY_FILL_COLOR - String
+ * FillOptions.PROPERTY_FILL_OUTLINE_COLOR - String
+ * FillOptions.PROPERTY_FILL_PATTERN - String
* Learn more about above properties in the Style specification. *

* Out of spec properties:
@@ -150,10 +150,10 @@ public List create(@NonNull String json) { * Fills are going to be created only for features with a matching geometry. *

* All supported properties are:
- * FillOptions.PROPERTY_fillOpacity - Float
- * FillOptions.PROPERTY_fillColor - String
- * FillOptions.PROPERTY_fillOutlineColor - String
- * FillOptions.PROPERTY_fillPattern - String
+ * FillOptions.PROPERTY_FILL_OPACITY - Float
+ * FillOptions.PROPERTY_FILL_COLOR - String
+ * FillOptions.PROPERTY_FILL_OUTLINE_COLOR - String
+ * FillOptions.PROPERTY_FILL_PATTERN - String
* Learn more about above properties in the Style specification. *

* Out of spec properties:
@@ -220,7 +220,7 @@ public Boolean getFillAntialias() { */ public void setFillAntialias( Boolean value) { PropertyValue propertyValue = fillAntialias(value); - constantPropertyUsageMap.put(PROPERTY_fillAntialias, propertyValue); + constantPropertyUsageMap.put(PROPERTY_FILL_ANTIALIAS, propertyValue); layer.setProperties(propertyValue); } @@ -246,7 +246,7 @@ public Float[] getFillTranslate() { */ public void setFillTranslate( Float[] value) { PropertyValue propertyValue = fillTranslate(value); - constantPropertyUsageMap.put(PROPERTY_fillTranslate, propertyValue); + constantPropertyUsageMap.put(PROPERTY_FILL_TRANSLATE, propertyValue); layer.setProperties(propertyValue); } @@ -272,7 +272,7 @@ public String getFillTranslateAnchor() { */ public void setFillTranslateAnchor(@Property.FILL_TRANSLATE_ANCHOR String value) { PropertyValue propertyValue = fillTranslateAnchor(value); - constantPropertyUsageMap.put(PROPERTY_fillTranslateAnchor, propertyValue); + constantPropertyUsageMap.put(PROPERTY_FILL_TRANSLATE_ANCHOR, propertyValue); layer.setProperties(propertyValue); } diff --git a/plugin-annotation/src/main/java/com/mapbox/mapboxsdk/plugins/annotation/FillOptions.java b/plugin-annotation/src/main/java/com/mapbox/mapboxsdk/plugins/annotation/FillOptions.java index 11679ac2d..ad15d2b3d 100644 --- a/plugin-annotation/src/main/java/com/mapbox/mapboxsdk/plugins/annotation/FillOptions.java +++ b/plugin-annotation/src/main/java/com/mapbox/mapboxsdk/plugins/annotation/FillOptions.java @@ -32,11 +32,11 @@ public class FillOptions extends Options { private String fillOutlineColor; private String fillPattern; - static final String PROPERTY_fillOpacity = "fill-opacity"; - static final String PROPERTY_fillColor = "fill-color"; - static final String PROPERTY_fillOutlineColor = "fill-outline-color"; - static final String PROPERTY_fillPattern = "fill-pattern"; - private static final String PROPERTY_isDraggable = "is-draggable"; + static final String PROPERTY_FILL_OPACITY = "fill-opacity"; + static final String PROPERTY_FILL_COLOR = "fill-color"; + static final String PROPERTY_FILL_OUTLINE_COLOR = "fill-outline-color"; + static final String PROPERTY_FILL_PATTERN = "fill-pattern"; + private static final String PROPERTY_IS_DRAGGABLE = "is-draggable"; /** * Set fill-opacity to initialise the fill with. @@ -190,10 +190,10 @@ Fill build(long id, AnnotationManager annotationManager) { throw new RuntimeException("geometry field is required"); } JsonObject jsonObject = new JsonObject(); - jsonObject.addProperty(PROPERTY_fillOpacity, fillOpacity); - jsonObject.addProperty(PROPERTY_fillColor, fillColor); - jsonObject.addProperty(PROPERTY_fillOutlineColor, fillOutlineColor); - jsonObject.addProperty(PROPERTY_fillPattern, fillPattern); + jsonObject.addProperty(PROPERTY_FILL_OPACITY, fillOpacity); + jsonObject.addProperty(PROPERTY_FILL_COLOR, fillColor); + jsonObject.addProperty(PROPERTY_FILL_OUTLINE_COLOR, fillOutlineColor); + jsonObject.addProperty(PROPERTY_FILL_PATTERN, fillPattern); Fill fill = new Fill(id, annotationManager, jsonObject, geometry); fill.setDraggable(isDraggable); return fill; @@ -214,20 +214,20 @@ static FillOptions fromFeature(@NonNull Feature feature) { FillOptions options = new FillOptions(); options.geometry = (Polygon) feature.geometry(); - if (feature.hasProperty(PROPERTY_fillOpacity)) { - options.fillOpacity = feature.getProperty(PROPERTY_fillOpacity).getAsFloat(); + if (feature.hasProperty(PROPERTY_FILL_OPACITY)) { + options.fillOpacity = feature.getProperty(PROPERTY_FILL_OPACITY).getAsFloat(); } - if (feature.hasProperty(PROPERTY_fillColor)) { - options.fillColor = feature.getProperty(PROPERTY_fillColor).getAsString(); + if (feature.hasProperty(PROPERTY_FILL_COLOR)) { + options.fillColor = feature.getProperty(PROPERTY_FILL_COLOR).getAsString(); } - if (feature.hasProperty(PROPERTY_fillOutlineColor)) { - options.fillOutlineColor = feature.getProperty(PROPERTY_fillOutlineColor).getAsString(); + if (feature.hasProperty(PROPERTY_FILL_OUTLINE_COLOR)) { + options.fillOutlineColor = feature.getProperty(PROPERTY_FILL_OUTLINE_COLOR).getAsString(); } - if (feature.hasProperty(PROPERTY_fillPattern)) { - options.fillPattern = feature.getProperty(PROPERTY_fillPattern).getAsString(); + if (feature.hasProperty(PROPERTY_FILL_PATTERN)) { + options.fillPattern = feature.getProperty(PROPERTY_FILL_PATTERN).getAsString(); } - if (feature.hasProperty(PROPERTY_isDraggable)) { - options.isDraggable = feature.getProperty(PROPERTY_isDraggable).getAsBoolean(); + if (feature.hasProperty(PROPERTY_IS_DRAGGABLE)) { + options.isDraggable = feature.getProperty(PROPERTY_IS_DRAGGABLE).getAsBoolean(); } return options; } diff --git a/plugin-annotation/src/main/java/com/mapbox/mapboxsdk/plugins/annotation/Line.java b/plugin-annotation/src/main/java/com/mapbox/mapboxsdk/plugins/annotation/Line.java index 394c9bb64..89228ec6b 100644 --- a/plugin-annotation/src/main/java/com/mapbox/mapboxsdk/plugins/annotation/Line.java +++ b/plugin-annotation/src/main/java/com/mapbox/mapboxsdk/plugins/annotation/Line.java @@ -43,29 +43,29 @@ public class Line extends Annotation { @Override void setUsedDataDrivenProperties() { - if (!(jsonObject.get(LineOptions.PROPERTY_lineJoin) instanceof JsonNull)) { - annotationManager.enableDataDrivenProperty(LineOptions.PROPERTY_lineJoin); + if (!(jsonObject.get(LineOptions.PROPERTY_LINE_JOIN) instanceof JsonNull)) { + annotationManager.enableDataDrivenProperty(LineOptions.PROPERTY_LINE_JOIN); } - if (!(jsonObject.get(LineOptions.PROPERTY_lineOpacity) instanceof JsonNull)) { - annotationManager.enableDataDrivenProperty(LineOptions.PROPERTY_lineOpacity); + if (!(jsonObject.get(LineOptions.PROPERTY_LINE_OPACITY) instanceof JsonNull)) { + annotationManager.enableDataDrivenProperty(LineOptions.PROPERTY_LINE_OPACITY); } - if (!(jsonObject.get(LineOptions.PROPERTY_lineColor) instanceof JsonNull)) { - annotationManager.enableDataDrivenProperty(LineOptions.PROPERTY_lineColor); + if (!(jsonObject.get(LineOptions.PROPERTY_LINE_COLOR) instanceof JsonNull)) { + annotationManager.enableDataDrivenProperty(LineOptions.PROPERTY_LINE_COLOR); } - if (!(jsonObject.get(LineOptions.PROPERTY_lineWidth) instanceof JsonNull)) { - annotationManager.enableDataDrivenProperty(LineOptions.PROPERTY_lineWidth); + if (!(jsonObject.get(LineOptions.PROPERTY_LINE_WIDTH) instanceof JsonNull)) { + annotationManager.enableDataDrivenProperty(LineOptions.PROPERTY_LINE_WIDTH); } - if (!(jsonObject.get(LineOptions.PROPERTY_lineGapWidth) instanceof JsonNull)) { - annotationManager.enableDataDrivenProperty(LineOptions.PROPERTY_lineGapWidth); + if (!(jsonObject.get(LineOptions.PROPERTY_LINE_GAP_WIDTH) instanceof JsonNull)) { + annotationManager.enableDataDrivenProperty(LineOptions.PROPERTY_LINE_GAP_WIDTH); } - if (!(jsonObject.get(LineOptions.PROPERTY_lineOffset) instanceof JsonNull)) { - annotationManager.enableDataDrivenProperty(LineOptions.PROPERTY_lineOffset); + if (!(jsonObject.get(LineOptions.PROPERTY_LINE_OFFSET) instanceof JsonNull)) { + annotationManager.enableDataDrivenProperty(LineOptions.PROPERTY_LINE_OFFSET); } - if (!(jsonObject.get(LineOptions.PROPERTY_lineBlur) instanceof JsonNull)) { - annotationManager.enableDataDrivenProperty(LineOptions.PROPERTY_lineBlur); + if (!(jsonObject.get(LineOptions.PROPERTY_LINE_BLUR) instanceof JsonNull)) { + annotationManager.enableDataDrivenProperty(LineOptions.PROPERTY_LINE_BLUR); } - if (!(jsonObject.get(LineOptions.PROPERTY_linePattern) instanceof JsonNull)) { - annotationManager.enableDataDrivenProperty(LineOptions.PROPERTY_linePattern); + if (!(jsonObject.get(LineOptions.PROPERTY_LINE_PATTERN) instanceof JsonNull)) { + annotationManager.enableDataDrivenProperty(LineOptions.PROPERTY_LINE_PATTERN); } } @@ -111,7 +111,7 @@ public List getLatLngs() { * @return property wrapper value around String */ public String getLineJoin() { - return jsonObject.get(LineOptions.PROPERTY_lineJoin).getAsString(); + return jsonObject.get(LineOptions.PROPERTY_LINE_JOIN).getAsString(); } /** @@ -126,7 +126,7 @@ public String getLineJoin() { * @param value constant property value for String */ public void setLineJoin(@Property.LINE_JOIN String value) { - jsonObject.addProperty(LineOptions.PROPERTY_lineJoin, value); + jsonObject.addProperty(LineOptions.PROPERTY_LINE_JOIN, value); } /** @@ -138,7 +138,7 @@ public void setLineJoin(@Property.LINE_JOIN String value) { * @return property wrapper value around Float */ public Float getLineOpacity() { - return jsonObject.get(LineOptions.PROPERTY_lineOpacity).getAsFloat(); + return jsonObject.get(LineOptions.PROPERTY_LINE_OPACITY).getAsFloat(); } /** @@ -153,7 +153,7 @@ public Float getLineOpacity() { * @param value constant property value for Float */ public void setLineOpacity(Float value) { - jsonObject.addProperty(LineOptions.PROPERTY_lineOpacity, value); + jsonObject.addProperty(LineOptions.PROPERTY_LINE_OPACITY, value); } /** @@ -166,7 +166,7 @@ public void setLineOpacity(Float value) { */ @ColorInt public int getLineColorAsInt() { - return ColorUtils.rgbaToColor(jsonObject.get(LineOptions.PROPERTY_lineColor).getAsString()); + return ColorUtils.rgbaToColor(jsonObject.get(LineOptions.PROPERTY_LINE_COLOR).getAsString()); } /** @@ -178,7 +178,7 @@ public int getLineColorAsInt() { * @return color value for String */ public String getLineColor() { - return jsonObject.get(LineOptions.PROPERTY_lineColor).getAsString(); + return jsonObject.get(LineOptions.PROPERTY_LINE_COLOR).getAsString(); } /** @@ -193,7 +193,7 @@ public String getLineColor() { * @param color value for String */ public void setLineColor(@ColorInt int color) { - jsonObject.addProperty(LineOptions.PROPERTY_lineColor, ColorUtils.colorToRgbaString(color)); + jsonObject.addProperty(LineOptions.PROPERTY_LINE_COLOR, ColorUtils.colorToRgbaString(color)); } /** @@ -220,7 +220,7 @@ public void setLineColor(@NonNull String color) { * @return property wrapper value around Float */ public Float getLineWidth() { - return jsonObject.get(LineOptions.PROPERTY_lineWidth).getAsFloat(); + return jsonObject.get(LineOptions.PROPERTY_LINE_WIDTH).getAsFloat(); } /** @@ -235,7 +235,7 @@ public Float getLineWidth() { * @param value constant property value for Float */ public void setLineWidth(Float value) { - jsonObject.addProperty(LineOptions.PROPERTY_lineWidth, value); + jsonObject.addProperty(LineOptions.PROPERTY_LINE_WIDTH, value); } /** @@ -247,7 +247,7 @@ public void setLineWidth(Float value) { * @return property wrapper value around Float */ public Float getLineGapWidth() { - return jsonObject.get(LineOptions.PROPERTY_lineGapWidth).getAsFloat(); + return jsonObject.get(LineOptions.PROPERTY_LINE_GAP_WIDTH).getAsFloat(); } /** @@ -262,7 +262,7 @@ public Float getLineGapWidth() { * @param value constant property value for Float */ public void setLineGapWidth(Float value) { - jsonObject.addProperty(LineOptions.PROPERTY_lineGapWidth, value); + jsonObject.addProperty(LineOptions.PROPERTY_LINE_GAP_WIDTH, value); } /** @@ -274,7 +274,7 @@ public void setLineGapWidth(Float value) { * @return property wrapper value around Float */ public Float getLineOffset() { - return jsonObject.get(LineOptions.PROPERTY_lineOffset).getAsFloat(); + return jsonObject.get(LineOptions.PROPERTY_LINE_OFFSET).getAsFloat(); } /** @@ -289,7 +289,7 @@ public Float getLineOffset() { * @param value constant property value for Float */ public void setLineOffset(Float value) { - jsonObject.addProperty(LineOptions.PROPERTY_lineOffset, value); + jsonObject.addProperty(LineOptions.PROPERTY_LINE_OFFSET, value); } /** @@ -301,7 +301,7 @@ public void setLineOffset(Float value) { * @return property wrapper value around Float */ public Float getLineBlur() { - return jsonObject.get(LineOptions.PROPERTY_lineBlur).getAsFloat(); + return jsonObject.get(LineOptions.PROPERTY_LINE_BLUR).getAsFloat(); } /** @@ -316,7 +316,7 @@ public Float getLineBlur() { * @param value constant property value for Float */ public void setLineBlur(Float value) { - jsonObject.addProperty(LineOptions.PROPERTY_lineBlur, value); + jsonObject.addProperty(LineOptions.PROPERTY_LINE_BLUR, value); } /** @@ -328,7 +328,7 @@ public void setLineBlur(Float value) { * @return property wrapper value around String */ public String getLinePattern() { - return jsonObject.get(LineOptions.PROPERTY_linePattern).getAsString(); + return jsonObject.get(LineOptions.PROPERTY_LINE_PATTERN).getAsString(); } /** @@ -343,7 +343,7 @@ public String getLinePattern() { * @param value constant property value for String */ public void setLinePattern(String value) { - jsonObject.addProperty(LineOptions.PROPERTY_linePattern, value); + jsonObject.addProperty(LineOptions.PROPERTY_LINE_PATTERN, value); } @Override diff --git a/plugin-annotation/src/main/java/com/mapbox/mapboxsdk/plugins/annotation/LineManager.java b/plugin-annotation/src/main/java/com/mapbox/mapboxsdk/plugins/annotation/LineManager.java index 494df9eed..699de7d88 100644 --- a/plugin-annotation/src/main/java/com/mapbox/mapboxsdk/plugins/annotation/LineManager.java +++ b/plugin-annotation/src/main/java/com/mapbox/mapboxsdk/plugins/annotation/LineManager.java @@ -34,12 +34,12 @@ public class LineManager extends AnnotationManager * All supported properties are:
- * LineOptions.PROPERTY_lineJoin - String
- * LineOptions.PROPERTY_lineOpacity - Float
- * LineOptions.PROPERTY_lineColor - String
- * LineOptions.PROPERTY_lineWidth - Float
- * LineOptions.PROPERTY_lineGapWidth - Float
- * LineOptions.PROPERTY_lineOffset - Float
- * LineOptions.PROPERTY_lineBlur - Float
- * LineOptions.PROPERTY_linePattern - String
+ * LineOptions.PROPERTY_LINE_JOIN - String
+ * LineOptions.PROPERTY_LINE_OPACITY - Float
+ * LineOptions.PROPERTY_LINE_COLOR - String
+ * LineOptions.PROPERTY_LINE_WIDTH - Float
+ * LineOptions.PROPERTY_LINE_GAP_WIDTH - Float
+ * LineOptions.PROPERTY_LINE_OFFSET - Float
+ * LineOptions.PROPERTY_LINE_BLUR - Float
+ * LineOptions.PROPERTY_LINE_PATTERN - String
* Learn more about above properties in the Style specification. *

* Out of spec properties:
@@ -173,14 +173,14 @@ public List create(@NonNull String json) { * Lines are going to be created only for features with a matching geometry. *

* All supported properties are:
- * LineOptions.PROPERTY_lineJoin - String
- * LineOptions.PROPERTY_lineOpacity - Float
- * LineOptions.PROPERTY_lineColor - String
- * LineOptions.PROPERTY_lineWidth - Float
- * LineOptions.PROPERTY_lineGapWidth - Float
- * LineOptions.PROPERTY_lineOffset - Float
- * LineOptions.PROPERTY_lineBlur - Float
- * LineOptions.PROPERTY_linePattern - String
+ * LineOptions.PROPERTY_LINE_JOIN - String
+ * LineOptions.PROPERTY_LINE_OPACITY - Float
+ * LineOptions.PROPERTY_LINE_COLOR - String
+ * LineOptions.PROPERTY_LINE_WIDTH - Float
+ * LineOptions.PROPERTY_LINE_GAP_WIDTH - Float
+ * LineOptions.PROPERTY_LINE_OFFSET - Float
+ * LineOptions.PROPERTY_LINE_BLUR - Float
+ * LineOptions.PROPERTY_LINE_PATTERN - String
* Learn more about above properties in the Style specification. *

* Out of spec properties:
@@ -247,7 +247,7 @@ public String getLineCap() { */ public void setLineCap(@Property.LINE_CAP String value) { PropertyValue propertyValue = lineCap(value); - constantPropertyUsageMap.put(PROPERTY_lineCap, propertyValue); + constantPropertyUsageMap.put(PROPERTY_LINE_CAP, propertyValue); layer.setProperties(propertyValue); } @@ -273,7 +273,7 @@ public Float getLineMiterLimit() { */ public void setLineMiterLimit( Float value) { PropertyValue propertyValue = lineMiterLimit(value); - constantPropertyUsageMap.put(PROPERTY_lineMiterLimit, propertyValue); + constantPropertyUsageMap.put(PROPERTY_LINE_MITER_LIMIT, propertyValue); layer.setProperties(propertyValue); } @@ -299,7 +299,7 @@ public Float getLineRoundLimit() { */ public void setLineRoundLimit( Float value) { PropertyValue propertyValue = lineRoundLimit(value); - constantPropertyUsageMap.put(PROPERTY_lineRoundLimit, propertyValue); + constantPropertyUsageMap.put(PROPERTY_LINE_ROUND_LIMIT, propertyValue); layer.setProperties(propertyValue); } @@ -325,7 +325,7 @@ public Float[] getLineTranslate() { */ public void setLineTranslate( Float[] value) { PropertyValue propertyValue = lineTranslate(value); - constantPropertyUsageMap.put(PROPERTY_lineTranslate, propertyValue); + constantPropertyUsageMap.put(PROPERTY_LINE_TRANSLATE, propertyValue); layer.setProperties(propertyValue); } @@ -351,7 +351,7 @@ public String getLineTranslateAnchor() { */ public void setLineTranslateAnchor(@Property.LINE_TRANSLATE_ANCHOR String value) { PropertyValue propertyValue = lineTranslateAnchor(value); - constantPropertyUsageMap.put(PROPERTY_lineTranslateAnchor, propertyValue); + constantPropertyUsageMap.put(PROPERTY_LINE_TRANSLATE_ANCHOR, propertyValue); layer.setProperties(propertyValue); } @@ -377,7 +377,7 @@ public Float[] getLineDasharray() { */ public void setLineDasharray( Float[] value) { PropertyValue propertyValue = lineDasharray(value); - constantPropertyUsageMap.put(PROPERTY_lineDasharray, propertyValue); + constantPropertyUsageMap.put(PROPERTY_LINE_DASHARRAY, propertyValue); layer.setProperties(propertyValue); } diff --git a/plugin-annotation/src/main/java/com/mapbox/mapboxsdk/plugins/annotation/LineOptions.java b/plugin-annotation/src/main/java/com/mapbox/mapboxsdk/plugins/annotation/LineOptions.java index 61f768abc..374fce3dd 100644 --- a/plugin-annotation/src/main/java/com/mapbox/mapboxsdk/plugins/annotation/LineOptions.java +++ b/plugin-annotation/src/main/java/com/mapbox/mapboxsdk/plugins/annotation/LineOptions.java @@ -36,15 +36,15 @@ public class LineOptions extends Options { private Float lineBlur; private String linePattern; - static final String PROPERTY_lineJoin = "line-join"; - static final String PROPERTY_lineOpacity = "line-opacity"; - static final String PROPERTY_lineColor = "line-color"; - static final String PROPERTY_lineWidth = "line-width"; - static final String PROPERTY_lineGapWidth = "line-gap-width"; - static final String PROPERTY_lineOffset = "line-offset"; - static final String PROPERTY_lineBlur = "line-blur"; - static final String PROPERTY_linePattern = "line-pattern"; - private static final String PROPERTY_isDraggable = "is-draggable"; + static final String PROPERTY_LINE_JOIN = "line-join"; + static final String PROPERTY_LINE_OPACITY = "line-opacity"; + static final String PROPERTY_LINE_COLOR = "line-color"; + static final String PROPERTY_LINE_WIDTH = "line-width"; + static final String PROPERTY_LINE_GAP_WIDTH = "line-gap-width"; + static final String PROPERTY_LINE_OFFSET = "line-offset"; + static final String PROPERTY_LINE_BLUR = "line-blur"; + static final String PROPERTY_LINE_PATTERN = "line-pattern"; + private static final String PROPERTY_IS_DRAGGABLE = "is-draggable"; /** * Set line-join to initialise the line with. @@ -290,14 +290,14 @@ Line build(long id, AnnotationManager annotationManager) { throw new RuntimeException("geometry field is required"); } JsonObject jsonObject = new JsonObject(); - jsonObject.addProperty(PROPERTY_lineJoin, lineJoin); - jsonObject.addProperty(PROPERTY_lineOpacity, lineOpacity); - jsonObject.addProperty(PROPERTY_lineColor, lineColor); - jsonObject.addProperty(PROPERTY_lineWidth, lineWidth); - jsonObject.addProperty(PROPERTY_lineGapWidth, lineGapWidth); - jsonObject.addProperty(PROPERTY_lineOffset, lineOffset); - jsonObject.addProperty(PROPERTY_lineBlur, lineBlur); - jsonObject.addProperty(PROPERTY_linePattern, linePattern); + jsonObject.addProperty(PROPERTY_LINE_JOIN, lineJoin); + jsonObject.addProperty(PROPERTY_LINE_OPACITY, lineOpacity); + jsonObject.addProperty(PROPERTY_LINE_COLOR, lineColor); + jsonObject.addProperty(PROPERTY_LINE_WIDTH, lineWidth); + jsonObject.addProperty(PROPERTY_LINE_GAP_WIDTH, lineGapWidth); + jsonObject.addProperty(PROPERTY_LINE_OFFSET, lineOffset); + jsonObject.addProperty(PROPERTY_LINE_BLUR, lineBlur); + jsonObject.addProperty(PROPERTY_LINE_PATTERN, linePattern); Line line = new Line(id, annotationManager, jsonObject, geometry); line.setDraggable(isDraggable); return line; @@ -319,32 +319,32 @@ static LineOptions fromFeature(@NonNull Feature feature) { LineOptions options = new LineOptions(); options.geometry = (LineString) feature.geometry(); - if (feature.hasProperty(PROPERTY_lineJoin)) { - options.lineJoin = feature.getProperty(PROPERTY_lineJoin).getAsString(); + if (feature.hasProperty(PROPERTY_LINE_JOIN)) { + options.lineJoin = feature.getProperty(PROPERTY_LINE_JOIN).getAsString(); } - if (feature.hasProperty(PROPERTY_lineOpacity)) { - options.lineOpacity = feature.getProperty(PROPERTY_lineOpacity).getAsFloat(); + if (feature.hasProperty(PROPERTY_LINE_OPACITY)) { + options.lineOpacity = feature.getProperty(PROPERTY_LINE_OPACITY).getAsFloat(); } - if (feature.hasProperty(PROPERTY_lineColor)) { - options.lineColor = feature.getProperty(PROPERTY_lineColor).getAsString(); + if (feature.hasProperty(PROPERTY_LINE_COLOR)) { + options.lineColor = feature.getProperty(PROPERTY_LINE_COLOR).getAsString(); } - if (feature.hasProperty(PROPERTY_lineWidth)) { - options.lineWidth = feature.getProperty(PROPERTY_lineWidth).getAsFloat(); + if (feature.hasProperty(PROPERTY_LINE_WIDTH)) { + options.lineWidth = feature.getProperty(PROPERTY_LINE_WIDTH).getAsFloat(); } - if (feature.hasProperty(PROPERTY_lineGapWidth)) { - options.lineGapWidth = feature.getProperty(PROPERTY_lineGapWidth).getAsFloat(); + if (feature.hasProperty(PROPERTY_LINE_GAP_WIDTH)) { + options.lineGapWidth = feature.getProperty(PROPERTY_LINE_GAP_WIDTH).getAsFloat(); } - if (feature.hasProperty(PROPERTY_lineOffset)) { - options.lineOffset = feature.getProperty(PROPERTY_lineOffset).getAsFloat(); + if (feature.hasProperty(PROPERTY_LINE_OFFSET)) { + options.lineOffset = feature.getProperty(PROPERTY_LINE_OFFSET).getAsFloat(); } - if (feature.hasProperty(PROPERTY_lineBlur)) { - options.lineBlur = feature.getProperty(PROPERTY_lineBlur).getAsFloat(); + if (feature.hasProperty(PROPERTY_LINE_BLUR)) { + options.lineBlur = feature.getProperty(PROPERTY_LINE_BLUR).getAsFloat(); } - if (feature.hasProperty(PROPERTY_linePattern)) { - options.linePattern = feature.getProperty(PROPERTY_linePattern).getAsString(); + if (feature.hasProperty(PROPERTY_LINE_PATTERN)) { + options.linePattern = feature.getProperty(PROPERTY_LINE_PATTERN).getAsString(); } - if (feature.hasProperty(PROPERTY_isDraggable)) { - options.isDraggable = feature.getProperty(PROPERTY_isDraggable).getAsBoolean(); + if (feature.hasProperty(PROPERTY_IS_DRAGGABLE)) { + options.isDraggable = feature.getProperty(PROPERTY_IS_DRAGGABLE).getAsBoolean(); } return options; } diff --git a/plugin-annotation/src/main/java/com/mapbox/mapboxsdk/plugins/annotation/Symbol.java b/plugin-annotation/src/main/java/com/mapbox/mapboxsdk/plugins/annotation/Symbol.java index 2b2d0708a..c6555df7b 100644 --- a/plugin-annotation/src/main/java/com/mapbox/mapboxsdk/plugins/annotation/Symbol.java +++ b/plugin-annotation/src/main/java/com/mapbox/mapboxsdk/plugins/annotation/Symbol.java @@ -43,83 +43,83 @@ public class Symbol extends Annotation { @Override void setUsedDataDrivenProperties() { - if (!(jsonObject.get(SymbolOptions.PROPERTY_iconSize) instanceof JsonNull)) { - annotationManager.enableDataDrivenProperty(SymbolOptions.PROPERTY_iconSize); + if (!(jsonObject.get(SymbolOptions.PROPERTY_ICON_SIZE) instanceof JsonNull)) { + annotationManager.enableDataDrivenProperty(SymbolOptions.PROPERTY_ICON_SIZE); } - if (!(jsonObject.get(SymbolOptions.PROPERTY_iconImage) instanceof JsonNull)) { - annotationManager.enableDataDrivenProperty(SymbolOptions.PROPERTY_iconImage); + if (!(jsonObject.get(SymbolOptions.PROPERTY_ICON_IMAGE) instanceof JsonNull)) { + annotationManager.enableDataDrivenProperty(SymbolOptions.PROPERTY_ICON_IMAGE); } - if (!(jsonObject.get(SymbolOptions.PROPERTY_iconRotate) instanceof JsonNull)) { - annotationManager.enableDataDrivenProperty(SymbolOptions.PROPERTY_iconRotate); + if (!(jsonObject.get(SymbolOptions.PROPERTY_ICON_ROTATE) instanceof JsonNull)) { + annotationManager.enableDataDrivenProperty(SymbolOptions.PROPERTY_ICON_ROTATE); } - if (!(jsonObject.get(SymbolOptions.PROPERTY_iconOffset) instanceof JsonNull)) { - annotationManager.enableDataDrivenProperty(SymbolOptions.PROPERTY_iconOffset); + if (!(jsonObject.get(SymbolOptions.PROPERTY_ICON_OFFSET) instanceof JsonNull)) { + annotationManager.enableDataDrivenProperty(SymbolOptions.PROPERTY_ICON_OFFSET); } - if (!(jsonObject.get(SymbolOptions.PROPERTY_iconAnchor) instanceof JsonNull)) { - annotationManager.enableDataDrivenProperty(SymbolOptions.PROPERTY_iconAnchor); + if (!(jsonObject.get(SymbolOptions.PROPERTY_ICON_ANCHOR) instanceof JsonNull)) { + annotationManager.enableDataDrivenProperty(SymbolOptions.PROPERTY_ICON_ANCHOR); } - if (!(jsonObject.get(SymbolOptions.PROPERTY_textField) instanceof JsonNull)) { - annotationManager.enableDataDrivenProperty(SymbolOptions.PROPERTY_textField); + if (!(jsonObject.get(SymbolOptions.PROPERTY_TEXT_FIELD) instanceof JsonNull)) { + annotationManager.enableDataDrivenProperty(SymbolOptions.PROPERTY_TEXT_FIELD); } - if (!(jsonObject.get(SymbolOptions.PROPERTY_textFont) instanceof JsonNull)) { - annotationManager.enableDataDrivenProperty(SymbolOptions.PROPERTY_textFont); + if (!(jsonObject.get(SymbolOptions.PROPERTY_TEXT_FONT) instanceof JsonNull)) { + annotationManager.enableDataDrivenProperty(SymbolOptions.PROPERTY_TEXT_FONT); } - if (!(jsonObject.get(SymbolOptions.PROPERTY_textSize) instanceof JsonNull)) { - annotationManager.enableDataDrivenProperty(SymbolOptions.PROPERTY_textSize); + if (!(jsonObject.get(SymbolOptions.PROPERTY_TEXT_SIZE) instanceof JsonNull)) { + annotationManager.enableDataDrivenProperty(SymbolOptions.PROPERTY_TEXT_SIZE); } - if (!(jsonObject.get(SymbolOptions.PROPERTY_textMaxWidth) instanceof JsonNull)) { - annotationManager.enableDataDrivenProperty(SymbolOptions.PROPERTY_textMaxWidth); + if (!(jsonObject.get(SymbolOptions.PROPERTY_TEXT_MAX_WIDTH) instanceof JsonNull)) { + annotationManager.enableDataDrivenProperty(SymbolOptions.PROPERTY_TEXT_MAX_WIDTH); } - if (!(jsonObject.get(SymbolOptions.PROPERTY_textLetterSpacing) instanceof JsonNull)) { - annotationManager.enableDataDrivenProperty(SymbolOptions.PROPERTY_textLetterSpacing); + if (!(jsonObject.get(SymbolOptions.PROPERTY_TEXT_LETTER_SPACING) instanceof JsonNull)) { + annotationManager.enableDataDrivenProperty(SymbolOptions.PROPERTY_TEXT_LETTER_SPACING); } - if (!(jsonObject.get(SymbolOptions.PROPERTY_textJustify) instanceof JsonNull)) { - annotationManager.enableDataDrivenProperty(SymbolOptions.PROPERTY_textJustify); + if (!(jsonObject.get(SymbolOptions.PROPERTY_TEXT_JUSTIFY) instanceof JsonNull)) { + annotationManager.enableDataDrivenProperty(SymbolOptions.PROPERTY_TEXT_JUSTIFY); } - if (!(jsonObject.get(SymbolOptions.PROPERTY_textAnchor) instanceof JsonNull)) { - annotationManager.enableDataDrivenProperty(SymbolOptions.PROPERTY_textAnchor); + if (!(jsonObject.get(SymbolOptions.PROPERTY_TEXT_ANCHOR) instanceof JsonNull)) { + annotationManager.enableDataDrivenProperty(SymbolOptions.PROPERTY_TEXT_ANCHOR); } - if (!(jsonObject.get(SymbolOptions.PROPERTY_textRotate) instanceof JsonNull)) { - annotationManager.enableDataDrivenProperty(SymbolOptions.PROPERTY_textRotate); + if (!(jsonObject.get(SymbolOptions.PROPERTY_TEXT_ROTATE) instanceof JsonNull)) { + annotationManager.enableDataDrivenProperty(SymbolOptions.PROPERTY_TEXT_ROTATE); } - if (!(jsonObject.get(SymbolOptions.PROPERTY_textTransform) instanceof JsonNull)) { - annotationManager.enableDataDrivenProperty(SymbolOptions.PROPERTY_textTransform); + if (!(jsonObject.get(SymbolOptions.PROPERTY_TEXT_TRANSFORM) instanceof JsonNull)) { + annotationManager.enableDataDrivenProperty(SymbolOptions.PROPERTY_TEXT_TRANSFORM); } - if (!(jsonObject.get(SymbolOptions.PROPERTY_textOffset) instanceof JsonNull)) { - annotationManager.enableDataDrivenProperty(SymbolOptions.PROPERTY_textOffset); + if (!(jsonObject.get(SymbolOptions.PROPERTY_TEXT_OFFSET) instanceof JsonNull)) { + annotationManager.enableDataDrivenProperty(SymbolOptions.PROPERTY_TEXT_OFFSET); } - if (!(jsonObject.get(SymbolOptions.PROPERTY_iconOpacity) instanceof JsonNull)) { - annotationManager.enableDataDrivenProperty(SymbolOptions.PROPERTY_iconOpacity); + if (!(jsonObject.get(SymbolOptions.PROPERTY_ICON_OPACITY) instanceof JsonNull)) { + annotationManager.enableDataDrivenProperty(SymbolOptions.PROPERTY_ICON_OPACITY); } - if (!(jsonObject.get(SymbolOptions.PROPERTY_iconColor) instanceof JsonNull)) { - annotationManager.enableDataDrivenProperty(SymbolOptions.PROPERTY_iconColor); + if (!(jsonObject.get(SymbolOptions.PROPERTY_ICON_COLOR) instanceof JsonNull)) { + annotationManager.enableDataDrivenProperty(SymbolOptions.PROPERTY_ICON_COLOR); } - if (!(jsonObject.get(SymbolOptions.PROPERTY_iconHaloColor) instanceof JsonNull)) { - annotationManager.enableDataDrivenProperty(SymbolOptions.PROPERTY_iconHaloColor); + if (!(jsonObject.get(SymbolOptions.PROPERTY_ICON_HALO_COLOR) instanceof JsonNull)) { + annotationManager.enableDataDrivenProperty(SymbolOptions.PROPERTY_ICON_HALO_COLOR); } - if (!(jsonObject.get(SymbolOptions.PROPERTY_iconHaloWidth) instanceof JsonNull)) { - annotationManager.enableDataDrivenProperty(SymbolOptions.PROPERTY_iconHaloWidth); + if (!(jsonObject.get(SymbolOptions.PROPERTY_ICON_HALO_WIDTH) instanceof JsonNull)) { + annotationManager.enableDataDrivenProperty(SymbolOptions.PROPERTY_ICON_HALO_WIDTH); } - if (!(jsonObject.get(SymbolOptions.PROPERTY_iconHaloBlur) instanceof JsonNull)) { - annotationManager.enableDataDrivenProperty(SymbolOptions.PROPERTY_iconHaloBlur); + if (!(jsonObject.get(SymbolOptions.PROPERTY_ICON_HALO_BLUR) instanceof JsonNull)) { + annotationManager.enableDataDrivenProperty(SymbolOptions.PROPERTY_ICON_HALO_BLUR); } - if (!(jsonObject.get(SymbolOptions.PROPERTY_textOpacity) instanceof JsonNull)) { - annotationManager.enableDataDrivenProperty(SymbolOptions.PROPERTY_textOpacity); + if (!(jsonObject.get(SymbolOptions.PROPERTY_TEXT_OPACITY) instanceof JsonNull)) { + annotationManager.enableDataDrivenProperty(SymbolOptions.PROPERTY_TEXT_OPACITY); } - if (!(jsonObject.get(SymbolOptions.PROPERTY_textColor) instanceof JsonNull)) { - annotationManager.enableDataDrivenProperty(SymbolOptions.PROPERTY_textColor); + if (!(jsonObject.get(SymbolOptions.PROPERTY_TEXT_COLOR) instanceof JsonNull)) { + annotationManager.enableDataDrivenProperty(SymbolOptions.PROPERTY_TEXT_COLOR); } - if (!(jsonObject.get(SymbolOptions.PROPERTY_textHaloColor) instanceof JsonNull)) { - annotationManager.enableDataDrivenProperty(SymbolOptions.PROPERTY_textHaloColor); + if (!(jsonObject.get(SymbolOptions.PROPERTY_TEXT_HALO_COLOR) instanceof JsonNull)) { + annotationManager.enableDataDrivenProperty(SymbolOptions.PROPERTY_TEXT_HALO_COLOR); } - if (!(jsonObject.get(SymbolOptions.PROPERTY_textHaloWidth) instanceof JsonNull)) { - annotationManager.enableDataDrivenProperty(SymbolOptions.PROPERTY_textHaloWidth); + if (!(jsonObject.get(SymbolOptions.PROPERTY_TEXT_HALO_WIDTH) instanceof JsonNull)) { + annotationManager.enableDataDrivenProperty(SymbolOptions.PROPERTY_TEXT_HALO_WIDTH); } - if (!(jsonObject.get(SymbolOptions.PROPERTY_textHaloBlur) instanceof JsonNull)) { - annotationManager.enableDataDrivenProperty(SymbolOptions.PROPERTY_textHaloBlur); + if (!(jsonObject.get(SymbolOptions.PROPERTY_TEXT_HALO_BLUR) instanceof JsonNull)) { + annotationManager.enableDataDrivenProperty(SymbolOptions.PROPERTY_TEXT_HALO_BLUR); } - if (!(jsonObject.get(SymbolOptions.PROPERTY_zIndex) instanceof JsonNull)) { - annotationManager.enableDataDrivenProperty(SymbolOptions.PROPERTY_zIndex); + if (!(jsonObject.get(SymbolOptions.PROPERTY_Z_INDEX) instanceof JsonNull)) { + annotationManager.enableDataDrivenProperty(SymbolOptions.PROPERTY_Z_INDEX); } } @@ -157,7 +157,7 @@ public LatLng getLatLng() { * @param index the z-index value */ public void setZIndex(int index) { - jsonObject.addProperty(SymbolOptions.PROPERTY_zIndex, index); + jsonObject.addProperty(SymbolOptions.PROPERTY_Z_INDEX, index); } /** @@ -166,7 +166,7 @@ public void setZIndex(int index) { * @return the z-index value, 0 if not set */ public int getZIndex() { - return jsonObject.get(SymbolOptions.PROPERTY_zIndex).getAsInt(); + return jsonObject.get(SymbolOptions.PROPERTY_Z_INDEX).getAsInt(); } // Property accessors @@ -180,7 +180,7 @@ public int getZIndex() { * @return property wrapper value around Float */ public Float getIconSize() { - return jsonObject.get(SymbolOptions.PROPERTY_iconSize).getAsFloat(); + return jsonObject.get(SymbolOptions.PROPERTY_ICON_SIZE).getAsFloat(); } /** @@ -195,7 +195,7 @@ public Float getIconSize() { * @param value constant property value for Float */ public void setIconSize(Float value) { - jsonObject.addProperty(SymbolOptions.PROPERTY_iconSize, value); + jsonObject.addProperty(SymbolOptions.PROPERTY_ICON_SIZE, value); } /** @@ -207,7 +207,7 @@ public void setIconSize(Float value) { * @return property wrapper value around String */ public String getIconImage() { - return jsonObject.get(SymbolOptions.PROPERTY_iconImage).getAsString(); + return jsonObject.get(SymbolOptions.PROPERTY_ICON_IMAGE).getAsString(); } /** @@ -222,7 +222,7 @@ public String getIconImage() { * @param value constant property value for String */ public void setIconImage(String value) { - jsonObject.addProperty(SymbolOptions.PROPERTY_iconImage, value); + jsonObject.addProperty(SymbolOptions.PROPERTY_ICON_IMAGE, value); } /** @@ -234,7 +234,7 @@ public void setIconImage(String value) { * @return property wrapper value around Float */ public Float getIconRotate() { - return jsonObject.get(SymbolOptions.PROPERTY_iconRotate).getAsFloat(); + return jsonObject.get(SymbolOptions.PROPERTY_ICON_ROTATE).getAsFloat(); } /** @@ -249,7 +249,7 @@ public Float getIconRotate() { * @param value constant property value for Float */ public void setIconRotate(Float value) { - jsonObject.addProperty(SymbolOptions.PROPERTY_iconRotate, value); + jsonObject.addProperty(SymbolOptions.PROPERTY_ICON_ROTATE, value); } /** @@ -261,7 +261,7 @@ public void setIconRotate(Float value) { * @return PointF value for Float[] */ public PointF getIconOffset() { - JsonArray jsonArray = jsonObject.getAsJsonArray(SymbolOptions.PROPERTY_iconOffset); + JsonArray jsonArray = jsonObject.getAsJsonArray(SymbolOptions.PROPERTY_ICON_OFFSET); return new PointF(jsonArray.get(0).getAsFloat(), jsonArray.get(1).getAsFloat()); } @@ -280,7 +280,7 @@ public void setIconOffset(PointF pointF) { JsonArray jsonArray = new JsonArray(); jsonArray.add(pointF.x); jsonArray.add(pointF.y); - jsonObject.add(SymbolOptions.PROPERTY_iconOffset, jsonArray); + jsonObject.add(SymbolOptions.PROPERTY_ICON_OFFSET, jsonArray); } /** @@ -292,7 +292,7 @@ public void setIconOffset(PointF pointF) { * @return property wrapper value around String */ public String getIconAnchor() { - return jsonObject.get(SymbolOptions.PROPERTY_iconAnchor).getAsString(); + return jsonObject.get(SymbolOptions.PROPERTY_ICON_ANCHOR).getAsString(); } /** @@ -307,7 +307,7 @@ public String getIconAnchor() { * @param value constant property value for String */ public void setIconAnchor(@Property.ICON_ANCHOR String value) { - jsonObject.addProperty(SymbolOptions.PROPERTY_iconAnchor, value); + jsonObject.addProperty(SymbolOptions.PROPERTY_ICON_ANCHOR, value); } /** @@ -319,7 +319,7 @@ public void setIconAnchor(@Property.ICON_ANCHOR String value) { * @return property wrapper value around String */ public String getTextField() { - return jsonObject.get(SymbolOptions.PROPERTY_textField).getAsString(); + return jsonObject.get(SymbolOptions.PROPERTY_TEXT_FIELD).getAsString(); } /** @@ -334,7 +334,7 @@ public String getTextField() { * @param value constant property value for String */ public void setTextField(String value) { - jsonObject.addProperty(SymbolOptions.PROPERTY_textField, value); + jsonObject.addProperty(SymbolOptions.PROPERTY_TEXT_FIELD, value); } /** @@ -346,7 +346,7 @@ public void setTextField(String value) { * @return property wrapper value around String[] */ public String[] getTextFont() { - JsonArray jsonArray = jsonObject.getAsJsonArray(SymbolOptions.PROPERTY_textFont); + JsonArray jsonArray = jsonObject.getAsJsonArray(SymbolOptions.PROPERTY_TEXT_FONT); String[] value = new String[jsonArray.size()]; for (int i = 0; i < jsonArray.size(); i++) { value[i] = jsonArray.get(i).getAsString(); @@ -370,7 +370,7 @@ public void setTextFont(String[] value) { for (String element : value) { jsonArray.add(element); } - jsonObject.add(SymbolOptions.PROPERTY_textFont, jsonArray); + jsonObject.add(SymbolOptions.PROPERTY_TEXT_FONT, jsonArray); } /** @@ -382,7 +382,7 @@ public void setTextFont(String[] value) { * @return property wrapper value around Float */ public Float getTextSize() { - return jsonObject.get(SymbolOptions.PROPERTY_textSize).getAsFloat(); + return jsonObject.get(SymbolOptions.PROPERTY_TEXT_SIZE).getAsFloat(); } /** @@ -397,7 +397,7 @@ public Float getTextSize() { * @param value constant property value for Float */ public void setTextSize(Float value) { - jsonObject.addProperty(SymbolOptions.PROPERTY_textSize, value); + jsonObject.addProperty(SymbolOptions.PROPERTY_TEXT_SIZE, value); } /** @@ -409,7 +409,7 @@ public void setTextSize(Float value) { * @return property wrapper value around Float */ public Float getTextMaxWidth() { - return jsonObject.get(SymbolOptions.PROPERTY_textMaxWidth).getAsFloat(); + return jsonObject.get(SymbolOptions.PROPERTY_TEXT_MAX_WIDTH).getAsFloat(); } /** @@ -424,7 +424,7 @@ public Float getTextMaxWidth() { * @param value constant property value for Float */ public void setTextMaxWidth(Float value) { - jsonObject.addProperty(SymbolOptions.PROPERTY_textMaxWidth, value); + jsonObject.addProperty(SymbolOptions.PROPERTY_TEXT_MAX_WIDTH, value); } /** @@ -436,7 +436,7 @@ public void setTextMaxWidth(Float value) { * @return property wrapper value around Float */ public Float getTextLetterSpacing() { - return jsonObject.get(SymbolOptions.PROPERTY_textLetterSpacing).getAsFloat(); + return jsonObject.get(SymbolOptions.PROPERTY_TEXT_LETTER_SPACING).getAsFloat(); } /** @@ -451,7 +451,7 @@ public Float getTextLetterSpacing() { * @param value constant property value for Float */ public void setTextLetterSpacing(Float value) { - jsonObject.addProperty(SymbolOptions.PROPERTY_textLetterSpacing, value); + jsonObject.addProperty(SymbolOptions.PROPERTY_TEXT_LETTER_SPACING, value); } /** @@ -463,7 +463,7 @@ public void setTextLetterSpacing(Float value) { * @return property wrapper value around String */ public String getTextJustify() { - return jsonObject.get(SymbolOptions.PROPERTY_textJustify).getAsString(); + return jsonObject.get(SymbolOptions.PROPERTY_TEXT_JUSTIFY).getAsString(); } /** @@ -478,7 +478,7 @@ public String getTextJustify() { * @param value constant property value for String */ public void setTextJustify(@Property.TEXT_JUSTIFY String value) { - jsonObject.addProperty(SymbolOptions.PROPERTY_textJustify, value); + jsonObject.addProperty(SymbolOptions.PROPERTY_TEXT_JUSTIFY, value); } /** @@ -490,7 +490,7 @@ public void setTextJustify(@Property.TEXT_JUSTIFY String value) { * @return property wrapper value around String */ public String getTextAnchor() { - return jsonObject.get(SymbolOptions.PROPERTY_textAnchor).getAsString(); + return jsonObject.get(SymbolOptions.PROPERTY_TEXT_ANCHOR).getAsString(); } /** @@ -505,7 +505,7 @@ public String getTextAnchor() { * @param value constant property value for String */ public void setTextAnchor(@Property.TEXT_ANCHOR String value) { - jsonObject.addProperty(SymbolOptions.PROPERTY_textAnchor, value); + jsonObject.addProperty(SymbolOptions.PROPERTY_TEXT_ANCHOR, value); } /** @@ -517,7 +517,7 @@ public void setTextAnchor(@Property.TEXT_ANCHOR String value) { * @return property wrapper value around Float */ public Float getTextRotate() { - return jsonObject.get(SymbolOptions.PROPERTY_textRotate).getAsFloat(); + return jsonObject.get(SymbolOptions.PROPERTY_TEXT_ROTATE).getAsFloat(); } /** @@ -532,7 +532,7 @@ public Float getTextRotate() { * @param value constant property value for Float */ public void setTextRotate(Float value) { - jsonObject.addProperty(SymbolOptions.PROPERTY_textRotate, value); + jsonObject.addProperty(SymbolOptions.PROPERTY_TEXT_ROTATE, value); } /** @@ -544,7 +544,7 @@ public void setTextRotate(Float value) { * @return property wrapper value around String */ public String getTextTransform() { - return jsonObject.get(SymbolOptions.PROPERTY_textTransform).getAsString(); + return jsonObject.get(SymbolOptions.PROPERTY_TEXT_TRANSFORM).getAsString(); } /** @@ -559,7 +559,7 @@ public String getTextTransform() { * @param value constant property value for String */ public void setTextTransform(@Property.TEXT_TRANSFORM String value) { - jsonObject.addProperty(SymbolOptions.PROPERTY_textTransform, value); + jsonObject.addProperty(SymbolOptions.PROPERTY_TEXT_TRANSFORM, value); } /** @@ -571,7 +571,7 @@ public void setTextTransform(@Property.TEXT_TRANSFORM String value) { * @return PointF value for Float[] */ public PointF getTextOffset() { - JsonArray jsonArray = jsonObject.getAsJsonArray(SymbolOptions.PROPERTY_textOffset); + JsonArray jsonArray = jsonObject.getAsJsonArray(SymbolOptions.PROPERTY_TEXT_OFFSET); return new PointF(jsonArray.get(0).getAsFloat(), jsonArray.get(1).getAsFloat()); } @@ -590,7 +590,7 @@ public void setTextOffset(PointF pointF) { JsonArray jsonArray = new JsonArray(); jsonArray.add(pointF.x); jsonArray.add(pointF.y); - jsonObject.add(SymbolOptions.PROPERTY_textOffset, jsonArray); + jsonObject.add(SymbolOptions.PROPERTY_TEXT_OFFSET, jsonArray); } /** @@ -602,7 +602,7 @@ public void setTextOffset(PointF pointF) { * @return property wrapper value around Float */ public Float getIconOpacity() { - return jsonObject.get(SymbolOptions.PROPERTY_iconOpacity).getAsFloat(); + return jsonObject.get(SymbolOptions.PROPERTY_ICON_OPACITY).getAsFloat(); } /** @@ -617,7 +617,7 @@ public Float getIconOpacity() { * @param value constant property value for Float */ public void setIconOpacity(Float value) { - jsonObject.addProperty(SymbolOptions.PROPERTY_iconOpacity, value); + jsonObject.addProperty(SymbolOptions.PROPERTY_ICON_OPACITY, value); } /** @@ -630,7 +630,7 @@ public void setIconOpacity(Float value) { */ @ColorInt public int getIconColorAsInt() { - return ColorUtils.rgbaToColor(jsonObject.get(SymbolOptions.PROPERTY_iconColor).getAsString()); + return ColorUtils.rgbaToColor(jsonObject.get(SymbolOptions.PROPERTY_ICON_COLOR).getAsString()); } /** @@ -642,7 +642,7 @@ public int getIconColorAsInt() { * @return color value for String */ public String getIconColor() { - return jsonObject.get(SymbolOptions.PROPERTY_iconColor).getAsString(); + return jsonObject.get(SymbolOptions.PROPERTY_ICON_COLOR).getAsString(); } /** @@ -657,7 +657,7 @@ public String getIconColor() { * @param color value for String */ public void setIconColor(@ColorInt int color) { - jsonObject.addProperty(SymbolOptions.PROPERTY_iconColor, ColorUtils.colorToRgbaString(color)); + jsonObject.addProperty(SymbolOptions.PROPERTY_ICON_COLOR, ColorUtils.colorToRgbaString(color)); } /** @@ -685,7 +685,7 @@ public void setIconColor(@NonNull String color) { */ @ColorInt public int getIconHaloColorAsInt() { - return ColorUtils.rgbaToColor(jsonObject.get(SymbolOptions.PROPERTY_iconHaloColor).getAsString()); + return ColorUtils.rgbaToColor(jsonObject.get(SymbolOptions.PROPERTY_ICON_HALO_COLOR).getAsString()); } /** @@ -697,7 +697,7 @@ public int getIconHaloColorAsInt() { * @return color value for String */ public String getIconHaloColor() { - return jsonObject.get(SymbolOptions.PROPERTY_iconHaloColor).getAsString(); + return jsonObject.get(SymbolOptions.PROPERTY_ICON_HALO_COLOR).getAsString(); } /** @@ -712,7 +712,7 @@ public String getIconHaloColor() { * @param color value for String */ public void setIconHaloColor(@ColorInt int color) { - jsonObject.addProperty(SymbolOptions.PROPERTY_iconHaloColor, ColorUtils.colorToRgbaString(color)); + jsonObject.addProperty(SymbolOptions.PROPERTY_ICON_HALO_COLOR, ColorUtils.colorToRgbaString(color)); } /** @@ -739,7 +739,7 @@ public void setIconHaloColor(@NonNull String color) { * @return property wrapper value around Float */ public Float getIconHaloWidth() { - return jsonObject.get(SymbolOptions.PROPERTY_iconHaloWidth).getAsFloat(); + return jsonObject.get(SymbolOptions.PROPERTY_ICON_HALO_WIDTH).getAsFloat(); } /** @@ -754,7 +754,7 @@ public Float getIconHaloWidth() { * @param value constant property value for Float */ public void setIconHaloWidth(Float value) { - jsonObject.addProperty(SymbolOptions.PROPERTY_iconHaloWidth, value); + jsonObject.addProperty(SymbolOptions.PROPERTY_ICON_HALO_WIDTH, value); } /** @@ -766,7 +766,7 @@ public void setIconHaloWidth(Float value) { * @return property wrapper value around Float */ public Float getIconHaloBlur() { - return jsonObject.get(SymbolOptions.PROPERTY_iconHaloBlur).getAsFloat(); + return jsonObject.get(SymbolOptions.PROPERTY_ICON_HALO_BLUR).getAsFloat(); } /** @@ -781,7 +781,7 @@ public Float getIconHaloBlur() { * @param value constant property value for Float */ public void setIconHaloBlur(Float value) { - jsonObject.addProperty(SymbolOptions.PROPERTY_iconHaloBlur, value); + jsonObject.addProperty(SymbolOptions.PROPERTY_ICON_HALO_BLUR, value); } /** @@ -793,7 +793,7 @@ public void setIconHaloBlur(Float value) { * @return property wrapper value around Float */ public Float getTextOpacity() { - return jsonObject.get(SymbolOptions.PROPERTY_textOpacity).getAsFloat(); + return jsonObject.get(SymbolOptions.PROPERTY_TEXT_OPACITY).getAsFloat(); } /** @@ -808,7 +808,7 @@ public Float getTextOpacity() { * @param value constant property value for Float */ public void setTextOpacity(Float value) { - jsonObject.addProperty(SymbolOptions.PROPERTY_textOpacity, value); + jsonObject.addProperty(SymbolOptions.PROPERTY_TEXT_OPACITY, value); } /** @@ -821,7 +821,7 @@ public void setTextOpacity(Float value) { */ @ColorInt public int getTextColorAsInt() { - return ColorUtils.rgbaToColor(jsonObject.get(SymbolOptions.PROPERTY_textColor).getAsString()); + return ColorUtils.rgbaToColor(jsonObject.get(SymbolOptions.PROPERTY_TEXT_COLOR).getAsString()); } /** @@ -833,7 +833,7 @@ public int getTextColorAsInt() { * @return color value for String */ public String getTextColor() { - return jsonObject.get(SymbolOptions.PROPERTY_textColor).getAsString(); + return jsonObject.get(SymbolOptions.PROPERTY_TEXT_COLOR).getAsString(); } /** @@ -848,7 +848,7 @@ public String getTextColor() { * @param color value for String */ public void setTextColor(@ColorInt int color) { - jsonObject.addProperty(SymbolOptions.PROPERTY_textColor, ColorUtils.colorToRgbaString(color)); + jsonObject.addProperty(SymbolOptions.PROPERTY_TEXT_COLOR, ColorUtils.colorToRgbaString(color)); } /** @@ -876,7 +876,7 @@ public void setTextColor(@NonNull String color) { */ @ColorInt public int getTextHaloColorAsInt() { - return ColorUtils.rgbaToColor(jsonObject.get(SymbolOptions.PROPERTY_textHaloColor).getAsString()); + return ColorUtils.rgbaToColor(jsonObject.get(SymbolOptions.PROPERTY_TEXT_HALO_COLOR).getAsString()); } /** @@ -888,7 +888,7 @@ public int getTextHaloColorAsInt() { * @return color value for String */ public String getTextHaloColor() { - return jsonObject.get(SymbolOptions.PROPERTY_textHaloColor).getAsString(); + return jsonObject.get(SymbolOptions.PROPERTY_TEXT_HALO_COLOR).getAsString(); } /** @@ -903,7 +903,7 @@ public String getTextHaloColor() { * @param color value for String */ public void setTextHaloColor(@ColorInt int color) { - jsonObject.addProperty(SymbolOptions.PROPERTY_textHaloColor, ColorUtils.colorToRgbaString(color)); + jsonObject.addProperty(SymbolOptions.PROPERTY_TEXT_HALO_COLOR, ColorUtils.colorToRgbaString(color)); } /** @@ -930,7 +930,7 @@ public void setTextHaloColor(@NonNull String color) { * @return property wrapper value around Float */ public Float getTextHaloWidth() { - return jsonObject.get(SymbolOptions.PROPERTY_textHaloWidth).getAsFloat(); + return jsonObject.get(SymbolOptions.PROPERTY_TEXT_HALO_WIDTH).getAsFloat(); } /** @@ -945,7 +945,7 @@ public Float getTextHaloWidth() { * @param value constant property value for Float */ public void setTextHaloWidth(Float value) { - jsonObject.addProperty(SymbolOptions.PROPERTY_textHaloWidth, value); + jsonObject.addProperty(SymbolOptions.PROPERTY_TEXT_HALO_WIDTH, value); } /** @@ -957,7 +957,7 @@ public void setTextHaloWidth(Float value) { * @return property wrapper value around Float */ public Float getTextHaloBlur() { - return jsonObject.get(SymbolOptions.PROPERTY_textHaloBlur).getAsFloat(); + return jsonObject.get(SymbolOptions.PROPERTY_TEXT_HALO_BLUR).getAsFloat(); } /** @@ -972,7 +972,7 @@ public Float getTextHaloBlur() { * @param value constant property value for Float */ public void setTextHaloBlur(Float value) { - jsonObject.addProperty(SymbolOptions.PROPERTY_textHaloBlur, value); + jsonObject.addProperty(SymbolOptions.PROPERTY_TEXT_HALO_BLUR, value); } @Override diff --git a/plugin-annotation/src/main/java/com/mapbox/mapboxsdk/plugins/annotation/SymbolComparator.java b/plugin-annotation/src/main/java/com/mapbox/mapboxsdk/plugins/annotation/SymbolComparator.java index 063f4ab79..1f09536a8 100644 --- a/plugin-annotation/src/main/java/com/mapbox/mapboxsdk/plugins/annotation/SymbolComparator.java +++ b/plugin-annotation/src/main/java/com/mapbox/mapboxsdk/plugins/annotation/SymbolComparator.java @@ -7,6 +7,6 @@ public class SymbolComparator implements Comparator { @Override public int compare(Feature left, Feature right) { - return left.getProperty(SymbolOptions.PROPERTY_zIndex).getAsInt() - right.getProperty(SymbolOptions.PROPERTY_zIndex).getAsInt(); + return left.getProperty(SymbolOptions.PROPERTY_Z_INDEX).getAsInt() - right.getProperty(SymbolOptions.PROPERTY_Z_INDEX).getAsInt(); } } diff --git a/plugin-annotation/src/main/java/com/mapbox/mapboxsdk/plugins/annotation/SymbolManager.java b/plugin-annotation/src/main/java/com/mapbox/mapboxsdk/plugins/annotation/SymbolManager.java index 812f743bb..d1b406a8f 100644 --- a/plugin-annotation/src/main/java/com/mapbox/mapboxsdk/plugins/annotation/SymbolManager.java +++ b/plugin-annotation/src/main/java/com/mapbox/mapboxsdk/plugins/annotation/SymbolManager.java @@ -34,31 +34,31 @@ public class SymbolManager extends AnnotationManager * All supported properties are:
- * SymbolOptions.PROPERTY_iconSize - Float
- * SymbolOptions.PROPERTY_iconImage - String
- * SymbolOptions.PROPERTY_iconRotate - Float
- * SymbolOptions.PROPERTY_iconOffset - Float[]
- * SymbolOptions.PROPERTY_iconAnchor - String
- * SymbolOptions.PROPERTY_textField - String
- * SymbolOptions.PROPERTY_textFont - String[]
- * SymbolOptions.PROPERTY_textSize - Float
- * SymbolOptions.PROPERTY_textMaxWidth - Float
- * SymbolOptions.PROPERTY_textLetterSpacing - Float
- * SymbolOptions.PROPERTY_textJustify - String
- * SymbolOptions.PROPERTY_textAnchor - String
- * SymbolOptions.PROPERTY_textRotate - Float
- * SymbolOptions.PROPERTY_textTransform - String
- * SymbolOptions.PROPERTY_textOffset - Float[]
- * SymbolOptions.PROPERTY_iconOpacity - Float
- * SymbolOptions.PROPERTY_iconColor - String
- * SymbolOptions.PROPERTY_iconHaloColor - String
- * SymbolOptions.PROPERTY_iconHaloWidth - Float
- * SymbolOptions.PROPERTY_iconHaloBlur - Float
- * SymbolOptions.PROPERTY_textOpacity - Float
- * SymbolOptions.PROPERTY_textColor - String
- * SymbolOptions.PROPERTY_textHaloColor - String
- * SymbolOptions.PROPERTY_textHaloWidth - Float
- * SymbolOptions.PROPERTY_textHaloBlur - Float
+ * SymbolOptions.PROPERTY_ICON_SIZE - Float
+ * SymbolOptions.PROPERTY_ICON_IMAGE - String
+ * SymbolOptions.PROPERTY_ICON_ROTATE - Float
+ * SymbolOptions.PROPERTY_ICON_OFFSET - Float[]
+ * SymbolOptions.PROPERTY_ICON_ANCHOR - String
+ * SymbolOptions.PROPERTY_TEXT_FIELD - String
+ * SymbolOptions.PROPERTY_TEXT_FONT - String[]
+ * SymbolOptions.PROPERTY_TEXT_SIZE - Float
+ * SymbolOptions.PROPERTY_TEXT_MAX_WIDTH - Float
+ * SymbolOptions.PROPERTY_TEXT_LETTER_SPACING - Float
+ * SymbolOptions.PROPERTY_TEXT_JUSTIFY - String
+ * SymbolOptions.PROPERTY_TEXT_ANCHOR - String
+ * SymbolOptions.PROPERTY_TEXT_ROTATE - Float
+ * SymbolOptions.PROPERTY_TEXT_TRANSFORM - String
+ * SymbolOptions.PROPERTY_TEXT_OFFSET - Float[]
+ * SymbolOptions.PROPERTY_ICON_OPACITY - Float
+ * SymbolOptions.PROPERTY_ICON_COLOR - String
+ * SymbolOptions.PROPERTY_ICON_HALO_COLOR - String
+ * SymbolOptions.PROPERTY_ICON_HALO_WIDTH - Float
+ * SymbolOptions.PROPERTY_ICON_HALO_BLUR - Float
+ * SymbolOptions.PROPERTY_TEXT_OPACITY - Float
+ * SymbolOptions.PROPERTY_TEXT_COLOR - String
+ * SymbolOptions.PROPERTY_TEXT_HALO_COLOR - String
+ * SymbolOptions.PROPERTY_TEXT_HALO_WIDTH - Float
+ * SymbolOptions.PROPERTY_TEXT_HALO_BLUR - Float
* Learn more about above properties in the Style specification. *

* Out of spec properties:
@@ -282,31 +282,31 @@ public List create(@NonNull String json) { * Symbols are going to be created only for features with a matching geometry. *

* All supported properties are:
- * SymbolOptions.PROPERTY_iconSize - Float
- * SymbolOptions.PROPERTY_iconImage - String
- * SymbolOptions.PROPERTY_iconRotate - Float
- * SymbolOptions.PROPERTY_iconOffset - Float[]
- * SymbolOptions.PROPERTY_iconAnchor - String
- * SymbolOptions.PROPERTY_textField - String
- * SymbolOptions.PROPERTY_textFont - String[]
- * SymbolOptions.PROPERTY_textSize - Float
- * SymbolOptions.PROPERTY_textMaxWidth - Float
- * SymbolOptions.PROPERTY_textLetterSpacing - Float
- * SymbolOptions.PROPERTY_textJustify - String
- * SymbolOptions.PROPERTY_textAnchor - String
- * SymbolOptions.PROPERTY_textRotate - Float
- * SymbolOptions.PROPERTY_textTransform - String
- * SymbolOptions.PROPERTY_textOffset - Float[]
- * SymbolOptions.PROPERTY_iconOpacity - Float
- * SymbolOptions.PROPERTY_iconColor - String
- * SymbolOptions.PROPERTY_iconHaloColor - String
- * SymbolOptions.PROPERTY_iconHaloWidth - Float
- * SymbolOptions.PROPERTY_iconHaloBlur - Float
- * SymbolOptions.PROPERTY_textOpacity - Float
- * SymbolOptions.PROPERTY_textColor - String
- * SymbolOptions.PROPERTY_textHaloColor - String
- * SymbolOptions.PROPERTY_textHaloWidth - Float
- * SymbolOptions.PROPERTY_textHaloBlur - Float
+ * SymbolOptions.PROPERTY_ICON_SIZE - Float
+ * SymbolOptions.PROPERTY_ICON_IMAGE - String
+ * SymbolOptions.PROPERTY_ICON_ROTATE - Float
+ * SymbolOptions.PROPERTY_ICON_OFFSET - Float[]
+ * SymbolOptions.PROPERTY_ICON_ANCHOR - String
+ * SymbolOptions.PROPERTY_TEXT_FIELD - String
+ * SymbolOptions.PROPERTY_TEXT_FONT - String[]
+ * SymbolOptions.PROPERTY_TEXT_SIZE - Float
+ * SymbolOptions.PROPERTY_TEXT_MAX_WIDTH - Float
+ * SymbolOptions.PROPERTY_TEXT_LETTER_SPACING - Float
+ * SymbolOptions.PROPERTY_TEXT_JUSTIFY - String
+ * SymbolOptions.PROPERTY_TEXT_ANCHOR - String
+ * SymbolOptions.PROPERTY_TEXT_ROTATE - Float
+ * SymbolOptions.PROPERTY_TEXT_TRANSFORM - String
+ * SymbolOptions.PROPERTY_TEXT_OFFSET - Float[]
+ * SymbolOptions.PROPERTY_ICON_OPACITY - Float
+ * SymbolOptions.PROPERTY_ICON_COLOR - String
+ * SymbolOptions.PROPERTY_ICON_HALO_COLOR - String
+ * SymbolOptions.PROPERTY_ICON_HALO_WIDTH - Float
+ * SymbolOptions.PROPERTY_ICON_HALO_BLUR - Float
+ * SymbolOptions.PROPERTY_TEXT_OPACITY - Float
+ * SymbolOptions.PROPERTY_TEXT_COLOR - String
+ * SymbolOptions.PROPERTY_TEXT_HALO_COLOR - String
+ * SymbolOptions.PROPERTY_TEXT_HALO_WIDTH - Float
+ * SymbolOptions.PROPERTY_TEXT_HALO_BLUR - Float
* Learn more about above properties in the Style specification. *

* Out of spec properties:
@@ -374,7 +374,7 @@ public String getSymbolPlacement() { */ public void setSymbolPlacement(@Property.SYMBOL_PLACEMENT String value) { PropertyValue propertyValue = symbolPlacement(value); - constantPropertyUsageMap.put(PROPERTY_symbolPlacement, propertyValue); + constantPropertyUsageMap.put(PROPERTY_SYMBOL_PLACEMENT, propertyValue); layer.setProperties(propertyValue); } @@ -400,7 +400,7 @@ public Float getSymbolSpacing() { */ public void setSymbolSpacing( Float value) { PropertyValue propertyValue = symbolSpacing(value); - constantPropertyUsageMap.put(PROPERTY_symbolSpacing, propertyValue); + constantPropertyUsageMap.put(PROPERTY_SYMBOL_SPACING, propertyValue); layer.setProperties(propertyValue); } @@ -426,7 +426,7 @@ public Boolean getSymbolAvoidEdges() { */ public void setSymbolAvoidEdges( Boolean value) { PropertyValue propertyValue = symbolAvoidEdges(value); - constantPropertyUsageMap.put(PROPERTY_symbolAvoidEdges, propertyValue); + constantPropertyUsageMap.put(PROPERTY_SYMBOL_AVOID_EDGES, propertyValue); layer.setProperties(propertyValue); } @@ -452,7 +452,7 @@ public Boolean getIconAllowOverlap() { */ public void setIconAllowOverlap( Boolean value) { PropertyValue propertyValue = iconAllowOverlap(value); - constantPropertyUsageMap.put(PROPERTY_iconAllowOverlap, propertyValue); + constantPropertyUsageMap.put(PROPERTY_ICON_ALLOW_OVERLAP, propertyValue); layer.setProperties(propertyValue); } @@ -478,7 +478,7 @@ public Boolean getIconIgnorePlacement() { */ public void setIconIgnorePlacement( Boolean value) { PropertyValue propertyValue = iconIgnorePlacement(value); - constantPropertyUsageMap.put(PROPERTY_iconIgnorePlacement, propertyValue); + constantPropertyUsageMap.put(PROPERTY_ICON_IGNORE_PLACEMENT, propertyValue); layer.setProperties(propertyValue); } @@ -504,7 +504,7 @@ public Boolean getIconOptional() { */ public void setIconOptional( Boolean value) { PropertyValue propertyValue = iconOptional(value); - constantPropertyUsageMap.put(PROPERTY_iconOptional, propertyValue); + constantPropertyUsageMap.put(PROPERTY_ICON_OPTIONAL, propertyValue); layer.setProperties(propertyValue); } @@ -530,7 +530,7 @@ public String getIconRotationAlignment() { */ public void setIconRotationAlignment(@Property.ICON_ROTATION_ALIGNMENT String value) { PropertyValue propertyValue = iconRotationAlignment(value); - constantPropertyUsageMap.put(PROPERTY_iconRotationAlignment, propertyValue); + constantPropertyUsageMap.put(PROPERTY_ICON_ROTATION_ALIGNMENT, propertyValue); layer.setProperties(propertyValue); } @@ -556,7 +556,7 @@ public String getIconTextFit() { */ public void setIconTextFit(@Property.ICON_TEXT_FIT String value) { PropertyValue propertyValue = iconTextFit(value); - constantPropertyUsageMap.put(PROPERTY_iconTextFit, propertyValue); + constantPropertyUsageMap.put(PROPERTY_ICON_TEXT_FIT, propertyValue); layer.setProperties(propertyValue); } @@ -582,7 +582,7 @@ public Float[] getIconTextFitPadding() { */ public void setIconTextFitPadding( Float[] value) { PropertyValue propertyValue = iconTextFitPadding(value); - constantPropertyUsageMap.put(PROPERTY_iconTextFitPadding, propertyValue); + constantPropertyUsageMap.put(PROPERTY_ICON_TEXT_FIT_PADDING, propertyValue); layer.setProperties(propertyValue); } @@ -608,7 +608,7 @@ public Float getIconPadding() { */ public void setIconPadding( Float value) { PropertyValue propertyValue = iconPadding(value); - constantPropertyUsageMap.put(PROPERTY_iconPadding, propertyValue); + constantPropertyUsageMap.put(PROPERTY_ICON_PADDING, propertyValue); layer.setProperties(propertyValue); } @@ -634,7 +634,7 @@ public Boolean getIconKeepUpright() { */ public void setIconKeepUpright( Boolean value) { PropertyValue propertyValue = iconKeepUpright(value); - constantPropertyUsageMap.put(PROPERTY_iconKeepUpright, propertyValue); + constantPropertyUsageMap.put(PROPERTY_ICON_KEEP_UPRIGHT, propertyValue); layer.setProperties(propertyValue); } @@ -660,7 +660,7 @@ public String getIconPitchAlignment() { */ public void setIconPitchAlignment(@Property.ICON_PITCH_ALIGNMENT String value) { PropertyValue propertyValue = iconPitchAlignment(value); - constantPropertyUsageMap.put(PROPERTY_iconPitchAlignment, propertyValue); + constantPropertyUsageMap.put(PROPERTY_ICON_PITCH_ALIGNMENT, propertyValue); layer.setProperties(propertyValue); } @@ -686,7 +686,7 @@ public String getTextPitchAlignment() { */ public void setTextPitchAlignment(@Property.TEXT_PITCH_ALIGNMENT String value) { PropertyValue propertyValue = textPitchAlignment(value); - constantPropertyUsageMap.put(PROPERTY_textPitchAlignment, propertyValue); + constantPropertyUsageMap.put(PROPERTY_TEXT_PITCH_ALIGNMENT, propertyValue); layer.setProperties(propertyValue); } @@ -712,7 +712,7 @@ public String getTextRotationAlignment() { */ public void setTextRotationAlignment(@Property.TEXT_ROTATION_ALIGNMENT String value) { PropertyValue propertyValue = textRotationAlignment(value); - constantPropertyUsageMap.put(PROPERTY_textRotationAlignment, propertyValue); + constantPropertyUsageMap.put(PROPERTY_TEXT_ROTATION_ALIGNMENT, propertyValue); layer.setProperties(propertyValue); } @@ -738,7 +738,7 @@ public Float getTextLineHeight() { */ public void setTextLineHeight( Float value) { PropertyValue propertyValue = textLineHeight(value); - constantPropertyUsageMap.put(PROPERTY_textLineHeight, propertyValue); + constantPropertyUsageMap.put(PROPERTY_TEXT_LINE_HEIGHT, propertyValue); layer.setProperties(propertyValue); } @@ -764,7 +764,7 @@ public Float getTextMaxAngle() { */ public void setTextMaxAngle( Float value) { PropertyValue propertyValue = textMaxAngle(value); - constantPropertyUsageMap.put(PROPERTY_textMaxAngle, propertyValue); + constantPropertyUsageMap.put(PROPERTY_TEXT_MAX_ANGLE, propertyValue); layer.setProperties(propertyValue); } @@ -790,7 +790,7 @@ public Float getTextPadding() { */ public void setTextPadding( Float value) { PropertyValue propertyValue = textPadding(value); - constantPropertyUsageMap.put(PROPERTY_textPadding, propertyValue); + constantPropertyUsageMap.put(PROPERTY_TEXT_PADDING, propertyValue); layer.setProperties(propertyValue); } @@ -816,7 +816,7 @@ public Boolean getTextKeepUpright() { */ public void setTextKeepUpright( Boolean value) { PropertyValue propertyValue = textKeepUpright(value); - constantPropertyUsageMap.put(PROPERTY_textKeepUpright, propertyValue); + constantPropertyUsageMap.put(PROPERTY_TEXT_KEEP_UPRIGHT, propertyValue); layer.setProperties(propertyValue); } @@ -842,7 +842,7 @@ public Boolean getTextAllowOverlap() { */ public void setTextAllowOverlap( Boolean value) { PropertyValue propertyValue = textAllowOverlap(value); - constantPropertyUsageMap.put(PROPERTY_textAllowOverlap, propertyValue); + constantPropertyUsageMap.put(PROPERTY_TEXT_ALLOW_OVERLAP, propertyValue); layer.setProperties(propertyValue); } @@ -868,7 +868,7 @@ public Boolean getTextIgnorePlacement() { */ public void setTextIgnorePlacement( Boolean value) { PropertyValue propertyValue = textIgnorePlacement(value); - constantPropertyUsageMap.put(PROPERTY_textIgnorePlacement, propertyValue); + constantPropertyUsageMap.put(PROPERTY_TEXT_IGNORE_PLACEMENT, propertyValue); layer.setProperties(propertyValue); } @@ -894,7 +894,7 @@ public Boolean getTextOptional() { */ public void setTextOptional( Boolean value) { PropertyValue propertyValue = textOptional(value); - constantPropertyUsageMap.put(PROPERTY_textOptional, propertyValue); + constantPropertyUsageMap.put(PROPERTY_TEXT_OPTIONAL, propertyValue); layer.setProperties(propertyValue); } @@ -920,7 +920,7 @@ public Float[] getIconTranslate() { */ public void setIconTranslate( Float[] value) { PropertyValue propertyValue = iconTranslate(value); - constantPropertyUsageMap.put(PROPERTY_iconTranslate, propertyValue); + constantPropertyUsageMap.put(PROPERTY_ICON_TRANSLATE, propertyValue); layer.setProperties(propertyValue); } @@ -946,7 +946,7 @@ public String getIconTranslateAnchor() { */ public void setIconTranslateAnchor(@Property.ICON_TRANSLATE_ANCHOR String value) { PropertyValue propertyValue = iconTranslateAnchor(value); - constantPropertyUsageMap.put(PROPERTY_iconTranslateAnchor, propertyValue); + constantPropertyUsageMap.put(PROPERTY_ICON_TRANSLATE_ANCHOR, propertyValue); layer.setProperties(propertyValue); } @@ -972,7 +972,7 @@ public Float[] getTextTranslate() { */ public void setTextTranslate( Float[] value) { PropertyValue propertyValue = textTranslate(value); - constantPropertyUsageMap.put(PROPERTY_textTranslate, propertyValue); + constantPropertyUsageMap.put(PROPERTY_TEXT_TRANSLATE, propertyValue); layer.setProperties(propertyValue); } @@ -998,7 +998,7 @@ public String getTextTranslateAnchor() { */ public void setTextTranslateAnchor(@Property.TEXT_TRANSLATE_ANCHOR String value) { PropertyValue propertyValue = textTranslateAnchor(value); - constantPropertyUsageMap.put(PROPERTY_textTranslateAnchor, propertyValue); + constantPropertyUsageMap.put(PROPERTY_TEXT_TRANSLATE_ANCHOR, propertyValue); layer.setProperties(propertyValue); } diff --git a/plugin-annotation/src/main/java/com/mapbox/mapboxsdk/plugins/annotation/SymbolOptions.java b/plugin-annotation/src/main/java/com/mapbox/mapboxsdk/plugins/annotation/SymbolOptions.java index b8cf238f0..04afe49e6 100644 --- a/plugin-annotation/src/main/java/com/mapbox/mapboxsdk/plugins/annotation/SymbolOptions.java +++ b/plugin-annotation/src/main/java/com/mapbox/mapboxsdk/plugins/annotation/SymbolOptions.java @@ -54,33 +54,33 @@ public class SymbolOptions extends Options { private Float textHaloBlur; private int zIndex; - static final String PROPERTY_iconSize = "icon-size"; - static final String PROPERTY_iconImage = "icon-image"; - static final String PROPERTY_iconRotate = "icon-rotate"; - static final String PROPERTY_iconOffset = "icon-offset"; - static final String PROPERTY_iconAnchor = "icon-anchor"; - static final String PROPERTY_textField = "text-field"; - static final String PROPERTY_textFont = "text-font"; - static final String PROPERTY_textSize = "text-size"; - static final String PROPERTY_textMaxWidth = "text-max-width"; - static final String PROPERTY_textLetterSpacing = "text-letter-spacing"; - static final String PROPERTY_textJustify = "text-justify"; - static final String PROPERTY_textAnchor = "text-anchor"; - static final String PROPERTY_textRotate = "text-rotate"; - static final String PROPERTY_textTransform = "text-transform"; - static final String PROPERTY_textOffset = "text-offset"; - static final String PROPERTY_iconOpacity = "icon-opacity"; - static final String PROPERTY_iconColor = "icon-color"; - static final String PROPERTY_iconHaloColor = "icon-halo-color"; - static final String PROPERTY_iconHaloWidth = "icon-halo-width"; - static final String PROPERTY_iconHaloBlur = "icon-halo-blur"; - static final String PROPERTY_textOpacity = "text-opacity"; - static final String PROPERTY_textColor = "text-color"; - static final String PROPERTY_textHaloColor = "text-halo-color"; - static final String PROPERTY_textHaloWidth = "text-halo-width"; - static final String PROPERTY_textHaloBlur = "text-halo-blur"; - static final String PROPERTY_zIndex = "z-index"; - private static final String PROPERTY_isDraggable = "is-draggable"; + static final String PROPERTY_ICON_SIZE = "icon-size"; + static final String PROPERTY_ICON_IMAGE = "icon-image"; + static final String PROPERTY_ICON_ROTATE = "icon-rotate"; + static final String PROPERTY_ICON_OFFSET = "icon-offset"; + static final String PROPERTY_ICON_ANCHOR = "icon-anchor"; + static final String PROPERTY_TEXT_FIELD = "text-field"; + static final String PROPERTY_TEXT_FONT = "text-font"; + static final String PROPERTY_TEXT_SIZE = "text-size"; + static final String PROPERTY_TEXT_MAX_WIDTH = "text-max-width"; + static final String PROPERTY_TEXT_LETTER_SPACING = "text-letter-spacing"; + static final String PROPERTY_TEXT_JUSTIFY = "text-justify"; + static final String PROPERTY_TEXT_ANCHOR = "text-anchor"; + static final String PROPERTY_TEXT_ROTATE = "text-rotate"; + static final String PROPERTY_TEXT_TRANSFORM = "text-transform"; + static final String PROPERTY_TEXT_OFFSET = "text-offset"; + static final String PROPERTY_ICON_OPACITY = "icon-opacity"; + static final String PROPERTY_ICON_COLOR = "icon-color"; + static final String PROPERTY_ICON_HALO_COLOR = "icon-halo-color"; + static final String PROPERTY_ICON_HALO_WIDTH = "icon-halo-width"; + static final String PROPERTY_ICON_HALO_BLUR = "icon-halo-blur"; + static final String PROPERTY_TEXT_OPACITY = "text-opacity"; + static final String PROPERTY_TEXT_COLOR = "text-color"; + static final String PROPERTY_TEXT_HALO_COLOR = "text-halo-color"; + static final String PROPERTY_TEXT_HALO_WIDTH = "text-halo-width"; + static final String PROPERTY_TEXT_HALO_BLUR = "text-halo-blur"; + static final String PROPERTY_Z_INDEX = "z-index"; + private static final String PROPERTY_IS_DRAGGABLE = "is-draggable"; /** * Set icon-size to initialise the symbol with. @@ -753,32 +753,32 @@ Symbol build(long id, AnnotationManager annotationManager throw new RuntimeException("geometry field is required"); } JsonObject jsonObject = new JsonObject(); - jsonObject.addProperty(PROPERTY_iconSize, iconSize); - jsonObject.addProperty(PROPERTY_iconImage, iconImage); - jsonObject.addProperty(PROPERTY_iconRotate, iconRotate); - jsonObject.add(PROPERTY_iconOffset, convertArray(iconOffset)); - jsonObject.addProperty(PROPERTY_iconAnchor, iconAnchor); - jsonObject.addProperty(PROPERTY_textField, textField); - jsonObject.add(PROPERTY_textFont, convertArray(textFont)); - jsonObject.addProperty(PROPERTY_textSize, textSize); - jsonObject.addProperty(PROPERTY_textMaxWidth, textMaxWidth); - jsonObject.addProperty(PROPERTY_textLetterSpacing, textLetterSpacing); - jsonObject.addProperty(PROPERTY_textJustify, textJustify); - jsonObject.addProperty(PROPERTY_textAnchor, textAnchor); - jsonObject.addProperty(PROPERTY_textRotate, textRotate); - jsonObject.addProperty(PROPERTY_textTransform, textTransform); - jsonObject.add(PROPERTY_textOffset, convertArray(textOffset)); - jsonObject.addProperty(PROPERTY_iconOpacity, iconOpacity); - jsonObject.addProperty(PROPERTY_iconColor, iconColor); - jsonObject.addProperty(PROPERTY_iconHaloColor, iconHaloColor); - jsonObject.addProperty(PROPERTY_iconHaloWidth, iconHaloWidth); - jsonObject.addProperty(PROPERTY_iconHaloBlur, iconHaloBlur); - jsonObject.addProperty(PROPERTY_textOpacity, textOpacity); - jsonObject.addProperty(PROPERTY_textColor, textColor); - jsonObject.addProperty(PROPERTY_textHaloColor, textHaloColor); - jsonObject.addProperty(PROPERTY_textHaloWidth, textHaloWidth); - jsonObject.addProperty(PROPERTY_textHaloBlur, textHaloBlur); - jsonObject.addProperty(PROPERTY_zIndex, zIndex); + jsonObject.addProperty(PROPERTY_ICON_SIZE, iconSize); + jsonObject.addProperty(PROPERTY_ICON_IMAGE, iconImage); + jsonObject.addProperty(PROPERTY_ICON_ROTATE, iconRotate); + jsonObject.add(PROPERTY_ICON_OFFSET, convertArray(iconOffset)); + jsonObject.addProperty(PROPERTY_ICON_ANCHOR, iconAnchor); + jsonObject.addProperty(PROPERTY_TEXT_FIELD, textField); + jsonObject.add(PROPERTY_TEXT_FONT, convertArray(textFont)); + jsonObject.addProperty(PROPERTY_TEXT_SIZE, textSize); + jsonObject.addProperty(PROPERTY_TEXT_MAX_WIDTH, textMaxWidth); + jsonObject.addProperty(PROPERTY_TEXT_LETTER_SPACING, textLetterSpacing); + jsonObject.addProperty(PROPERTY_TEXT_JUSTIFY, textJustify); + jsonObject.addProperty(PROPERTY_TEXT_ANCHOR, textAnchor); + jsonObject.addProperty(PROPERTY_TEXT_ROTATE, textRotate); + jsonObject.addProperty(PROPERTY_TEXT_TRANSFORM, textTransform); + jsonObject.add(PROPERTY_TEXT_OFFSET, convertArray(textOffset)); + jsonObject.addProperty(PROPERTY_ICON_OPACITY, iconOpacity); + jsonObject.addProperty(PROPERTY_ICON_COLOR, iconColor); + jsonObject.addProperty(PROPERTY_ICON_HALO_COLOR, iconHaloColor); + jsonObject.addProperty(PROPERTY_ICON_HALO_WIDTH, iconHaloWidth); + jsonObject.addProperty(PROPERTY_ICON_HALO_BLUR, iconHaloBlur); + jsonObject.addProperty(PROPERTY_TEXT_OPACITY, textOpacity); + jsonObject.addProperty(PROPERTY_TEXT_COLOR, textColor); + jsonObject.addProperty(PROPERTY_TEXT_HALO_COLOR, textHaloColor); + jsonObject.addProperty(PROPERTY_TEXT_HALO_WIDTH, textHaloWidth); + jsonObject.addProperty(PROPERTY_TEXT_HALO_BLUR, textHaloBlur); + jsonObject.addProperty(PROPERTY_Z_INDEX, zIndex); Symbol symbol = new Symbol(id, annotationManager, jsonObject, geometry); symbol.setDraggable(isDraggable); return symbol; @@ -800,86 +800,86 @@ static SymbolOptions fromFeature(@NonNull Feature feature) { SymbolOptions options = new SymbolOptions(); options.geometry = (Point) feature.geometry(); - if (feature.hasProperty(PROPERTY_iconSize)) { - options.iconSize = feature.getProperty(PROPERTY_iconSize).getAsFloat(); + if (feature.hasProperty(PROPERTY_ICON_SIZE)) { + options.iconSize = feature.getProperty(PROPERTY_ICON_SIZE).getAsFloat(); } - if (feature.hasProperty(PROPERTY_iconImage)) { - options.iconImage = feature.getProperty(PROPERTY_iconImage).getAsString(); + if (feature.hasProperty(PROPERTY_ICON_IMAGE)) { + options.iconImage = feature.getProperty(PROPERTY_ICON_IMAGE).getAsString(); } - if (feature.hasProperty(PROPERTY_iconRotate)) { - options.iconRotate = feature.getProperty(PROPERTY_iconRotate).getAsFloat(); + if (feature.hasProperty(PROPERTY_ICON_ROTATE)) { + options.iconRotate = feature.getProperty(PROPERTY_ICON_ROTATE).getAsFloat(); } - if (feature.hasProperty(PROPERTY_iconOffset)) { - options.iconOffset = toFloatArray(feature.getProperty(PROPERTY_iconOffset).getAsJsonArray()); + if (feature.hasProperty(PROPERTY_ICON_OFFSET)) { + options.iconOffset = toFloatArray(feature.getProperty(PROPERTY_ICON_OFFSET).getAsJsonArray()); } - if (feature.hasProperty(PROPERTY_iconAnchor)) { - options.iconAnchor = feature.getProperty(PROPERTY_iconAnchor).getAsString(); + if (feature.hasProperty(PROPERTY_ICON_ANCHOR)) { + options.iconAnchor = feature.getProperty(PROPERTY_ICON_ANCHOR).getAsString(); } - if (feature.hasProperty(PROPERTY_textField)) { - options.textField = feature.getProperty(PROPERTY_textField).getAsString(); + if (feature.hasProperty(PROPERTY_TEXT_FIELD)) { + options.textField = feature.getProperty(PROPERTY_TEXT_FIELD).getAsString(); } - if (feature.hasProperty(PROPERTY_textFont)) { - options.textFont = toStringArray(feature.getProperty(PROPERTY_textFont).getAsJsonArray()); + if (feature.hasProperty(PROPERTY_TEXT_FONT)) { + options.textFont = toStringArray(feature.getProperty(PROPERTY_TEXT_FONT).getAsJsonArray()); } - if (feature.hasProperty(PROPERTY_textSize)) { - options.textSize = feature.getProperty(PROPERTY_textSize).getAsFloat(); + if (feature.hasProperty(PROPERTY_TEXT_SIZE)) { + options.textSize = feature.getProperty(PROPERTY_TEXT_SIZE).getAsFloat(); } - if (feature.hasProperty(PROPERTY_textMaxWidth)) { - options.textMaxWidth = feature.getProperty(PROPERTY_textMaxWidth).getAsFloat(); + if (feature.hasProperty(PROPERTY_TEXT_MAX_WIDTH)) { + options.textMaxWidth = feature.getProperty(PROPERTY_TEXT_MAX_WIDTH).getAsFloat(); } - if (feature.hasProperty(PROPERTY_textLetterSpacing)) { - options.textLetterSpacing = feature.getProperty(PROPERTY_textLetterSpacing).getAsFloat(); + if (feature.hasProperty(PROPERTY_TEXT_LETTER_SPACING)) { + options.textLetterSpacing = feature.getProperty(PROPERTY_TEXT_LETTER_SPACING).getAsFloat(); } - if (feature.hasProperty(PROPERTY_textJustify)) { - options.textJustify = feature.getProperty(PROPERTY_textJustify).getAsString(); + if (feature.hasProperty(PROPERTY_TEXT_JUSTIFY)) { + options.textJustify = feature.getProperty(PROPERTY_TEXT_JUSTIFY).getAsString(); } - if (feature.hasProperty(PROPERTY_textAnchor)) { - options.textAnchor = feature.getProperty(PROPERTY_textAnchor).getAsString(); + if (feature.hasProperty(PROPERTY_TEXT_ANCHOR)) { + options.textAnchor = feature.getProperty(PROPERTY_TEXT_ANCHOR).getAsString(); } - if (feature.hasProperty(PROPERTY_textRotate)) { - options.textRotate = feature.getProperty(PROPERTY_textRotate).getAsFloat(); + if (feature.hasProperty(PROPERTY_TEXT_ROTATE)) { + options.textRotate = feature.getProperty(PROPERTY_TEXT_ROTATE).getAsFloat(); } - if (feature.hasProperty(PROPERTY_textTransform)) { - options.textTransform = feature.getProperty(PROPERTY_textTransform).getAsString(); + if (feature.hasProperty(PROPERTY_TEXT_TRANSFORM)) { + options.textTransform = feature.getProperty(PROPERTY_TEXT_TRANSFORM).getAsString(); } - if (feature.hasProperty(PROPERTY_textOffset)) { - options.textOffset = toFloatArray(feature.getProperty(PROPERTY_textOffset).getAsJsonArray()); + if (feature.hasProperty(PROPERTY_TEXT_OFFSET)) { + options.textOffset = toFloatArray(feature.getProperty(PROPERTY_TEXT_OFFSET).getAsJsonArray()); } - if (feature.hasProperty(PROPERTY_iconOpacity)) { - options.iconOpacity = feature.getProperty(PROPERTY_iconOpacity).getAsFloat(); + if (feature.hasProperty(PROPERTY_ICON_OPACITY)) { + options.iconOpacity = feature.getProperty(PROPERTY_ICON_OPACITY).getAsFloat(); } - if (feature.hasProperty(PROPERTY_iconColor)) { - options.iconColor = feature.getProperty(PROPERTY_iconColor).getAsString(); + if (feature.hasProperty(PROPERTY_ICON_COLOR)) { + options.iconColor = feature.getProperty(PROPERTY_ICON_COLOR).getAsString(); } - if (feature.hasProperty(PROPERTY_iconHaloColor)) { - options.iconHaloColor = feature.getProperty(PROPERTY_iconHaloColor).getAsString(); + if (feature.hasProperty(PROPERTY_ICON_HALO_COLOR)) { + options.iconHaloColor = feature.getProperty(PROPERTY_ICON_HALO_COLOR).getAsString(); } - if (feature.hasProperty(PROPERTY_iconHaloWidth)) { - options.iconHaloWidth = feature.getProperty(PROPERTY_iconHaloWidth).getAsFloat(); + if (feature.hasProperty(PROPERTY_ICON_HALO_WIDTH)) { + options.iconHaloWidth = feature.getProperty(PROPERTY_ICON_HALO_WIDTH).getAsFloat(); } - if (feature.hasProperty(PROPERTY_iconHaloBlur)) { - options.iconHaloBlur = feature.getProperty(PROPERTY_iconHaloBlur).getAsFloat(); + if (feature.hasProperty(PROPERTY_ICON_HALO_BLUR)) { + options.iconHaloBlur = feature.getProperty(PROPERTY_ICON_HALO_BLUR).getAsFloat(); } - if (feature.hasProperty(PROPERTY_textOpacity)) { - options.textOpacity = feature.getProperty(PROPERTY_textOpacity).getAsFloat(); + if (feature.hasProperty(PROPERTY_TEXT_OPACITY)) { + options.textOpacity = feature.getProperty(PROPERTY_TEXT_OPACITY).getAsFloat(); } - if (feature.hasProperty(PROPERTY_textColor)) { - options.textColor = feature.getProperty(PROPERTY_textColor).getAsString(); + if (feature.hasProperty(PROPERTY_TEXT_COLOR)) { + options.textColor = feature.getProperty(PROPERTY_TEXT_COLOR).getAsString(); } - if (feature.hasProperty(PROPERTY_textHaloColor)) { - options.textHaloColor = feature.getProperty(PROPERTY_textHaloColor).getAsString(); + if (feature.hasProperty(PROPERTY_TEXT_HALO_COLOR)) { + options.textHaloColor = feature.getProperty(PROPERTY_TEXT_HALO_COLOR).getAsString(); } - if (feature.hasProperty(PROPERTY_textHaloWidth)) { - options.textHaloWidth = feature.getProperty(PROPERTY_textHaloWidth).getAsFloat(); + if (feature.hasProperty(PROPERTY_TEXT_HALO_WIDTH)) { + options.textHaloWidth = feature.getProperty(PROPERTY_TEXT_HALO_WIDTH).getAsFloat(); } - if (feature.hasProperty(PROPERTY_textHaloBlur)) { - options.textHaloBlur = feature.getProperty(PROPERTY_textHaloBlur).getAsFloat(); + if (feature.hasProperty(PROPERTY_TEXT_HALO_BLUR)) { + options.textHaloBlur = feature.getProperty(PROPERTY_TEXT_HALO_BLUR).getAsFloat(); } - if (feature.hasProperty(PROPERTY_zIndex)) { - options.zIndex = feature.getProperty(PROPERTY_zIndex).getAsInt(); + if (feature.hasProperty(PROPERTY_Z_INDEX)) { + options.zIndex = feature.getProperty(PROPERTY_Z_INDEX).getAsInt(); } - if (feature.hasProperty(PROPERTY_isDraggable)) { - options.isDraggable = feature.getProperty(PROPERTY_isDraggable).getAsBoolean(); + if (feature.hasProperty(PROPERTY_IS_DRAGGABLE)) { + options.isDraggable = feature.getProperty(PROPERTY_IS_DRAGGABLE).getAsBoolean(); } return options; }