public Builder<T> strokeColor(int color) { polygonOptions.strokeColor(color); return this; }
/** * Sets the stroke color of the GeoJsonPolygon as a 32-bit ARGB color * * @param strokeColor stroke color value of the GeoJsonPolygon */ public void setStrokeColor(int strokeColor) { mPolygonOptions.strokeColor(strokeColor); styleChanged(); }
public Builder() { polygonOptions.strokeWidth(STROKE_WIDTH); polygonOptions.strokeColor(STROKE_COLOR); }
/** * Sets the outline color for a Polyline and a Polygon using a String * * @param color Outline color for a Polyline and a Polygon represented as a String */ /* package */ void setOutlineColor(String color) { // Add # to allow for mOutline color to be parsed correctly mPolylineOptions.color(Color.parseColor("#" + convertColor(color))); mPolygonOptions.strokeColor(Color.parseColor("#" + convertColor(color))); mStylesSet.add("outlineColor"); }
/** *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; }
/** * 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; }
.addAll(triangle) .fillColor(Color.BLUE - ALPHA_ADJUSTMENT) .strokeColor(Color.BLUE) .strokeWidth(5)); .addAll(simplifiedTriangle) .fillColor(Color.YELLOW - ALPHA_ADJUSTMENT) .strokeColor(Color.YELLOW) .strokeWidth(5)); .addAll(oval) .fillColor(Color.BLUE - ALPHA_ADJUSTMENT) .strokeColor(Color.BLUE) .strokeWidth(5)); .addAll(simplifiedOval) .fillColor(Color.YELLOW - ALPHA_ADJUSTMENT) .strokeColor(Color.YELLOW) .strokeWidth(5));
/** * 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())); } }
new LatLng(40.758393, -73.992705), new LatLng(40.753484, -73.980882)) .strokeColor(Color.BLUE);
.addHole(createRectangle(new LatLng(-18, 133), 0.5, 1.5)) .fillColor(fillColorArgb) .strokeColor(strokeColorArgb) .strokeWidth(mStrokeWidthBar.getProgress()) .clickable(mClickabilityCheckbox.isChecked()));
public PolygonOptions strokeColor(int color) { real.strokeColor(color); return this; }
/** * 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)); }
new LatLng(DARWIN.latitude - 3, DARWIN.longitude - 3)) .fillColor(Color.argb(150, 34, 173, 24)) .strokeColor(Color.rgb(34, 173, 24)) .clickable(true)); mDarwinPolygon.setTag(new CustomTag("Darwin polygon"));
/** * Sets the stroke color of the GeoJsonPolygon as a 32-bit ARGB color * * @param strokeColor stroke color value of the GeoJsonPolygon */ public void setStrokeColor(int strokeColor) { mPolygonOptions.strokeColor(strokeColor); styleChanged(); }
/** * Sets the outline color for a Polyline and a Polygon * * @param color Outline color for a Polyline and a Polygon */ /* package */ void setOutlineColor(String color) { // Add # to allow for mOutline color to be parsed correctly mPolylineOptions.color(Color.parseColor("#" + convertColor(color))); mPolygonOptions.strokeColor(Color.parseColor("#" + color)); mStylesSet.add("outlineColor"); }
/** *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; }
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); }
@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); }
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); }
/** * 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; }