diff options
Diffstat (limited to 'android/java/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxgl/annotations/Polyline.java')
-rw-r--r-- | android/java/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxgl/annotations/Polyline.java | 63 |
1 files changed, 58 insertions, 5 deletions
diff --git a/android/java/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxgl/annotations/Polyline.java b/android/java/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxgl/annotations/Polyline.java index c600549788..703e5d5248 100644 --- a/android/java/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxgl/annotations/Polyline.java +++ b/android/java/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxgl/annotations/Polyline.java @@ -1,9 +1,62 @@ package com.mapbox.mapboxgl.annotations; -/** - * Created by Nicholas Hallahan on 7/13/15. - * nick@theoutpost.io - */ -public class Polyline { +import android.graphics.Color; + +import com.mapbox.mapboxgl.geometry.LatLng; + +import java.util.List; + +public class Polyline extends MultiPoint { + + int color = Color.BLACK; // default color is black + float width = 10; // As specified by Google API Docs (in pixels) + List<LatLng> points; + + public Polyline() { + super(); + } + + // TODO: Implement equals of Google Maps Android API +// public boolean equals(Object other) { +// +// } + + public int getColor() { + return color; + } + + public float getWidth() { + return width; + } + + + /** + * Sets the color of the polyline. + * + * @param color - the color in ARGB format + */ + public void setColor(int color) { + this.color = color; + } + + // TODO: Implement setGeodesic of Google Maps Android API +// public void setGeodesic(boolean geodesic) { +// +// } + + /** + * Sets the width of the polyline. + * + * @param width in pixels + * @return + */ + public void setWidth(float width) { + this.width = width; + } + + // TODO: Implement setZIndex of Google Maps Android API +// public void setZIndex(float zIndex) { +// +// } } |