The Maps SDK for iOS allows you to initialize the map with a previously setup configuration. For
this purpose, use the init method
TTMapView with frame and mapConfiguration.
TTMapConfiguration object allows you to set initial map values with the following method:
- viewportTransform: The
TTViewportTransformobject allows you to set an initial viewport transform for the map configuration.
- mapStyleConfiguration: The
TTStyleConfigurationobject allows you to add your own style configuration.
- TomTomLogoPosition: The
TTLogoPositionobject allows you to place the logo on the map where you wish by using enumerations containing positions and Offset information.
Use the following code snippets in your app to display maps of different locations (in this case, the current location by placing a bounding box on Amsterdam and by centering the point to the TomTom office in Łódź).
Centering the map on load using bounding box:
Centering the map on load using center on point:
You can also set the positions of the TomTom logo, but remember that the logo must fully fit into the bounds of mapview. Otherwise there is an exception due to an error in displaying the logo on the map.
Use the configuration object to initialize the map with the following code: