use of com.google.maps.android.geojson.GeoJsonPolygonStyle in project AirMapView by airbnb.
the class NativeGoogleMapFragment method setGeoJsonLayer.
@Override
public void setGeoJsonLayer(final AirMapGeoJsonLayer airMapGeoJsonLayer) throws JSONException {
// clear any existing layers
clearGeoJsonLayer();
layerOnMap = new GeoJsonLayer(googleMap, new JSONObject(airMapGeoJsonLayer.geoJson));
GeoJsonPolygonStyle style = layerOnMap.getDefaultPolygonStyle();
style.setStrokeColor(airMapGeoJsonLayer.strokeColor);
style.setStrokeWidth(airMapGeoJsonLayer.strokeWidth);
style.setFillColor(airMapGeoJsonLayer.fillColor);
layerOnMap.addLayerToMap();
}
Aggregations