public class PolylineBuilder
extends java.lang.Object
Polyline objects.| Modifier and Type | Field and Description |
|---|---|
static float |
MAX_WIDTH |
static float |
MIN_WIDTH |
| Constructor and Description |
|---|
PolylineBuilder() |
| Modifier and Type | Method and Description |
|---|---|
PolylineBuilder |
add(double latitude,
double longitude)
Adds a vertex to the end of the polyline being built.
|
PolylineBuilder |
add(GeoPoint point)
Adds a vertex to the end of the polyline being built.
|
PolylineBuilder |
add(android.location.Location location)
Adds a vertex to the end of the polyline being built.
|
PolylineBuilder |
addAll(java.util.Collection<? extends GeoPoint> points)
Adds multiple vertices to the end of the polyline being built.
|
PolylineBuilder |
addAll(double[] points)
Adds multiple vertices to the end of the polyline being built.
|
Polyline |
build()
Builds the new
Polyline object with the provided properties and returns it. |
PolylineBuilder |
color(int color)
Sets the color of the polyline as a 32-bit ARGB color.
|
int |
getColor()
Gets the color for this object.
|
java.util.List<GeoPoint> |
getPoints()
Gets the set of points for this object.
|
float |
getWidth()
Gets the width for this object.
|
int |
getZIndex()
Gets the zIndex of this object.
|
boolean |
isSelectable()
Gets the selectability setting for this object.
|
boolean |
isVisible()
Gets the visibility setting for this object.
|
PolylineBuilder |
selectable(boolean isSelectable)
Specifies the selectability for the polyline.
|
PolylineBuilder |
visibility(boolean isVisible)
Specifies the visibility for the polyline.
|
PolylineBuilder |
width(float width)
Sets the width of the polyline.
|
PolylineBuilder |
zIndex(int zIndex)
Specifies the zIndex of the polyline.
|
public static final float MIN_WIDTH
public static final float MAX_WIDTH
public PolylineBuilder add(android.location.Location location)
location - A geographic location.public PolylineBuilder add(double latitude, double longitude)
latitude - Latitude, in degrees.longitude - Longitude, in degrees.public PolylineBuilder add(GeoPoint point)
point - A pair of latitude and longitude in degrees.public PolylineBuilder addAll(java.util.Collection<? extends GeoPoint> points)
points - Collections of GeoPoints.public PolylineBuilder addAll(double[] points)
points - the array of geocoordinates. Lat1, lon1, lat2, lon2, etc.
For example, new double[]{ 52.375426f, 4.908740f, 52.375292f, 4.909346f}.{@link - IllegalArgumentException} when invalid coordinates are encountered.public PolylineBuilder color(int color)
color - The ARGB color.public PolylineBuilder width(float width) throws java.lang.IllegalArgumentException
public PolylineBuilder visibility(boolean isVisible)
isVisible - The visibility of line.public PolylineBuilder selectable(boolean isSelectable)
isSelectable - Whether the line is selectable.public PolylineBuilder zIndex(int zIndex)
zIndex - the zIndex of the polyline.public java.util.List<GeoPoint> getPoints()
public int getColor()
public float getWidth()
public boolean isVisible()
public boolean isSelectable()
public int getZIndex()