TTMapConfigurationBuilder

Objective-C

@interface TTMapConfigurationBuilder : NSObject

Swift

class TTMapConfigurationBuilder : NSObject

Use this builder to create a TTMapConfiguration tailored to your needs.

  • Unavailable

    Use the createBuilder method to create the builder.

    Declaration

    Objective-C

    - (instancetype _Nonnull)init;
  • Create an empty configuration builder.

    Declaration

    Objective-C

    + (TTMapConfigurationBuilder *_Nonnull)createBuilder;

    Swift

    class func create() -> TTMapConfigurationBuilder

    Return Value

    TTMapConfigurationBuilder.

  • Use this method to add map key for the map configuration.

    Declaration

    Objective-C

    - (TTMapConfigurationBuilder *_Nonnull)withMapKey:(NSString *_Nonnull)key;

    Swift

    func withMapKey(_ key: String) -> TTMapConfigurationBuilder

    Parameters

    key

    An initial map key for the map configuration.

    Return Value

    TTMapConfigurationBuilder.

  • Use this method to add traffic key for the map configuration.

    Declaration

    Objective-C

    - (TTMapConfigurationBuilder *_Nonnull)withTrafficKey:(NSString *_Nonnull)key;

    Swift

    func withTrafficKey(_ key: String) -> TTMapConfigurationBuilder

    Parameters

    key

    An initial traffic key for the map configuration.

    Return Value

    TTMapConfigurationBuilder.

  • Use this method to add an initial viewport transform for the map configuration.

    Declaration

    Objective-C

    - (TTMapConfigurationBuilder *_Nonnull)withViewportTransform:
        (id<TTViewportTransform> _Nonnull)viewportTransform;

    Swift

    func withViewportTransform(_ viewportTransform: TTViewportTransform) -> TTMapConfigurationBuilder

    Parameters

    viewportTransform

    An initial viewport transform for the map configuration.

    Return Value

    TTMapConfigurationBuilder.

  • Use this method to add an initial map style using TTLegacyMapStyleConfiguration, where the style can be loaded based on the provided URL string.

    Declaration

    Objective-C

    - (TTMapConfigurationBuilder *_Nonnull)withMapStyleConfiguration:
        (TTStyleConfiguration *_Nonnull)mapStyleConfiguration;

    Swift

    func withMapStyleConfiguration(_ mapStyleConfiguration: TTStyleConfiguration) -> TTMapConfigurationBuilder

    Parameters

    mapStyleConfiguration

    Base map style configuration. If not provided the default TomTom style will be used.

    Return Value

    TTMapConfigurationBuilder.

  • Use this method to add a TomTom logo position object for the map configuration.

    Declaration

    Objective-C

    - (TTMapConfigurationBuilder *_Nonnull)withTomTomLogoPosition:
        (TTLogoPosition *_Nonnull)logoPosition;

    Swift

    func withTomTomLogoPosition(_ logoPosition: TTLogoPosition) -> TTMapConfigurationBuilder

    Parameters

    logoPosition

    A logo position object used to position the TomTom logo on the MapView.

    Return Value

    TTMapConfigurationBuilder.

  • Based on the provided data, this builds the configuration object.

    Declaration

    Objective-C

    - (TTMapConfiguration *_Nonnull)build;

    Swift

    func build() -> TTMapConfiguration

    Return Value

    TTMapConfiguration A configuration built with parameters passed to the builder.