Tabnine Logo
PolygonOptions.fillColor
Code IndexAdd Tabnine to your IDE (free)

How to use
fillColor
method
in
com.google.android.gms.maps.model.PolygonOptions

Best Java code snippets using com.google.android.gms.maps.model.PolygonOptions.fillColor (Showing top 20 results out of 315)

origin: googlemaps/android-maps-utils

  /**
   * Sets the fill color of the Polygon as a 32-bit ARGB color
   *
   * @param fillColor fill color value of the Polygon
   */
  public void setPolygonFillColor(int fillColor) {
    mPolygonOptions.fillColor(fillColor);
  }
}
origin: airbnb/AirMapView

public Builder<T> fillColor(int color) {
 this.polygonOptions.fillColor(color);
 return this;
}
origin: googlemaps/android-maps-utils

/**
 *Creates a new PolygonOption from given properties of an existing PolygonOption
 * @param originalPolygonOption An existing PolygonOption instance
 * @param isFill Whether the fill for a polygon is set
 * @param isOutline Whether the outline for a polygon is set
 * @return  A new PolygonOption
 */
private static PolygonOptions createPolygonOptions (PolygonOptions originalPolygonOption,
    boolean isFill, boolean isOutline) {
  PolygonOptions polygonOptions = new PolygonOptions();
  if (isFill) {
    polygonOptions.fillColor(originalPolygonOption.getFillColor());
  }
  if (isOutline) {
    polygonOptions.strokeColor(originalPolygonOption.getStrokeColor());
    polygonOptions.strokeWidth(originalPolygonOption.getStrokeWidth());
  }
  return polygonOptions;
}
origin: googlemaps/android-maps-utils

/**
 * Sets the inline polygon style by copying over the styles that have been set
 *
 * @param polygonOptions polygon options object to add inline styles to
 * @param inlineStyle    inline styles to apply
 */
private void setInlinePolygonStyle(PolygonOptions polygonOptions, KmlStyle inlineStyle) {
  PolygonOptions inlinePolygonOptions = inlineStyle.getPolygonOptions();
  if (inlineStyle.hasFill() && inlineStyle.isStyleSet("fillColor")) {
    polygonOptions.fillColor(inlinePolygonOptions.getFillColor());
  }
  if (inlineStyle.hasOutline()) {
    if (inlineStyle.isStyleSet("outlineColor")) {
      polygonOptions.strokeColor(inlinePolygonOptions.getStrokeColor());
    }
    if (inlineStyle.isStyleSet("width")) {
      polygonOptions.strokeWidth(inlinePolygonOptions.getStrokeWidth());
    }
  }
  if (inlineStyle.isPolyRandomColorMode()) {
    polygonOptions.fillColor(KmlStyle.computeRandomColor(inlinePolygonOptions.getFillColor()));
  }
}
origin: googlemaps/android-maps-utils

/**
 * Gets a new PolygonOptions object containing styles for the GeoJsonPolygon
 *
 * @return new PolygonOptions object
 */
public PolygonOptions toPolygonOptions() {
  PolygonOptions polygonOptions = new PolygonOptions();
  polygonOptions.fillColor(mPolygonOptions.getFillColor());
  polygonOptions.geodesic(mPolygonOptions.isGeodesic());
  polygonOptions.strokeColor(mPolygonOptions.getStrokeColor());
  polygonOptions.strokeWidth(mPolygonOptions.getStrokeWidth());
  polygonOptions.visible(mPolygonOptions.isVisible());
  polygonOptions.zIndex(mPolygonOptions.getZIndex());
  polygonOptions.clickable(mPolygonOptions.isClickable());
  return polygonOptions;
}
origin: googlemaps/android-maps-utils

    .fillColor(Color.BLUE - ALPHA_ADJUSTMENT)
    .strokeColor(Color.BLUE)
    .strokeWidth(5));
mMap.addPolygon(new PolygonOptions()
    .addAll(simplifiedTriangle)
    .fillColor(Color.YELLOW - ALPHA_ADJUSTMENT)
    .strokeColor(Color.YELLOW)
    .strokeWidth(5));
mMap.addPolygon(new PolygonOptions()
    .addAll(oval)
    .fillColor(Color.BLUE - ALPHA_ADJUSTMENT)
    .strokeColor(Color.BLUE)
    .strokeWidth(5));
mMap.addPolygon(new PolygonOptions()
    .addAll(simplifiedOval)
    .fillColor(Color.YELLOW - ALPHA_ADJUSTMENT)
    .strokeColor(Color.YELLOW)
    .strokeWidth(5));
origin: googlemaps/android-maps-utils

  setInlinePolygonStyle(polygonOptions, inlineStyle);
} else if (style.isPolyRandomColorMode()) {
  polygonOptions.fillColor(KmlStyle.computeRandomColor(polygonOptions.getFillColor()));
origin: googlemaps/android-samples

.addHole(createRectangle(new LatLng(-22, 128), 1, 1))
.addHole(createRectangle(new LatLng(-18, 133), 0.5, 1.5))
.fillColor(fillColorArgb)
.strokeColor(strokeColorArgb)
.strokeWidth(mStrokeWidthBar.getProgress())
origin: mg6maciej/android-maps-extensions

public PolygonOptions fillColor(int color) {
  real.fillColor(color);
  return this;
}
origin: googlemaps/android-samples

/**
 * Add a Polyline and a Polygon to the map.
 * The Polyline connects Melbourne, Adelaide and Perth. The Polygon is located in the Northern
 * Territory (Australia).
 */
private void addPolyObjects() {
  mMap.addPolyline((new PolylineOptions())
      .add(MELBOURNE, ADELAIDE, PERTH)
      .color(Color.GREEN)
      .width(5f));
  mMap.addPolygon(new PolygonOptions()
      .add(POLYGON)
      .fillColor(Color.CYAN)
      .strokeColor(Color.BLUE)
      .strokeWidth(5));
}
origin: googlemaps/android-samples

    new LatLng(DARWIN.latitude - 3, DARWIN.longitude + 3),
    new LatLng(DARWIN.latitude - 3, DARWIN.longitude - 3))
.fillColor(Color.argb(150, 34, 173, 24))
.strokeColor(Color.rgb(34, 173, 24))
.clickable(true));
origin: wiglenet/wigle-wifi-wardriving

/**
 * Sets the fill color for a Polygon
 *
 * @param color Fill color for a Polygon
 */
/* package */ void setFillColor(String color) {
  // Add # to allow for mOutline color to be parsed correctly
  mPolygonOptions.fillColor(Color.parseColor("#" + convertColor(color)));
  mStylesSet.add("fillColor");
}
origin: wiglenet/wigle-wifi-wardriving

/**
 * Sets the fill color of the GeoJsonPolygon as a 32-bit ARGB color
 *
 * @param fillColor fill color value of the GeoJsonPolygon
 */
public void setFillColor(int fillColor) {
  mPolygonOptions.fillColor(fillColor);
  styleChanged();
}
origin: wiglenet/wigle-wifi-wardriving

/**
 *Creates a new PolygonOption from given properties of an existing PolygonOption
 * @param originalPolygonOption An existing PolygonOption instance
 * @param isFill Whether the fill for a polygon is set
 * @param isOutline Whether the outline for a polygon is set
 * @return  A new PolygonOption
 */
private static PolygonOptions createPolygonOptions (PolygonOptions originalPolygonOption,
    boolean isFill, boolean isOutline) {
  PolygonOptions polygonOptions = new PolygonOptions();
  if (isFill) {
    polygonOptions.fillColor(originalPolygonOption.getFillColor());
  }
  if (isOutline) {
    polygonOptions.strokeColor(originalPolygonOption.getStrokeColor());
    polygonOptions.strokeWidth(originalPolygonOption.getStrokeWidth());
  }
  return polygonOptions;
}
origin: bkhezry/MapDrawingTools

private void drawPolygon(List<LatLng> latLngList) {
 if (polygon != null) {
  polygon.remove();
 }
 PolygonOptions polygonOptions = new PolygonOptions();
 polygonOptions.fillColor(drawingOption.getFillColor());
 polygonOptions.strokeColor(drawingOption.getStrokeColor());
 polygonOptions.strokeWidth(drawingOption.getStrokeWidth());
 polygonOptions.addAll(latLngList);
 polygon = mMap.addPolygon(polygonOptions);
}
origin: car2go/AnyMaps

@Override
public com.google.android.gms.maps.model.PolygonOptions map(PolygonOptions input) {
  List<LatLng> points = AnyMapAdapter.adaptList(com.car2go.maps.model.LatLng.class, input.getPoints());
  return new com.google.android.gms.maps.model.PolygonOptions()
      .fillColor(input.getFillColor())
      .strokeColor(input.getStrokeColor())
      .strokeWidth(input.getStrokeWidth())
      .addAll(points);
}
origin: wiglenet/wigle-wifi-wardriving

/**
 * Sets the inline polygon style by copying over the styles that have been set
 *
 * @param polygonOptions polygon options object to add inline styles to
 * @param inlineStyle    inline styles to apply
 */
private void setInlinePolygonStyle(PolygonOptions polygonOptions, KmlStyle inlineStyle) {
  PolygonOptions inlinePolygonOptions = inlineStyle.getPolygonOptions();
  if (inlineStyle.hasFill() && inlineStyle.isStyleSet("fillColor")) {
    polygonOptions.fillColor(inlinePolygonOptions.getFillColor());
  }
  if (inlineStyle.hasOutline()) {
    if (inlineStyle.isStyleSet("outlineColor")) {
      polygonOptions.strokeColor(inlinePolygonOptions.getStrokeColor());
    }
    if (inlineStyle.isStyleSet("width")) {
      polygonOptions.strokeWidth(inlinePolygonOptions.getStrokeWidth());
    }
  }
  if (inlineStyle.isPolyRandomColorMode()) {
    polygonOptions.fillColor(KmlStyle.computeRandomColor(inlinePolygonOptions.getFillColor()));
  }
}
origin: livroandroid/5ed

  protected void testePolygon(GoogleMap map) {
    PolygonOptions p = new PolygonOptions();
    p.add(new LatLng(-23.564391, -46.651717));
    p.add(new LatLng(-23.565391, -46.652717));
    p.add(new LatLng(-23.564282, -46.654337));
    p.add(new LatLng(-23.563114, -46.653283));
//        p.add(new LatLng(-23.564391, -46.651717));
    p.strokeColor(Color.GREEN);
    p.fillColor(Color.RED);
    Polygon polygon = map.addPolygon(p);
    polygon.setFillColor(Color.YELLOW);
  }

origin: wiglenet/wigle-wifi-wardriving

/**
 * Adds a KML Polygon to the map as a Polygon by combining the styling and coordinates
 *
 * @param polygon contains coordinates for the Polygon
 * @param style   contains relevant styling properties for the Polygon
 * @return Polygon object
 */
private Polygon addPolygonToMap(KmlPolygon polygon, KmlStyle style, KmlStyle inlineStyle) {
  PolygonOptions polygonOptions = style.getPolygonOptions();
  polygonOptions.addAll(polygon.getOuterBoundaryCoordinates());
  for (ArrayList<LatLng> innerBoundary : polygon.getInnerBoundaryCoordinates()) {
    polygonOptions.addHole(innerBoundary);
  }
  if (inlineStyle != null) {
    setInlinePolygonStyle(polygonOptions, inlineStyle);
  } else if (style.isPolyRandomColorMode()) {
    polygonOptions.fillColor(KmlStyle.computeRandomColor(polygonOptions.getFillColor()));
  }
  return mMap.addPolygon(polygonOptions);
}
origin: wiglenet/wigle-wifi-wardriving

/**
 * Gets a new PolygonOptions object containing styles for the GeoJsonPolygon
 *
 * @return new PolygonOptions object
 */
public PolygonOptions toPolygonOptions() {
  PolygonOptions polygonOptions = new PolygonOptions();
  polygonOptions.fillColor(mPolygonOptions.getFillColor());
  polygonOptions.geodesic(mPolygonOptions.isGeodesic());
  polygonOptions.strokeColor(mPolygonOptions.getStrokeColor());
  polygonOptions.strokeWidth(mPolygonOptions.getStrokeWidth());
  polygonOptions.visible(mPolygonOptions.isVisible());
  polygonOptions.zIndex(mPolygonOptions.getZIndex());
  return polygonOptions;
}
com.google.android.gms.maps.modelPolygonOptionsfillColor

Popular methods of PolygonOptions

  • strokeColor
  • <init>
  • strokeWidth
  • addAll
  • add
  • getFillColor
  • getStrokeColor
  • getStrokeWidth
  • addHole
  • zIndex
  • geodesic
  • getZIndex
  • geodesic,
  • getZIndex,
  • isGeodesic,
  • isVisible,
  • visible,
  • clickable,
  • getPoints,
  • isClickable,
  • strokePattern

Popular in Java

  • Finding current android device location
  • requestLocationUpdates (LocationManager)
  • setContentView (Activity)
  • getApplicationContext (Context)
  • DateFormat (java.text)
    Formats or parses dates and times.This class provides factories for obtaining instances configured f
  • Date (java.util)
    A specific moment in time, with millisecond precision. Values typically come from System#currentTime
  • Enumeration (java.util)
    A legacy iteration interface.New code should use Iterator instead. Iterator replaces the enumeration
  • ResourceBundle (java.util)
    ResourceBundle is an abstract class which is the superclass of classes which provide Locale-specifi
  • Vector (java.util)
    Vector is an implementation of List, backed by an array and synchronized. All optional operations in
  • Reflections (org.reflections)
    Reflections one-stop-shop objectReflections scans your classpath, indexes the metadata, allows you t
  • Top 12 Jupyter Notebook extensions
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now