summaryrefslogtreecommitdiff
path: root/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/annotations/Polyline.java
diff options
context:
space:
mode:
Diffstat (limited to 'platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/annotations/Polyline.java')
-rw-r--r--platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/annotations/Polyline.java42
1 files changed, 42 insertions, 0 deletions
diff --git a/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/annotations/Polyline.java b/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/annotations/Polyline.java
new file mode 100644
index 0000000000..cfaf0d21d9
--- /dev/null
+++ b/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/annotations/Polyline.java
@@ -0,0 +1,42 @@
+package com.mapbox.mapboxsdk.annotations;
+
+import android.graphics.Color;
+
+/**
+ * Polyline is a geometry feature with an unclosed list of coordinates drawn as a line
+ */
+public final class Polyline extends MultiPoint {
+
+ private int color = Color.BLACK; // default color is black
+ private float width = 10; // As specified by Google API Docs (in pixels)
+
+ Polyline() {
+ super();
+ }
+
+ public int getColor() {
+ return color;
+ }
+
+ public float getWidth() {
+ return width;
+ }
+
+ /**
+ * Sets the color of the polyline.
+ *
+ * @param color - the color in ARGB format
+ */
+ void setColor(int color) {
+ this.color = color;
+ }
+
+ /**
+ * Sets the width of the polyline.
+ *
+ * @param width in pixels
+ */
+ void setWidth(float width) {
+ this.width = width;
+ }
+}