TKMapTiles

public class TKMapTiles : NSObject, Codable

This class encapsulates information about the map tiles of a trip segment.

  • A human-friendly name for these tiles

    Declaration

    Swift

    public let name: String
  • A list of URL templates to fetch the tiles. Can be multiple to not hit a single server with too many requests in parallel.

    Declaration

    Swift

    public let urlTemplates: [String]
  • Attributions to have to be displayed whenever the tiles are displayed

    Declaration

    Swift

    public let sources: [TKAPI.DataAttribution]
  • Creating a new instance from a JSON object.

    Declaration

    Swift

    public static func newInstance(from json: [String : Any]?) -> TKMapTiles?

    Parameters

    json

    JSON object, typically obtained from server response

    Return Value

    A new TKMapTiles instance.