Allow your users to display the map in either raster or vector format:
Raster tiles are served as images. They require less processing power and memory to render, but have a larger file size than vector tiles.
Vector tiles take the form of data that describes map entries such as geographic points, forests, lakes, built up areas (as polygons), and roads (as lines). They are styled by means of a style sheet. Vector tiles can be scaled to different sizes without losing quality. The file size of vector tiles is smaller than that of raster tiles.
Sample use case 1: Your app is designed to use raster tiles for map display. You want to update the app with TomTom Online Maps raster tiles.
Sample use case 2: You want to take advantages of vector tiles features such as map 2.5 D perspective, custom map styles, etc.
Sample use case 3: Your app runs on devices with different capabilities. You want to use vector tiles for map display on powerful devices and raster tiles on devices with less processing power.
Use the code snippets below in your app to display the map with raster or vector tiles.