fillColor in Google Maps API polygon not working

≯℡__Kan透↙ 提交于 2019-12-08 07:27:29

you have problem in order of adding the latlng into the list. please do it in an order the 47 number latlng is initial problem . please have a look at it.

the latlng added into the list for drawing an polygon is to be in an order (either clockwise or anti-clockwise). so you should follow these orders.

let me know if this solves your problem.

Try like This

 // Instantiating CircleOptions to draw a circle around the marker

   CircleOptions circleOptions = new CircleOptions();

 // Specifying the center of the circle
   circleOptions.center(point);

 // Radius of the circle
    ircleOptions.radius(50);

 // Border color of the circle
   circleOptions.strokeColor(Color.BLACK);

 // Fill color of the circle
    // 0x represents, this is an hexadecimal code
    // 55 represents percentage of transparency. For 100% transparency, specify 00.
    // For 0% transparency ( ie, opaque ) , specify ff
    // The remaining 6 characters(00ff00) specify the fill color

   circleOptions.fillColor(0x5500ff00);

// Border width of the circle
   circleOptions.strokeWidth(2);

// Adding the circle to the GoogleMap
   googleMap.addCircle(circleOptions);
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!