parsed coordinates from geojson, ready to add polyline via JNI #1716
This commit is contained in:
@@ -64,5 +64,5 @@ public class CircleOptions {
|
||||
// public CircleOptions zIndex (float zIndex) {
|
||||
//
|
||||
// }
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -55,6 +55,10 @@ public class PolygonOptions {
|
||||
return polygon.holes;
|
||||
}
|
||||
|
||||
public Polygon getPolygon() {
|
||||
return polygon;
|
||||
}
|
||||
|
||||
public int getStrokeColor() {
|
||||
return polygon.strokeColor;
|
||||
}
|
||||
|
||||
@@ -54,6 +54,10 @@ public class PolylineOptions {
|
||||
return polyline.points;
|
||||
}
|
||||
|
||||
public Polyline getPolyline() {
|
||||
return polyline;
|
||||
}
|
||||
|
||||
public float getWidth() {
|
||||
return polyline.width;
|
||||
}
|
||||
|
||||
@@ -32,6 +32,8 @@ import com.almeros.android.multitouch.gesturedetectors.TwoFingerGestureDetector;
|
||||
import com.mapbox.mapboxgl.annotations.Annotation;
|
||||
import com.mapbox.mapboxgl.annotations.Marker;
|
||||
import com.mapbox.mapboxgl.annotations.MarkerOptions;
|
||||
import com.mapbox.mapboxgl.annotations.Polyline;
|
||||
import com.mapbox.mapboxgl.annotations.PolylineOptions;
|
||||
import com.mapbox.mapboxgl.geometry.LatLng;
|
||||
import com.mapbox.mapboxgl.geometry.LatLngZoom;
|
||||
|
||||
@@ -221,6 +223,12 @@ public class MapView extends SurfaceView {
|
||||
return marker;
|
||||
}
|
||||
|
||||
public Polyline addPolyline(PolylineOptions polylineOptions) {
|
||||
Polyline polyline = polylineOptions.getPolyline();
|
||||
|
||||
return polyline;
|
||||
}
|
||||
|
||||
public void removeAnnotation(Annotation annotation) {
|
||||
long id = annotation.getId();
|
||||
mNativeMapView.removeAnnotation(id);
|
||||
|
||||
Reference in New Issue
Block a user