Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace StaticMap with Snapshot and SnapshotOptions #19

Merged
merged 5 commits into from
May 12, 2016
Merged

Commits on May 12, 2016

  1. Replaced StaticMap with Snapshot and SnapshotOptions

    Overhauled the code to ever-so-vaguely resemble MapKit’s MKMapSnapshotter API. A SnapshotOptions object and access token are passed into the Snapshot initializer, which builds a URL request and can fetch the image either synchronously or asynchronously. Instead of setting an “autoFitFeatures” parameter, auto-fitting is enabled when the center coordinate is absent – Null Island is no longer the default center point.
    
    If no access token is passed into the Snapshot initializer, it is read from the Info.plist, just like the Mapbox iOS SDK does.
    
    Increased usage of NSURL and NSURLComponents to ensure correct URL handling. Added an optional NSError to the completion handler, in case things go awry.
    1ec5 committed May 12, 2016
    Configuration menu
    Copy the full SHA
    fd6bbd1 View commit details
    Browse the repository at this point in the history
  2. Return task for asynchronous request

    Return the task so that client code has an opportunity to cancel the request.
    1ec5 committed May 12, 2016
    Configuration menu
    Copy the full SHA
    27872a9 View commit details
    Browse the repository at this point in the history
  3. Removed scale assertion

    The code correctly handles 3× by requesting a 2× image, so no assertion is needed.
    1ec5 committed May 12, 2016
    Configuration menu
    Copy the full SHA
    c337f55 View commit details
    Browse the repository at this point in the history
  4. Removed unused podfile routines

    1ec5 committed May 12, 2016
    Configuration menu
    Copy the full SHA
    7ab91e5 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    b5077a8 View commit details
    Browse the repository at this point in the history