0

I am trying to load the 3D polygons on the map. I am able to successfully load the 3d polygon but i am not able to define the color for polygon.

     Polygon3DStyleBuilder polygon3DStyleBuilder = new Polygon3DStyleBuilder();
     polygon3DStyleBuilder.setColor(new Color(0xFF3333FF));
     Polygon3D polygon3D = new Polygon3D(polygon3DPoses, polygon3DHoles, polygon3DStyleBuilder.buildStyle(), 150);
   polygon3D.setMetaDataElement("ClickText", "3D Polygon");
  vectorDataSource.add(polygon3D);

As seen in the screen the side wall is in lighter color compared to the top one. Is there a way i can define different color for side walls and the top or the same color on both side?

enter image description here

Fahim
  • 12,198
  • 5
  • 39
  • 57
  • The color difference comes from lightning definition, without it you would not see 3D effect for the polygon. Currently you cannot set own different color (e.g. green) to the sides. – JaakL Oct 08 '15 at 14:40
  • @JaakL OK. Can I have the darker shade on side and lighter on top? – Fahim Oct 08 '15 at 17:12

1 Answers1

0

You may try setting the main light attributes as follows:

mapView.getOptions().setMainLight(new Color(1,1,1,1), new MapVec(0, 0, -1))

This will change the light direction to be from straight up. The top will be lighter and sides darken, but all sides will have the same color.

MarkT
  • 301
  • 2
  • 2