constructs polyline object, ready to rock JNI #1716
This commit is contained in:
@@ -10,6 +10,7 @@ public abstract class MultiPoint extends Annotation {
|
||||
List<LatLng> points;
|
||||
|
||||
public MultiPoint() {
|
||||
super();
|
||||
points = new ArrayList<>();
|
||||
}
|
||||
|
||||
|
||||
@@ -10,7 +10,6 @@ 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();
|
||||
|
||||
@@ -300,10 +300,10 @@ public class MainActivity extends ActionBarActivity {
|
||||
String geojsonStr = Util.loadStringFromAssets(this, "tillicum.geojson");
|
||||
LatLng[] latLngs = Util.parseGeoJSONCoordinates(geojsonStr);
|
||||
MapView map = mMapFragment.getMap();
|
||||
// Polyline line = map.addPolyline(new PolylineOptions()
|
||||
// .add(new LatLng(51.5, -0.1), new LatLng(40.7, -74.0))
|
||||
// .width(5)
|
||||
// .color(Color.RED));
|
||||
Polyline line = map.addPolyline(new PolylineOptions()
|
||||
.add(new LatLng(51.5, -0.1), new LatLng(40.7, -74.0))
|
||||
.width(5)
|
||||
.color(Color.RED));
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
} catch (JSONException e) {
|
||||
|
||||
Reference in New Issue
Block a user