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?

MathanG
  • 1,195
  • 10
  • 22
  • 1
    Any have answer for this question? Please come forward. I am under going with same issue. – GuruPrasath S Jan 16 '17 at 14:57
  • MathanG can you share your code for drawing line because i follow this tutorial but not getting proper output http://stackoverflow.com/questions/20901141/how-to-draw-free-hand-polygon-in-google-map-v2-in-android – Madhav_nimavat Apr 20 '17 at 05:22
  • 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? – MWB Oct 21 '18 at 18:57

0 Answers0