ionic-frameworktomtom

TomTom map styles


I have an ionic capacitor app with a map where routes can be displayed. Everything works fine. I get the map using the @tomtom-international/web-sdk-maps library:

import tt from '@tomtom-international/web-sdk-maps';

(...)

    this.map = tt.map({
      key: "MY_TOMTOM_KEY"
      container: "map",
      center: [2, 41.5],
      zoom: 5,
    });   

It seems that there is a standard map style consisting of a satellite view with the roads on it, but I am unable to get it

I tried to include the parameter style: with different options, but none of them worked


Solution

  • This code worked for me.

    var map = tt.map({
    key: mykey,
    container: 'map',
    dragPan: !isMobileOrTablet(),
    style: {
      map: '2/basic_street-satellite',
      poi: '2/poi_light',
      trafficIncidents: '2/incidents_light',
      trafficFlow: '2/flow_relative-light'
    }
    });