Sorry, you need to enable JavaScript to visit this website.

Map with building heights

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 a 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 buildings 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 related [https://developer.tomtom.com/maps-api/maps-api-documentation-vector/tile]Vector Map Tiles and Map style.

In order to disable the display of the buildings 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", "Cultural Facility 3D. This will work in runtime.

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

_

layers = mapView.styleManager.currentStyle.getLayersByRegexs(["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"])
layers.forEach { layer in
    layer.visibility = visibility
}
self.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",
                                                                                                    @"Factory building 3D", @"Hospital building 3D", @"Hotel building 3D", @"Cultural Facility 3D", nil]];
for (TTMapLayer *layer in layers) {
    layer.visibility = visibility;
}

 



image

Switching the heights on

image

Switching the heights off

You are here