MTMapReferenceStyle
public enum MTMapReferenceStyle : Identifiable, Hashable, Sendable, Codable
Defines purpose and guidelines on what information is displayed.
-
Unique id of the style.
Declaration
Swift
public var id: String { get } -
The classic default style, perfect for urban areas.
Declaration
Swift
case streets -
High resolution satellite images.
Declaration
Swift
case satellite -
A solid hiking companion, with peaks, parks, isolines and more.
Declaration
Swift
case outdoor -
A map for developing skiing, snowboarding and other winter activities and adventures.
Declaration
Swift
case winter -
A minimalist style for data visualization.
Declaration
Swift
case dataviz -
A clear general purpose map.
Declaration
Swift
case base -
A minimalist style for high contrast navigation.
Declaration
Swift
case bright -
Reference style for topographic study.
Declaration
Swift
case topo -
Reference style for very high contrast stylish maps.
Declaration
Swift
case toner -
Neutral greyscale style with hillshading suitable for colorful terrain-aware visualization.
Declaration
Swift
case backdrop -
Reference style without any variants.
Declaration
Swift
case openStreetMap -
Watercolor map for creative use.
Declaration
Swift
case aquarelle -
Light terrain map for data overlays.
Declaration
Swift
case landscape -
Detailed map of the ocean seafloor and bathymetry.
Declaration
Swift
case ocean -
Custom style from the URL.
Custom style does not have variants.
Declaration
Swift
case custom(URL)
-
Declaration
Swift
public init(from decoder: Decoder) throws -
Declaration
Swift
public func encode(to encoder: Encoder) throws -
Returns all child variants.
Declaration
Swift
public func getVariants() -> [MTMapStyleVariant]? -
Returns boolean indicating whether style is custom or pre-made.
Declaration
Swift
public func isCustom() -> Bool -
Returns the reference style name.
Declaration
Swift
public func getName() -> String -
Resolves the concrete MapTiler Cloud style URL for this reference style and optional variant. Returns
nilif the configuration is invalid or the custom URL is malformed.Declaration
Swift
public func fetchStyleURL(variant: MTMapStyleVariant? = nil, apiKey: String) -> URL? -
Returns all pre-made styles.
Declaration
Swift
public static func all() -> [MTMapReferenceStyle]