diff --git a/Sources/MapboxStatic/ClassicSnapshotOptions.swift b/Sources/MapboxStatic/ClassicSnapshotOptions.swift
index ac530c0..370fa76 100644
--- a/Sources/MapboxStatic/ClassicSnapshotOptions.swift
+++ b/Sources/MapboxStatic/ClassicSnapshotOptions.swift
@@ -9,9 +9,9 @@ import CoreLocation
/**
- A structure that determines what a snapshot depicts and how it is formatted. A classic snapshot is made by compositing one or more [tile sets](https://www.mapbox.com/help/define-tileset/) with optional overlays using the [Legacy Static Images API](https://docs.mapbox.com/api/legacy/static-classic).
+ A structure that determines what a snapshot depicts and how it is formatted. A classic snapshot is made by compositing one or more [tile sets](https://docs.mapbox.com/help/glossary/tileset/) with optional overlays using the [Legacy Static Images API](https://docs.mapbox.com/api/legacy/static-classic).
- Typically, you use a `ClassicSnapshotOptions` object to generate a snapshot of a [raster tile set](https://www.mapbox.com/help/define-tileset/#raster-tilesets). If you use `ClassicSnapshotOptions` to display a [vector tile set](https://www.mapbox.com/help/define-tileset/#vector-tilesets), the snapshot image will depict a wireframe representation of the tile set. To generate a static, styled image of a vector tile set, use a `SnapshotOptions` object.
+ Typically, you use a `ClassicSnapshotOptions` object to generate a snapshot of a [raster tile set](https://docs.mapbox.com/help/glossary/tileset/#raster-tilesets). If you use `ClassicSnapshotOptions` to display a [vector tile set](https://docs.mapbox.com/help/glossary/tileset/#vector-tilesets), the snapshot image will depict a wireframe representation of the tile set. To generate a static, styled image of a vector tile set, use a `SnapshotOptions` object.
*/
@objc(MBClassicSnapshotOptions)
open class ClassicSnapshotOptions: NSObject, SnapshotOptionsProtocol {
@@ -66,11 +66,11 @@ open class ClassicSnapshotOptions: NSObject, SnapshotOptionsProtocol {
// MARK: Configuring the Map Data
/**
- An array of [map identifiers](https://www.mapbox.com/help/define-map-id/) of the form `username.id`, identifying the [tile sets](https://www.mapbox.com/help/define-tileset/) to display in the snapshot. This array may not be empty.
+ An array of [tile set identifiers](https://docs.mapbox.com/help/glossary/tileset-id/) of the form `username.id`, identifying the [tile sets](https://docs.mapbox.com/help/glossary/tileset/) to display in the snapshot. This array may not be empty.
- The order of the map identifiers in the array reflects their visible order in the snapshot, with the tile set identified at index 0 being the backmost tile set.
+ The order of the tile set identifiers in the array reflects their visible order in the snapshot, with the tile set identified at index 0 being the backmost tile set.
*/
- @objc open var mapIdentifiers: [String]
+ @objc open var tileSetIdentifiers: [String]
/**
An array of overlays to draw atop the map.
@@ -145,24 +145,24 @@ open class ClassicSnapshotOptions: NSObject, SnapshotOptionsProtocol {
After initializing a snapshot options instance with this initializer, set the `overlays` property to specify the overlays to fit the snapshot to.
- - parameter mapIdentifiers: An array of [map identifiers](https://www.mapbox.com/help/define-map-id/) of the form `username.id`, identifying the [tile sets](https://www.mapbox.com/help/define-tileset/) to display in the snapshot. This array may not be empty.
+ - parameter tileSetIdentifiers: An array of [tile set identifiers](https://docs.mapbox.com/help/glossary/tileset-id/) of the form `username.id`, identifying the [tile sets](https://docs.mapbox.com/help/glossary/tileset/) to display in the snapshot. This array may not be empty.
- parameter size: The logical size of the image to output, measured in points.
*/
- @objc public init(mapIdentifiers: [String], size: CGSize) {
- self.mapIdentifiers = mapIdentifiers
+ @objc public init(tileSetIdentifiers: [String], size: CGSize) {
+ self.tileSetIdentifiers = tileSetIdentifiers
self.size = size
}
/**
Initializes a snapshot options instance that results in a snapshot centered at the given geographical coordinate and showing the given zoom level.
- - parameter mapIdentifiers: An array of [map identifiers](https://www.mapbox.com/help/define-map-id/) of the form `username.id`, identifying the [tile sets](https://www.mapbox.com/help/define-tileset/) to display in the snapshot. This array may not be empty.
+ - parameter tileSetIdentifiers: An array of [tile set identifiers](https://docs.mapbox.com/help/glossary/tileset-id/) of the form `username.id`, identifying the [tile sets](https://docs.mapbox.com/help/glossary/tileset/) to display in the snapshot. This array may not be empty.
- parameter centerCoordinate: The geographic coordinate at the center of the snapshot.
- parameter zoomLevel: The zoom level of the snapshot.
- parameter size: The logical size of the image to output, measured in points.
*/
- @objc public init(mapIdentifiers: [String], centerCoordinate: CLLocationCoordinate2D, zoomLevel: Int, size: CGSize) {
- self.mapIdentifiers = mapIdentifiers
+ @objc public init(tileSetIdentifiers: [String], centerCoordinate: CLLocationCoordinate2D, zoomLevel: Int, size: CGSize) {
+ self.tileSetIdentifiers = tileSetIdentifiers
self.centerCoordinate = centerCoordinate
self.zoomLevel = zoomLevel
self.size = size
@@ -174,8 +174,8 @@ open class ClassicSnapshotOptions: NSObject, SnapshotOptionsProtocol {
- returns: An HTTP URL path.
*/
@objc open var path: String {
- assert(!mapIdentifiers.isEmpty, "At least one map identifier must be specified.")
- let tileSetComponent = mapIdentifiers.joined(separator: ",")
+ assert(!tileSetIdentifiers.isEmpty, "At least one tile set identifier must be specified.")
+ let tileSetComponent = tileSetIdentifiers.joined(separator: ",")
let position: String
if let centerCoordinate = centerCoordinate {
diff --git a/Sources/MapboxStatic/MarkerOptions.swift b/Sources/MapboxStatic/MarkerOptions.swift
index cf3cbf7..029da3c 100644
--- a/Sources/MapboxStatic/MarkerOptions.swift
+++ b/Sources/MapboxStatic/MarkerOptions.swift
@@ -74,7 +74,7 @@ open class MarkerOptions: MarkerImage, SnapshotOptionsProtocol {
Initializes a marker options instance that results in a red marker with a Maki icon.
- parameter size: The size of the marker.
- - parameter iconName: The name of a [Maki](https://www.mapbox.com/maki-icons/) v0.5.0 icon to place atop the pin.
+ - parameter iconName: The name of a [Maki](https://labs.mapbox.com/maki-icons/) v0.5.0 icon to place atop the pin.
*/
public convenience init(size: Size = .small, iconName: String) {
self.init(size: size, label: .iconName(iconName))
diff --git a/Sources/MapboxStatic/Overlay.swift b/Sources/MapboxStatic/Overlay.swift
index efa4455..fa84aab 100644
--- a/Sources/MapboxStatic/Overlay.swift
+++ b/Sources/MapboxStatic/Overlay.swift
@@ -72,9 +72,9 @@ open class MarkerImage: NSObject {
/// A number from 0 through 99.
case number(Int)
/**
- The name of a [Maki](https://www.mapbox.com/maki-icons/) icon.
+ The name of a [Maki](https://labs.mapbox.com/maki-icons/) icon.
- The Static Images API uses Maki v4.0.0. See valid values at the [Maki](https://www.mapbox.com/maki-icons/) website. The Legacy Static Images API uses Maki v0.5.0. Valid values for classic snapshots are identified by the `icon` values in [this JSON file](https://github.com/mapbox/maki/blob/v0.5.0/_includes/maki.json).
+ The Static Images API uses Maki v4.0.0. See valid values at the [Maki](https://labs.mapbox.com/maki-icons/) website. The Legacy Static Images API uses Maki v0.5.0. Valid values for classic snapshots are identified by the `icon` values in [this JSON file](https://github.com/mapbox/maki/blob/v0.5.0/_includes/maki.json).
*/
case iconName(String)
@@ -184,15 +184,15 @@ open class Marker: MarkerImage, Point {
}
/**
- Initializes a red marker with a [Maki](https://www.mapbox.com/maki-icons/) icon.
+ Initializes a red marker with a [Maki](https://labs.mapbox.com/maki-icons/) icon.
The Maki icon set is [open source](https://github.com/mapbox/maki/) and [dedicated to the public domain](https://creativecommons.org/publicdomain/zero/1.0/).
- The Static Images API uses Maki v4.0.0. See valid values at the [Maki](https://www.mapbox.com/maki-icons/) website. The Legacy Static Images API uses Maki v0.5.0. Valid values for classic snapshots are identified by the `icon` values in [this JSON file](https://github.com/mapbox/maki/blob/v0.5.0/_includes/maki.json).
+ The Static Images API uses Maki v4.0.0. See valid values at the [Maki](https://labs.mapbox.com/maki-icons/) website. The Legacy Static Images API uses Maki v0.5.0. Valid values for classic snapshots are identified by the `icon` values in [this JSON file](https://github.com/mapbox/maki/blob/v0.5.0/_includes/maki.json).
- parameter coordinate: The geographic coordinate to place the marker at.
- parameter size: The size of the marker.
- - parameter iconName: The name of a [Maki](https://www.mapbox.com/maki-icons/) icon to place atop the pin.
+ - parameter iconName: The name of a [Maki](https://labs.mapbox.com/maki-icons/) icon to place atop the pin.
*/
@objc public convenience init(coordinate: CLLocationCoordinate2D,
size: Size = .small,
@@ -247,7 +247,7 @@ open class CustomMarker: NSObject, Overlay {
}
/**
- A geographic object in [GeoJSON](https://www.mapbox.com/help/define-geojson/) format.
+ A geographic object in [GeoJSON](https://docs.mapbox.com/help/glossary/geojson/) format.
GeoJSON features may be styled according to the [simplestyle specification](https://github.com/mapbox/simplestyle-spec).
*/
@@ -262,7 +262,7 @@ open class GeoJSON: NSObject, Overlay {
}
/**
- Initializes a [GeoJSON](https://www.mapbox.com/help/define-geojson/) overlay with the given GeoJSON object.
+ Initializes a [GeoJSON](https://docs.mapbox.com/help/glossary/geojson/) overlay with the given GeoJSON object.
- parameter object: A valid GeoJSON object.
- returns: A GeoJSON overlay, or `nil` if the given object is not a valid JSON object. This initializer does not check whether the object is valid GeoJSON, but invalid GeoJSON will cause the request to fail.
@@ -273,7 +273,7 @@ open class GeoJSON: NSObject, Overlay {
}
/**
- Initializes a [GeoJSON](https://www.mapbox.com/help/define-geojson/) overlay with the given string representation of a GeoJSON object.
+ Initializes a [GeoJSON](https://docs.mapbox.com/help/glossary/geojson/) overlay with the given string representation of a GeoJSON object.
This initializer does not check whether the object is valid JSON or GeoJSON, but invalid JSON or GeoJSON will cause the request to fail. To perform basic JSON validation (but not GeoJSON validation), use the `init(object:)` initializer.
diff --git a/Sources/MapboxStatic/Snapshot.swift b/Sources/MapboxStatic/Snapshot.swift
index bbb9477..a707ab3 100644
--- a/Sources/MapboxStatic/Snapshot.swift
+++ b/Sources/MapboxStatic/Snapshot.swift
@@ -72,7 +72,7 @@ public protocol SnapshotOptionsProtocol: NSObjectProtocol {
/**
A `Snapshot` instance represents a static snapshot of a map with optional overlays. With a snapshot instance, you can synchronously or asynchronously generate an image based on the options you provide via an HTTP request, or you can get the URL used to make this request. The image is obtained on demand from the [Mapbox Static Images API](https://docs.mapbox.com/api/maps/#static-images) or the [Legacy Static Images API](https://docs.mapbox.com/api/legacy/static-classic/#retrieve-a-static-map-image), depending on whether you use a `SnapshotOptions` object or a `ClassicSnapshotOptions` object.
- The snapshot image can be used in an image view (`UIImage` on iOS and tvOS, `NSImage` on macOS, `WKImage` on watchOS). The image does not respond to user gestures. To add interactivity, use the [Mapbox Maps SDK for iOS](https://www.mapbox.com/ios-sdk/) or the [Mapbox Maps SDK for macOS](https://github.com/mapbox/mapbox-gl-native/tree/master/platform/macos/), which can optionally display raster tiles. If you are already using the map SDKs for iOS or macOS, use the `MGLMapSnapshotter` object instead of this class to take advantage of caching and offline packs.
+ The snapshot image can be used in an image view (`UIImage` on iOS and tvOS, `NSImage` on macOS, `WKImage` on watchOS). The image does not respond to user gestures. To add interactivity, use the [Mapbox Maps SDK for iOS](https://docs.mapbox.com/ios/maps/) or the [Mapbox Maps SDK for macOS](https://mapbox.github.io/mapbox-gl-native/macos/), which can optionally display raster tiles. If you are already using the map SDKs for iOS or macOS, use the `MGLMapSnapshotter` object instead of this class to take advantage of caching and offline packs.
*/
@objc(MBSnapshot)
open class Snapshot: NSObject {
@@ -103,12 +103,12 @@ open class Snapshot: NSObject {
Initializes a newly created snapshot instance with the given options and an optional access token and host.
- parameter options: Options that determine the contents and format of the output image.
- - parameter accessToken: A Mapbox [access token](https://www.mapbox.com/help/define-access-token/). If an access token is not specified when initializing the snapshot object, it should be specified in the `MGLMapboxAccessToken` key in the main application bundle’s Info.plist.
+ - parameter accessToken: A Mapbox [access token](https://docs.mapbox.com/help/glossary/access-token/). If an access token is not specified when initializing the snapshot object, it should be specified in the `MGLMapboxAccessToken` key in the main application bundle’s Info.plist.
- parameter host: An optional hostname to the server API. The official Mapbox API endpoint is used by default.
*/
@objc public init(options: SnapshotOptionsProtocol, accessToken: String?, host: String?) {
let accessToken = accessToken ?? defaultAccessToken
- assert(accessToken != nil && !accessToken!.isEmpty, "A Mapbox access token is required. Go to . In Info.plist, set the MGLMapboxAccessToken key to your access token, or use the Snapshot(options:accessToken:host:) initializer.")
+ assert(accessToken != nil && !accessToken!.isEmpty, "A Mapbox access token is required. Go to . In Info.plist, set the MGLMapboxAccessToken key to your access token, or use the Snapshot(options:accessToken:host:) initializer.")
self.options = options
self.accessToken = accessToken!
@@ -125,7 +125,7 @@ open class Snapshot: NSObject {
The snapshot instance sends requests to the official Mapbox API endpoint.
- parameter options: Options that determine the contents and format of the output image.
- - parameter accessToken: A Mapbox [access token](https://www.mapbox.com/help/define-access-token/). If an access token is not specified when initializing the snapshot object, it should be specified in the `MGLMapboxAccessToken` key in the main application bundle’s Info.plist.
+ - parameter accessToken: A Mapbox [access token](https://docs.mapbox.com/help/glossary/access-token/). If an access token is not specified when initializing the snapshot object, it should be specified in the `MGLMapboxAccessToken` key in the main application bundle’s Info.plist.
*/
@objc public convenience init(options: SnapshotOptionsProtocol, accessToken: String?) {
self.init(options: options, accessToken: accessToken, host: nil)
diff --git a/Sources/MapboxStatic/SnapshotOptions.swift b/Sources/MapboxStatic/SnapshotOptions.swift
index 33f5050..7d98927 100644
--- a/Sources/MapboxStatic/SnapshotOptions.swift
+++ b/Sources/MapboxStatic/SnapshotOptions.swift
@@ -166,7 +166,7 @@ open class SnapshotCamera: NSObject {
}
/**
- A structure that determines what a snapshot depicts and how it is formatted. A static snapshot is made by compositing a [style](https://www.mapbox.com/help/define-style/) with optional overlays using the [Mapbox Static Images API](https://docs.mapbox.com/api/maps/#static-images). You can use a [Mapbox-designed style](https://docs.mapbox.com/api/maps/#styles) or design your own custom style using [Mapbox Studio](https://www.mapbox.com/studio/). You can only snapshot a style hosted by Mapbox.
+ A structure that determines what a snapshot depicts and how it is formatted. A static snapshot is made by compositing a [style](https://docs.mapbox.com/help/glossary/style/) with optional overlays using the [Mapbox Static Images API](https://docs.mapbox.com/api/maps/#static-images). You can use a [Mapbox-designed style](https://docs.mapbox.com/api/maps/#styles) or design your own custom style using [Mapbox Studio](https://studio.mapbox.com/). You can only snapshot a style hosted by Mapbox.
To generate a static, styled image of a tile set, especially a raster tile set, use a `Classic SnapshotOptions` object.
@@ -177,7 +177,7 @@ open class SnapshotOptions: NSObject, SnapshotOptionsProtocol {
// MARK: Configuring the Map Data
/**
- The [style URL](https://www.mapbox.com/help/define-style-url/) of the style to snapshot.
+ The [style URL](https://docs.mapbox.com/help/glossary/style-url/) of the style to snapshot.
Only `mapbox:` URLs are supported. You can only snapshot a style hosted by Mapbox, such as a [Mapbox-designed style](https://docs.mapbox.com/api/maps/#styles).
*/
@@ -191,13 +191,13 @@ open class SnapshotOptions: NSObject, SnapshotOptionsProtocol {
@objc open var overlays: [Overlay] = []
/**
- The identifier of the [style layer](https://www.mapbox.com/help/define-layer/) below which any overlays should be inserted.
+ The identifier of the [style layer](https://docs.mapbox.com/help/glossary/layer/) below which any overlays should be inserted.
- This property allows you to insert overlays at any level of the map, not necessarily at the top. For example, if you are adding `Path` overlays to the snapshot, you may want to place them below any [symbol layers](https://www.mapbox.com/mapbox-gl-js/style-spec/#layer-type) to ensure that street and point of interest labels remain legible.
+ This property allows you to insert overlays at any level of the map, not necessarily at the top. For example, if you are adding `Path` overlays to the snapshot, you may want to place them below any [symbol layers](https://docs.mapbox.com/mapbox-gl-js/style-spec/#layer-type) to ensure that street and point of interest labels remain legible.
If this property is set to `nil`, any overlays are placed atop any layers defined by the style. By default, this property is set to `nil`.
- Layer identifiers are not guaranteed to exist across styles or different versions of the same style. To find out the layer identifiers in a particular style, view the style in [Mapbox Studio](https://www.mapbox.com/studio/).
+ Layer identifiers are not guaranteed to exist across styles or different versions of the same style. To find out the layer identifiers in a particular style, view the style in [Mapbox Studio](https://studio.mapbox.com/).
*/
@objc open var identifierOfLayerAboveOverlays: String?
@@ -253,7 +253,7 @@ open class SnapshotOptions: NSObject, SnapshotOptionsProtocol {
When shown, the Mapbox logo is located in the lower-left corner of the image. By default, this property is set to `true`.
- - note: The Mapbox terms of service [requires](https://www.mapbox.com/help/attribution/) the [Mapbox logo](https://www.mapbox.com/about/press/brand-guidelines/) to accompany the snapshot. In general, you should not set this property to `false`. Contact your Mapbox sales representative for information about waiving this requirement. This requirement is distinct from the requirement that governs the `showsAttribution` property.
+ - note: The Mapbox terms of service [requires](https://docs.mapbox.com/help/how-mapbox-works/attribution/) the [Mapbox logo](https://www.mapbox.com/about/press/brand-guidelines/) to accompany the snapshot. In general, you should not set this property to `false`. Contact your Mapbox sales representative for information about waiving this requirement. This requirement is distinct from the requirement that governs the `showsAttribution` property.
*/
@objc open var showsLogo = true
@@ -262,7 +262,7 @@ open class SnapshotOptions: NSObject, SnapshotOptionsProtocol {
When shown, the attribution is located in the bottom-right corner of the image. By default, this property is set to `true`.
- - note: The Mapbox terms of service, which governs the use of Mapbox-hosted vector tiles and styles, [requires](https://www.mapbox.com/help/attribution/) these copyright notices to accompany any map that features Mapbox-designed styles, OpenStreetMap data, or other Mapbox data such as satellite or terrain data. If this requirement applies to the shapshot and you set this property to `false`, you must provide [proper attribution](https://www.mapbox.com/help/attribution/#static--print) near the snapshot. This requirement is distinct from the requirement that governs the `showsLogo` property.
+ - note: The Mapbox terms of service, which governs the use of Mapbox-hosted vector tiles and styles, [requires](https://docs.mapbox.com/help/how-mapbox-works/attribution/) these copyright notices to accompany any map that features Mapbox-designed styles, OpenStreetMap data, or other Mapbox data such as satellite or terrain data. If this requirement applies to the shapshot and you set this property to `false`, you must provide [proper attribution](https://docs.mapbox.com/help/how-mapbox-works/attribution/#static--print) near the snapshot. This requirement is distinct from the requirement that governs the `showsLogo` property.
*/
@objc open var showsAttribution = true
@@ -271,7 +271,7 @@ open class SnapshotOptions: NSObject, SnapshotOptionsProtocol {
After initializing a snapshot options instance with this initializer, set the `overlays` property to specify the overlays to fit the snapshot to.
- - parameter styleURL: The [style URL](https://www.mapbox.com/help/define-style-url/) of the style to snapshot. Only `mapbox:` URLs are supported. You can only snapshot a style hosted by Mapbox, such as a [Mapbox-designed style](https://docs.mapbox.com/api/maps/#styles).
+ - parameter styleURL: The [style URL](https://docs.mapbox.com/help/glossary/style-url/) of the style to snapshot. Only `mapbox:` URLs are supported. You can only snapshot a style hosted by Mapbox, such as a [Mapbox-designed style](https://docs.mapbox.com/api/maps/#mapbox-styles).
- parameter size: The logical size of the image to output, measured in points.
*/
@objc public init(styleURL: URL, size: CGSize) {
@@ -282,7 +282,7 @@ open class SnapshotOptions: NSObject, SnapshotOptionsProtocol {
/**
Initializes a snapshot options instance that results in a snapshot centered at the given geographical coordinate and showing the given zoom level.
- - parameter styleURL: The [style URL](https://www.mapbox.com/help/define-style-url/) of the style to snapshot. Only `mapbox:` URLs are supported. You can only snapshot a style hosted by Mapbox, such as a [Mapbox-designed style](https://docs.mapbox.com/api/maps/#styles).
+ - parameter styleURL: The [style URL](https://docs.mapbox.com/help/glossary/style-url/) of the style to snapshot. Only `mapbox:` URLs are supported. You can only snapshot a style hosted by Mapbox, such as a [Mapbox-designed style](https://docs.mapbox.com/api/maps/#mapbox-styles).
- parameter camera: The viewpoint from which the snapshot is taken.
- parameter size: The logical size of the image to output, measured in points.
*/
@@ -298,8 +298,8 @@ open class SnapshotOptions: NSObject, SnapshotOptionsProtocol {
- returns: An HTTP URL path.
*/
@objc open var path: String {
- assert(styleURL.scheme == "mapbox", "Only mapbox: URLs are supported. See https://www.mapbox.com/help/define-style-url/ or https://docs.mapbox.com/api/maps/#styles for valid style URLs.")
- assert(styleURL.host == "styles", "Invalid mapbox: URL. See https://www.mapbox.com/help/define-style-url/ or https://docs.mapbox.com/api/maps/#styles for valid style URLs.")
+ assert(styleURL.scheme == "mapbox", "Only mapbox: URLs are supported. See https://docs.mapbox.com/help/glossary/style-url/ or https://docs.mapbox.com/api/maps/#mapbox-styles for valid style URLs.")
+ assert(styleURL.host == "styles", "Invalid mapbox: URL. See https://docs.mapbox.com/help/glossary/style-url/ or https://docs.mapbox.com/api/maps/#mapbox-styles for valid style URLs.")
let styleIdentifierComponent = "\(styleURL.path)/static"
let position = camera?.string(size: size) ?? "auto"
diff --git a/Tests/MapboxStaticTests/ClassicOverlayTests.swift b/Tests/MapboxStaticTests/ClassicOverlayTests.swift
index 6a2c753..d21b14d 100644
--- a/Tests/MapboxStaticTests/ClassicOverlayTests.swift
+++ b/Tests/MapboxStaticTests/ClassicOverlayTests.swift
@@ -24,7 +24,7 @@ class ClassicOverlayTests: XCTestCase {
markerOverlay.color = .brown
let options = ClassicSnapshotOptions(
- mapIdentifiers: ["mapbox.streets"],
+ tileSetIdentifiers: ["mapbox.streets"],
size: CGSize(width: 200, height: 200))
options.overlays = [markerOverlay]
options.scale = 1
@@ -47,12 +47,12 @@ class ClassicOverlayTests: XCTestCase {
func testCustomMarker() {
let coordinate = CLLocationCoordinate2D(latitude: 45.522, longitude: -122.69)
- let markerURL = URL(string: "https://www.mapbox.com/help/img/screenshots/rocket.png")!
+ let markerURL = URL(string: "https://docs.mapbox.com/help/img/screenshots/airport-15.png")!
let customMarker = CustomMarker(coordinate: coordinate, url: markerURL)
let options = ClassicSnapshotOptions(
- mapIdentifiers: ["mapbox.streets"],
+ tileSetIdentifiers: ["mapbox.streets"],
size: CGSize(width: 200, height: 200))
options.overlays = [customMarker]
options.scale = 1
@@ -74,7 +74,7 @@ class ClassicOverlayTests: XCTestCase {
let geoJSONOverlay = GeoJSON(objectString: geoJSONString)
let options = ClassicSnapshotOptions(
- mapIdentifiers: ["mapbox.streets"],
+ tileSetIdentifiers: ["mapbox.streets"],
size: CGSize(width: 200, height: 200))
options.overlays = [geoJSONOverlay]
options.scale = 1
@@ -97,7 +97,7 @@ class ClassicOverlayTests: XCTestCase {
let geoJSONOverlay = try! GeoJSON(object: geoJSON)
let options = ClassicSnapshotOptions(
- mapIdentifiers: ["mapbox.streets"],
+ tileSetIdentifiers: ["mapbox.streets"],
size: CGSize(width: 200, height: 200))
options.overlays = [geoJSONOverlay]
options.scale = 1
@@ -141,7 +141,7 @@ class ClassicOverlayTests: XCTestCase {
path.fillColor = Color.red.withAlphaComponent(0.25)
let options = ClassicSnapshotOptions(
- mapIdentifiers: ["mapbox.streets"],
+ tileSetIdentifiers: ["mapbox.streets"],
size: CGSize(width: 200, height: 200))
options.overlays = [path]
options.scale = 1
diff --git a/Tests/MapboxStaticTests/ClassicSnapshotTests.swift b/Tests/MapboxStaticTests/ClassicSnapshotTests.swift
index 6cd79c0..b9eb381 100644
--- a/Tests/MapboxStaticTests/ClassicSnapshotTests.swift
+++ b/Tests/MapboxStaticTests/ClassicSnapshotTests.swift
@@ -11,7 +11,7 @@ class ClassicSnapshotTests: XCTestCase {
}
func testBasicMap() {
- let options = ClassicSnapshotOptions(mapIdentifiers: ["mapbox.mapbox-streets-v6"], size: CGSize(width: 200, height: 200))
+ let options = ClassicSnapshotOptions(tileSetIdentifiers: ["mapbox.mapbox-streets-v6"], size: CGSize(width: 200, height: 200))
options.scale = 1
stub(condition: isHost("api.mapbox.com")
@@ -42,7 +42,7 @@ class ClassicSnapshotTests: XCTestCase {
func testCenter() {
let options = ClassicSnapshotOptions(
- mapIdentifiers: ["mapbox.mapbox-streets-v6"],
+ tileSetIdentifiers: ["mapbox.mapbox-streets-v6"],
centerCoordinate: CLLocationCoordinate2D(latitude: 5.971389, longitude: 116.095278),
zoomLevel: 0,
size: CGSize(width: 200, height: 200))
@@ -60,7 +60,7 @@ class ClassicSnapshotTests: XCTestCase {
func testZoom() {
let options = ClassicSnapshotOptions(
- mapIdentifiers: ["mapbox.mapbox-streets-v6"],
+ tileSetIdentifiers: ["mapbox.mapbox-streets-v6"],
centerCoordinate: CLLocationCoordinate2D(latitude: 0, longitude: 0),
zoomLevel: 6,
size: CGSize(width: 300, height: 300))
@@ -84,7 +84,7 @@ class ClassicSnapshotTests: XCTestCase {
let height = arc4random_uniform(max - min) + min
let options = ClassicSnapshotOptions(
- mapIdentifiers: ["mapbox.mapbox-streets-v6"],
+ tileSetIdentifiers: ["mapbox.mapbox-streets-v6"],
size: CGSize(width: CGFloat(width), height: CGFloat(height)))
options.scale = 1
@@ -145,7 +145,7 @@ class ClassicSnapshotTests: XCTestCase {
func testFormat(_ format: ClassicSnapshotOptions.Format, pathExtension: String, mimeType: String) {
let options = ClassicSnapshotOptions(
- mapIdentifiers: ["mapbox.streets"],
+ tileSetIdentifiers: ["mapbox.streets"],
size: CGSize(width: 200, height: 200))
options.format = format
options.scale = 1
diff --git a/iOS.playground/Contents.swift b/iOS.playground/Contents.swift
index 4fdcf6e..75bc35f 100644
--- a/iOS.playground/Contents.swift
+++ b/iOS.playground/Contents.swift
@@ -21,7 +21,7 @@ import MapboxStatic
*/
let styleURL = URL(string: "mapbox://styles/mapbox/streets-v9")!
-let mapIdentifiers = ["mapbox.satellite"]
+let tileSetIdentifiers = ["mapbox.satellite"]
let accessToken = "pk.eyJ1IjoibWFwYm94IiwiYSI6ImNqMHFiNXN4ZDAxazMyd253cmt3a2hmN2cifQ.q0ntnAWEdwckfZnT0IEy5A"
/*:
@@ -64,7 +64,7 @@ snapshot.url
*/
let classicOptions = ClassicSnapshotOptions(
- mapIdentifiers: mapIdentifiers,
+ tileSetIdentifiers: tileSetIdentifiers,
centerCoordinate: CLLocationCoordinate2D(latitude: 45.52, longitude: -122.681944),
zoomLevel: 13,
size: CGSize(width: 300, height: 200))
@@ -98,7 +98,7 @@ snapshot.image
*/
let customMarker = CustomMarker(
coordinate: CLLocationCoordinate2D(latitude: 45.522, longitude: -122.69),
- url: URL(string: "https://www.mapbox.com/help/img/screenshots/rocket.png")!)
+ url: URL(string: "https://docs.mapbox.com/help/img/screenshots/airport-15.png")!)
options.overlays = [customMarker]
snapshot = Snapshot(
options: options,
diff --git a/iOS.playground/timeline.xctimeline b/iOS.playground/timeline.xctimeline
index fdadfdf..f38734d 100644
--- a/iOS.playground/timeline.xctimeline
+++ b/iOS.playground/timeline.xctimeline
@@ -3,157 +3,157 @@
version = "3.0">
diff --git a/macOS.playground/Contents.swift b/macOS.playground/Contents.swift
index cd494a2..0fa77eb 100644
--- a/macOS.playground/Contents.swift
+++ b/macOS.playground/Contents.swift
@@ -21,7 +21,7 @@ import MapboxStatic
*/
let styleURL = URL(string: "mapbox://styles/mapbox/streets-v9")!
-let mapIdentifiers = ["mapbox.satellite"]
+let tileSetIdentifiers = ["mapbox.satellite"]
let accessToken = "pk.eyJ1IjoibWFwYm94IiwiYSI6ImNqMHFiNXN4ZDAxazMyd253cmt3a2hmN2cifQ.q0ntnAWEdwckfZnT0IEy5A"
/*:
@@ -64,7 +64,7 @@ snapshot.url
*/
let classicOptions = ClassicSnapshotOptions(
- mapIdentifiers: mapIdentifiers,
+ tileSetIdentifiers: tileSetIdentifiers,
centerCoordinate: CLLocationCoordinate2D(latitude: 45.52, longitude: -122.681944),
zoomLevel: 13,
size: CGSize(width: 300, height: 200))
@@ -98,7 +98,7 @@ snapshot.image
*/
let customMarker = CustomMarker(
coordinate: CLLocationCoordinate2D(latitude: 45.522, longitude: -122.69),
- url: URL(string: "https://www.mapbox.com/help/img/screenshots/rocket.png")!)
+ url: URL(string: "https://docs.mapbox.com/help/img/screenshots/airport-15.png")!)
options.overlays = [customMarker]
snapshot = Snapshot(
options: options,
diff --git a/macOS.playground/timeline.xctimeline b/macOS.playground/timeline.xctimeline
index babb79a..70447fa 100644
--- a/macOS.playground/timeline.xctimeline
+++ b/macOS.playground/timeline.xctimeline
@@ -3,37 +3,37 @@
version = "3.0">