diff options
author | Nicholas Hallahan <nick@theoutpost.io> | 2015-07-15 12:29:57 -0700 |
---|---|---|
committer | Nicholas Hallahan <nick@theoutpost.io> | 2015-07-15 12:29:57 -0700 |
commit | 6335aecfadede438bff84c1498828f0ed61ad514 (patch) | |
tree | 19d638331beb40d73be6e8dcb894eddc112c7cc0 /android | |
parent | 297190ecf114bf653d226ac979191ca5efcc6406 (diff) | |
download | qtlocation-mapboxgl-6335aecfadede438bff84c1498828f0ed61ad514.tar.gz |
constructs polyline object, ready to rock JNI #1716
Diffstat (limited to 'android')
3 files changed, 5 insertions, 5 deletions
diff --git a/android/java/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxgl/annotations/MultiPoint.java b/android/java/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxgl/annotations/MultiPoint.java index 4f01f2c1e6..530ad1d454 100644 --- a/android/java/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxgl/annotations/MultiPoint.java +++ b/android/java/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxgl/annotations/MultiPoint.java @@ -10,6 +10,7 @@ public abstract class MultiPoint extends Annotation { List<LatLng> points; public MultiPoint() { + super(); points = new ArrayList<>(); } 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 703e5d5248..fdfcc61493 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 @@ -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(); diff --git a/android/java/MapboxGLAndroidSDKTestApp/src/main/java/com/mapbox/mapboxgl/testapp/MainActivity.java b/android/java/MapboxGLAndroidSDKTestApp/src/main/java/com/mapbox/mapboxgl/testapp/MainActivity.java index ae45e1821f..13f4cef285 100644 --- a/android/java/MapboxGLAndroidSDKTestApp/src/main/java/com/mapbox/mapboxgl/testapp/MainActivity.java +++ b/android/java/MapboxGLAndroidSDKTestApp/src/main/java/com/mapbox/mapboxgl/testapp/MainActivity.java @@ -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) { |