I am trying to turn on the building heights in the map.
Below is what I have been doing so far.
load the vector tiles by calling the below function when the map is ready.
tomtomMap.getUiSettings().loadDefaultStyle();
create 3d layer regex
private static final String LAYERS_IN_3D_REGEX = "Subway Station 3D | Place of worship 3D | Railway Station 3D | Government Administration Office 3D | Other building 3D | School building 3D | Other town block 3D | Factory building 3D | Hospital building 3D | Hotel building 3D | Cultural Facility 3D";
set visibility of 3d layers
List<Layer> layers = tomtomMap.getStyleSettings().findLayersById(LAYERS_IN_3D_REGEX); int size = layers.size(); for(int i = 0; i < size; i++){ layers.get(i).setVisibility(Visibility.VISIBLE); }
But when I run the code, the map is terminated with an exception. Is there anything I am missing here? Any help would be appreciated.
Iāve tried your regex and indeed there were no layers found. I think it might be the space between ā|ā and the layer name because without spaces Iāve managed to find 11 layers.
private const val LAYERS_IN_3D_REGEX =
"Subway Station 3D|Place of worship 3D|Railway Station 3D|Government Administration Office 3D|Other building 3D|School building 3D|Other town block 3D|Factory building 3D|Hospital building 3D|Hotel building 3D|Cultural Facility 3D"
Could you try my regex without calling tomtomMap.getUiSettings().loadDefaultStyle(); before?