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

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

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

origin: googlemaps/android-maps-utils

/**
 * Gets the stroke color of the GeoJsonPolygon as a 32-bit ARGB color
 *
 * @return stroke color of the GeoJsonPolygon
 */
public int getStrokeColor() {
  return mPolygonOptions.getStrokeColor();
}
origin: airbnb/AirMapView

@Override public <T> void addPolygon(AirMapPolygon<T> polygon) {
 try {
  JSONArray array = new JSONArray();
  for (LatLng point : polygon.getPolygonOptions().getPoints()) {
   JSONObject json = new JSONObject();
   json.put("lat", point.latitude);
   json.put("lng", point.longitude);
   array.put(json);
  }
  webView.loadUrl(String.format(Locale.US,
    "javascript:addPolygon(" + array.toString() + ", %1$d, %2$d, %3$d, %4$d);",
    polygon.getId(),
    (int) polygon.getPolygonOptions().getStrokeWidth(),
    polygon.getPolygonOptions().getStrokeColor(),
    polygon.getPolygonOptions().getFillColor()));
 } catch (JSONException e) {
  Log.e(TAG, "error constructing polyline JSON", e);
 }
}
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

public void testStrokeColor() throws Exception {
  polygonStyle.setStrokeColor(Color.RED);
  assertEquals(Color.RED, polygonStyle.getStrokeColor());
  assertEquals(Color.RED, polygonStyle.toPolygonOptions().getStrokeColor());
  polygonStyle.setStrokeColor(0x01234567);
  assertEquals(0x01234567, polygonStyle.getStrokeColor());
  assertEquals(0x01234567, polygonStyle.toPolygonOptions().getStrokeColor());
  polygonStyle.setStrokeColor(Color.parseColor("#000000"));
  assertEquals(Color.parseColor("#000000"), polygonStyle.getStrokeColor());
  assertEquals(Color.parseColor("#000000"),
      polygonStyle.toPolygonOptions().getStrokeColor());
}
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

public void testLineColor() throws Exception {
  KmlStyle kmlStyle = new KmlStyle();
  assertNotNull(kmlStyle);
  assertNotNull(kmlStyle.getPolygonOptions());
  assertNotNull(kmlStyle.getPolylineOptions());
  assertEquals(Color.BLACK, kmlStyle.getPolylineOptions().getColor());
  assertEquals(Color.BLACK, kmlStyle.getPolygonOptions().getStrokeColor());
  kmlStyle.setOutlineColor("FFFFFF");
  assertEquals(Color.WHITE, kmlStyle.getPolylineOptions().getColor());
  assertEquals(Color.WHITE, kmlStyle.getPolygonOptions().getStrokeColor());
}
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

public void testInlineStyle() throws Exception {
  XmlPullParser parser = createParser(com.google.maps.android.test.R.raw.amu_inline_style);
  KmlParser mParser = new KmlParser(parser);
  mParser.parseKml();
  assertNotNull(mParser.getPlacemarks());
  assertEquals(mParser.getPlacemarks().size(), 1);
  for (KmlPlacemark placemark : mParser.getPlacemarks().keySet()) {
    KmlStyle inlineStyle = placemark.getInlineStyle();
    assertNotNull(inlineStyle);
    assertEquals(inlineStyle.getPolylineOptions().getColor(),
        Color.parseColor("#000000"));
    assertEquals(inlineStyle.getPolygonOptions().getFillColor(),
        Color.parseColor("#ffffff"));
    assertEquals(inlineStyle.getPolylineOptions().getColor(),
        inlineStyle.getPolygonOptions().getStrokeColor());
    assertEquals(placemark.getGeometry().getGeometryType(), "MultiGeometry");
  }
}
origin: googlemaps/android-maps-utils

  public void testDefaultGetPolygonOptions() throws Exception {
    assertEquals(Color.TRANSPARENT, polygonStyle.toPolygonOptions().getFillColor());
    assertFalse(polygonStyle.toPolygonOptions().isGeodesic());
    assertEquals(Color.BLACK, polygonStyle.toPolygonOptions().getStrokeColor());
    assertEquals(10.0f, polygonStyle.toPolygonOptions().getStrokeWidth());
    assertTrue(polygonStyle.isVisible());
    assertEquals(0.0f, polygonStyle.toPolygonOptions().getZIndex());
  }
}
origin: wiglenet/wigle-wifi-wardriving

/**
 * Gets the stroke color of the GeoJsonPolygon as a 32-bit ARGB color
 *
 * @return stroke color of the GeoJsonPolygon
 */
public int getStrokeColor() {
  return mPolygonOptions.getStrokeColor();
}
origin: mg6maciej/android-maps-extensions

public int getStrokeColor() {
  return real.getStrokeColor();
}
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: 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;
}
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: car2go/AnyMaps

    output.getStrokeColor()
);
com.google.android.gms.maps.modelPolygonOptionsgetStrokeColor

Popular methods of PolygonOptions

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

Popular in Java

  • Running tasks concurrently on multiple threads
  • setContentView (Activity)
  • getApplicationContext (Context)
  • startActivity (Activity)
  • Table (com.google.common.collect)
    A collection that associates an ordered pair of keys, called a row key and a column key, with a sing
  • Pointer (com.sun.jna)
    An abstraction for a native pointer data type. A Pointer instance represents, on the Java side, a na
  • Font (java.awt)
    The Font class represents fonts, which are used to render text in a visible way. A font provides the
  • Timestamp (java.sql)
    A Java representation of the SQL TIMESTAMP type. It provides the capability of representing the SQL
  • HashSet (java.util)
    HashSet is an implementation of a Set. All optional operations (adding and removing) are supported.
  • LinkedHashMap (java.util)
    LinkedHashMap is an implementation of Map that guarantees iteration order. All optional operations a
  • From CI to AI: The AI layer in your organization
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