Merge branch 'android-annotations' of git://github.com/TrueFlow/mapbox-gl-native into TrueFlow-android-annotations

This commit is contained in:
Brad Leege
2015-07-22 13:41:17 -05:00
6 changed files with 219 additions and 46 deletions

View File

@@ -330,10 +330,12 @@ public class MainActivity extends ActionBarActivity {
geojsonStr = Util.loadStringFromAssets(this, "small_poly.geojson");
LatLng[] latLngs = Util.parseGeoJSONCoordinates(geojsonStr);
MapView map = mMapFragment.getMap();
Polygon polygon = map.addPolygon(new PolygonOptions()
.add(latLngs)
.strokeColor(Color.MAGENTA)
.fillColor(Color.BLUE));
ArrayList<PolygonOptions> opts = new ArrayList<PolygonOptions>();
opts.add(new PolygonOptions()
.add(latLngs)
.strokeColor(Color.MAGENTA)
.fillColor(Color.BLUE));
Polygon polygon = map.addPolygons(opts).get(0);
} catch (IOException e) {
e.printStackTrace();
} catch (JSONException e) {