Filling Color in polygon while points intersecting in Android
Asked Answered
S

0

8

I am trying to draw a polygon using hand on google map and then filling the color to the polygon.

Normally the color is filling fine and working as expected but if the polygon has intercepting point then the fill color is not working.

I am using below code to draw polygon and fill the color to the polygon

PolygonOptions drawShapeOptions = new PolygonOptions();
drawShapeOptions.addAll(mLatLngList);
drawShapeOptions.strokeColor(Color.BLACK);
drawShapeOptions.strokeWidth(5);
drawShapeOptions.fillColor(Color.GRAY);
mDrawShape = mGoogleMap.addPolygon(drawShapeOptions);

The Result is as below

enter image description here

How can i fill color in this polygon with intersecting points?

Summerly answered 13/11, 2014 at 7:28 Comment(3)
Any have answer for this question? Please come forward. I am under going with same issue.Ayres
MathanG can you share your code for drawing line because i follow this tutorial but not getting proper output #20901641Parvati
I guess the problem is that it is not sure, what needs to be filled. I mean, is it the inner shape that contains the dot or the surrounding shape? What needs to be colored in this case?Clustered

© 2022 - 2024 — McMap. All rights reserved.