THIS SDK ISDEPRECATED.

We rolled out a new and better SDK for you.

Map with building heights

Allow your users to see the map either in 2.5D with the building heights enabled, or in 2D with building footprints.

Sample use case: Your application provides the possibility to display sophisticated visualization of the map with building heights (2.5D map) as well as display the map with building footprints (2D map).

The building heights data are available in Vector Map Tiles. The default TomTom map styles enable the display of building heights by default, but this can be disabled by switching off layers in the style.

Have a look at the detailed documentation for more information in Vector Map Tiles and Map style.

In order to disable the display of the building heights, you need to switch off corresponding layers in the style. That means that the following layers would need to be switched off in the default TomTom style: "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", and "Cultural Facility 3D. This will work in runtime.

Use the following code snippets in your app to display building footprints (i.e., switch building heights off):

1layers = mapView.styleManager.currentStyle.getLayersByRegexs(["Subway Station 3D",
2 "Place of worship 3D",
3 "Railway Station 3D",
4 "Government Administration Office 3D",
5 "Other building 3D",
6 "School building 3D",
7 "Other town block 3D",
8 "Factory building 3D",
9 "Hospital building 3D",
10 "Hotel building 3D",
11 "Cultural Facility 3D"])
12layers.forEach { layer in
13 layer.visibility = visibility
14}
1self.layers = [[self.mapView.styleManager currentStyle] getLayersByRegexs:[NSArray arrayWithObjects:@"Subway Station 3D", @"Place of worship 3D", @"Railway Station 3D", @"Government Administration Office 3D", @"Other building 3D", @"School building 3D", @"Other town block 3D",
2 @"Factory building 3D", @"Hospital building 3D", @"Hotel building 3D", @"Cultural Facility 3D", nil]]
3for (TTMapLayer *layer in layers) {
4 layer.visibility = visibility;
5}

image

Switching the heights on

image

Switching the heights off