Skip to content

Commit

Permalink
commenting mapbox#1716
Browse files Browse the repository at this point in the history
  • Loading branch information
hallahan committed Jul 17, 2015
1 parent bcf6ebf commit ec4757c
Show file tree
Hide file tree
Showing 6 changed files with 74 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,12 @@

import com.mapbox.mapboxgl.geometry.LatLng;

/**
* UNIMPLEMENTED: Needs implementation in Native.
*
* https://github.com/mapbox/mapbox-gl-native/issues/1882
* https://github.com/mapbox/mapbox-gl-native/issues/1726
*/
public class Circle extends Annotation {

LatLng center;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,12 @@

import com.mapbox.mapboxgl.geometry.LatLng;

/**
* UNIMPLEMENTED: Needs implementation in Native.
*
* https://github.com/mapbox/mapbox-gl-native/issues/1882
* https://github.com/mapbox/mapbox-gl-native/issues/1726
*/
public class CircleOptions extends AnnotationOptions {

private Circle circle;
Expand Down Expand Up @@ -40,11 +46,6 @@ public float getStrokeWidth() {
return circle.strokeWidth;
}

// TODO: Implement getZIndex of Google Maps Android API
// public float getZIndex () {
//
// }

public CircleOptions radius (double radius) {
circle.radius = radius;
return this;
Expand All @@ -60,9 +61,4 @@ public CircleOptions strokeWidth (float width) {
return this;
}

// TODO: Implement zIndex of Google Maps Android API
// public CircleOptions zIndex (float zIndex) {
//
// }

}
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,14 @@ void setSnippet(String snippet) {
this.snippet = snippet;
}

/**
* You can specify the name of a sprite to get a marker other than the default marker.
* This name can be found in the sprite json file:
*
* https://github.com/mapbox/mapbox-gl-styles/blob/mb-pages/sprites/mapbox-streets.json
*
* @param sprite
*/
void setSprite(String sprite) {
this.sprite = sprite;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,11 @@ public int getStrokeColor() {
return strokeColor;
}

/**
* UNIMPLEMENTED: Needs implementation in Native.
* https://github.com/mapbox/mapbox-gl-native/issues/1737
* @return stroke width as float
*/
public float getStrokeWidth() {
return strokeWidth;
}
Expand Down Expand Up @@ -61,6 +66,8 @@ public void setHoles(List<? extends List<LatLng>> holes) {

/**
* Sets the alpha (opacity) of the stroke
*
* UNIMPLEMENTED: Needs implementation in Native.
*/
public void setStrokeAlpha(float alpha) {
strokeAlpha = alpha;
Expand All @@ -70,6 +77,11 @@ public void setStrokeColor(int color) {
strokeColor = color;
}

/**
* UNIMPLEMENTED: Needs implementation in Native.
* https://github.com/mapbox/mapbox-gl-native/issues/1737
* @return stroke width as float
*/
public void setStrokeWidth(float width) {
strokeWidth = width;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,13 @@ public PolygonOptions addAll(Iterable<LatLng> points) {
return this;
}

/**
* UNIMPLEMENTED: Needs implementation in Native.
* https://github.com/mapbox/mapbox-gl-native/issues/1729
*
* @param points - an iterable (list) of points for cutting a hole
* @return PolygonOptions - the options object
*/
public PolygonOptions addHole (Iterable<LatLng> points) {
List<LatLng> hole = new ArrayList<>();
for (LatLng point : points) {
Expand All @@ -40,6 +47,12 @@ public PolygonOptions addHole (Iterable<LatLng> points) {
return this;
}

/**
* Sets the color of the polygon.
*
* @param color - the color in ARGB format
* @return PolygonOptions - the options object
*/
public PolygonOptions fillColor(int color) {
((Polygon)annotation).fillColor = color;
return this;
Expand All @@ -49,6 +62,12 @@ public int getFillColor() {
return ((Polygon)annotation).fillColor;
}

/**
* UNIMPLEMENTED: Needs implementation in Native.
* https://github.com/mapbox/mapbox-gl-native/issues/1729
*
* @return a list of lists of points for cutting holes
*/
public List<List<LatLng>> getHoles() {
return ((Polygon)annotation).holes;
}
Expand All @@ -61,15 +80,33 @@ public int getStrokeColor() {
return ((Polygon)annotation).strokeColor;
}

/**
* UNIMPLEMENTED: Needs implementation in Native.
* https://github.com/mapbox/mapbox-gl-native/issues/1737
*
* @return stroke width as float
*/
public float getStrokeWidth() {
return ((Polygon)annotation).strokeWidth;
}

/**
* Sets the color of the stroke of the polygon.
*
* @param color - the color in ARGB format
* @return PolygonOptions - the options object
*/
public PolygonOptions strokeColor(int color) {
((Polygon)annotation).strokeColor = color;
return this;
}

/**
* UNIMPLEMENTED: Needs implementation in Native.
* https://github.com/mapbox/mapbox-gl-native/issues/1737
*
* @return stroke width as float
*/
public PolygonOptions strokeWidth(float width) {
((Polygon)annotation).strokeWidth = width;
return this;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,11 @@ public PolylineOptions addAll(Iterable<LatLng> points) {
return this;
}

/**
* Sets the color of the polyline.
*
* @param color - the color in ARGB format
*/
public PolylineOptions color(int color) {
((Polyline)annotation).color = color;
return this;
Expand Down

0 comments on commit ec4757c

Please sign in to comment.