1

I got a question in my mind about how can I bound 2(or more) circle via android api.

enter image description here

The right side of the image is what I exactly want.

this is how can I creating my circle.

circle=mMap.addCircle(new CircleOptions()
.center(geoPoint
.radius(40)
.fillColor(0x12541252)
.strokeWidth(3)
.strokeColor(Color.RED));

I really will be glad, if you suggest me any way to solve my this problem..! thanks in advance!

seyid yagmur
  • 1,572
  • 17
  • 26
  • You can set Shape overlays order by setting their Z-indexes. By Default all the overlays has ZIndex=0. First circle's ZIndex should be lesser than second and then you can achieve you desired result as in above image. Please follow the link to get more help about https://developers.google.com/android/reference/com/google/android/gms/maps/model/Circle.html#setZIndex(float) – Hassan Jamil Dec 22 '16 at 07:08

1 Answers1

0

The order in which this tile overlay is drawn with respect to other overlays (including GroundOverlays, TileOverlays, Polylines, and Polygons but not Markers). An overlay with a larger z-index is drawn over overlays with smaller z-indices. The order of overlays with the same z-index is arbitrary. The default zIndex is 0.

Overlays (such as circles) with higher zIndices are drawn above those with lower indices.

You should use the method mentioned below with Circle and the ZIndex values for both the Circle should be different

public void setZIndex (float zIndex)

To get more help follow this link: https://developers.google.com/android/reference/com/google/android/gms/maps/model/Circle.html#setZIndex(float)

Hassan Jamil
  • 951
  • 1
  • 13
  • 33