/** * Sets the stroke width of the Polygon in screen pixels * * @param strokeWidth stroke width value of the Polygon */ public void setPolygonStrokeWidth(float strokeWidth) { mPolygonOptions.strokeWidth(strokeWidth); }
public Builder<T> strokeWidth(float width) { this.polygonOptions.strokeWidth(width); return this; }
public Builder() { polygonOptions.strokeWidth(STROKE_WIDTH); polygonOptions.strokeColor(STROKE_COLOR); }
/** *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; }
.fillColor(Color.BLUE - ALPHA_ADJUSTMENT) .strokeColor(Color.BLUE) .strokeWidth(5)); .fillColor(Color.YELLOW - ALPHA_ADJUSTMENT) .strokeColor(Color.YELLOW) .strokeWidth(5)); .fillColor(Color.BLUE - ALPHA_ADJUSTMENT) .strokeColor(Color.BLUE) .strokeWidth(5)); .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())); } }
.fillColor(fillColorArgb) .strokeColor(strokeColorArgb) .strokeWidth(mStrokeWidthBar.getProgress()) .clickable(mClickabilityCheckbox.isChecked()));
public PolygonOptions strokeWidth(float width) { real.strokeWidth(width); 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)); }
/** * Sets the line width for a Polyline and a Polygon * * @param width Line width for a Polyline and a Polygon */ /* package */ void setWidth(Float width) { mPolylineOptions.width(width); mPolygonOptions.strokeWidth(width); mStylesSet.add("width"); }
/** * Sets the stroke width of the GeoJsonPolygon in screen pixels * * @param strokeWidth stroke width value of the GeoJsonPolygon */ public void setStrokeWidth(float strokeWidth) { mPolygonOptions.strokeWidth(strokeWidth); styleChanged(); }
area = SphericalUtil.computeArea(trace); areaOverlay = mMap.addPolygon( new PolygonOptions().addAll(trace).strokeWidth(0).fillColor(COLOR_POINT)); } else { area = 0;
/** *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); }
/** * 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; }
/** * 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())); } }
.fillColor(polygon.getFillColor()) .strokeColor(polygon.getUiOptions().getColor()) .strokeWidth(polygon.getUiOptions().getWidth()) .strokePattern(getStrokePattern(polygon.getUiOptions().getStrokePattern())) .zIndex(polygon.getUiOptions().getzIndex())