Code example for PolygonOptions

0
                setUpMap(); 
            } 
        } 
    } 
 
    private void setUpMap() { 
        // Create a rectangle with two rectangular holes. 
        mMap.addPolygon(new PolygonOptions()
                .addAll(createCWRectangle(new LatLng(-20, 130), 5, 5))
                .addHole(createCWRectangle(new LatLng(-22, 128), 1, 1))
                .addHole(createCWRectangle(new LatLng(-18, 133), 0.5, 1.5))
                .fillColor(Color.CYAN)
                .strokeColor(Color.BLUE)
                .strokeWidth(5));
 
        // Create an ellipse centered at Sydney. 
        PolygonOptions options = new PolygonOptions();
        int numPoints = 400;
        float semiHorizontalAxis = 10f;
        float semiVerticalAxis = 5f;
        double phase = 2 * Math.PI / numPoints;