I am adding a Polygon into Google Map v2 like this:
for (int index = coordinats.size()-1; index >= 0; index--) {
polygonOptions.add(
new LatLng(latCoordinats.get(index), lngCoordinats.get(index)));
}
polygonOptions.strokeColor(0x7FFFFFFF);
polygonOptions.strokeWidth((float) 5);
polygonOptions.fillColor(Color.BLUE);
polygon= mMap.addPolygon(polygonOptions);
polygonOptions.fillColor(Color.BLUE);
is not working for me... What am i missing?
I am also tried polygonOptions.fillColor(Color.BLUE); and polygon.setFillColor(color); it has no effect for random latitude and longitude coordinates.
I Tested by giving only four corners latitude and longitude coordinates
new LatLng(-31.673, 128.892),
new LatLng(-31.952, 115.857),
new LatLng(-17.785, 122.258),
new LatLng(-12.4258, 130.7932)
polygonOptions.fillColor(Color.BLUE); is working
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With