Skip to content

Commit

Permalink
Clarified documentation
Browse files Browse the repository at this point in the history
Clarified the relationship between Snapshot and the iOS and macOS SDKs. Added a notice about the general requirement to leave the logo enabled.
  • Loading branch information
1ec5 committed Mar 26, 2017
1 parent 53a1660 commit 5ccc930
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion MapboxStatic/Snapshot.swift
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,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 API](https://www.mapbox.com/api-documentation/#static) or the [classic Mapbox Static API](https://www.mapbox.com/api-documentation/?language=Swift#static-classic), 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). To add interactivity, use the `MGLMapView` class provided by the [Mapbox iOS SDK](https://www.mapbox.com/ios-sdk/) or [Mapbox macOS SDK](https://github.com/mapbox/mapbox-gl-native/tree/master/platform/macos/). (See the “[Custom raster style](https://www.mapbox.com/ios-sdk/examples/raster-styles/)” example to display a raster tile set in an `MGLMapView`.)
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 iOS SDK](https://www.mapbox.com/ios-sdk/) or [Mapbox macOS SDK](https://github.com/mapbox/mapbox-gl-native/tree/master/platform/macos/), which can optionally display raster tiles.
*/
@objc(MBSnapshot)
open class Snapshot: NSObject {
Expand Down
4 changes: 3 additions & 1 deletion MapboxStatic/SnapshotOptions.swift
Original file line number Diff line number Diff line change
Expand Up @@ -250,6 +250,8 @@ open class SnapshotOptions: NSObject, SnapshotOptionsProtocol {
A Boolean determining whether the resulting image includes the Mapbox logo.
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.
*/
open var showsLogo = true

Expand All @@ -258,7 +260,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 these requirements 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.
- 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.
*/
open var showsAttribution = true

Expand Down

0 comments on commit 5ccc930

Please sign in to comment.