Commit Graph

29 Commits

Author SHA1 Message Date
Thiago Marcos P. Santos
65cec8be34 [android,darwin,ios,qt] Remove unused code
These files are no longer needed after the new GL abstraction.
2019-02-12 19:42:08 +02:00
Konstantin Käfer
1d8235f5b8 [build] rework platform/default directory and add -files.txt for vendored libs 2018-12-14 11:03:03 +01:00
Minh Nguyễn
3e22369f27 [ios, osx] Eliminated platform/{ios,osx}/include
Also updated various project references to be group-relative, so Xcode chooses the right directory by default when adding a new file.

Fixes #4770.
2016-04-23 10:35:59 -07:00
Minh Nguyễn
9c9ff2d2d4 [ios, osx] Updated build system for jazzy
Consolidated NSValue categories to work around realm/jazzy#539. Documented MGLErrorCode. Moved jazzy configuration file into platform/ios/. Removed redundant include/Mapbox.h that was only being used by jazzy, now that the static frameworks’s umbrella header is based on that of the dynamic framework. Moved framework/Mapbox.h to include/Mapbox.h for consistency.
2016-04-22 12:31:42 -07:00
Minh Nguyễn
2a1a5f0885 [ios, osx] Split MGLDirectionFormatter in two
Split MGLDirectionFormatter into MGLClockDirectionFormatter, which specializes in clock positions, and MGLCompassDirectionFormatter, which boxes the compass. This neatly avoids any confusion that might arise if the developer fails to read the documentation and thinks the original unified formatter can convert between the two types of directions.
2016-04-22 11:29:10 -07:00
Minh Nguyễn
e5c6cfde4b [ios, osx] Direction formatter
Implemented an NSFormatter for formatting CLLocationDirection values as localizable display strings. The formatter supports both absolute compass directions, such as “south”, and relative “clock” directions, such as “6 o’clock”.
2016-04-22 11:13:03 -07:00
Minh Nguyễn
91023f02f8 [ios, osx] Coordinate formatter
Added a degree-minute-second coordinate formatter for general use. Use this formatter in iosapp and osxapp.

Added unit tests for the coordinate formatter and for round-tripping geometry types through NSValue.
2016-04-22 11:13:03 -07:00
Minh Nguyễn
a852ee24fb [ios, osx] Geometry value methods
Added category methods on NSValue for converting to and from the structure types defined in MGLGeometry.h.

Fixes #4485.
2016-04-22 11:13:02 -07:00
Minh Nguyễn
de0705c7ed [ios, osx] Use HTML links in documentation
Replaced Markdown syntax with HTML syntax for hyperlinks in documentation comments. HTML links work both inside Xcode (whether Objective-C or Swift) and on the Web (via jazzy).

Fixes #3961.
2016-04-20 07:41:05 -07:00
Minh Nguyễn
943c09f1c7 [ios, osx] Took advantage of C99
Now that #4641 has removed the prohibition against C99 extensions, this change removes many pragma statements that suppress warnings about variadic macros and designated initializers. Designated initializers and Elvis operators have been introduced wherever appropriate.
2016-04-16 23:29:40 -07:00
Minh Nguyễn
38116e39c5 [ios, osx] Require progress to be requested manually
Requesting progress is expensive, so it is once again computed only on demand, rather than automatically at launch. Moved progress requesting back to iosapp and osxapp.
2016-03-29 11:46:27 -07:00
Minh Nguyễn
8c8b058038 [ios, osx] Include progress in progress change notification
An MGLOfflinePackProgressChangedNotification notification now includes the pack’s state and progress values, which match the values in the corresponding MGLOfflinePack properties. Implemented NSValue category methods to store MGLOfflinePackProgress inside a dictionary.
2016-03-29 11:46:27 -07:00
Minh Nguyễn
4fd875a971 [ios, osx] Secure coding, copying for offline regions
Implemented NSSecureCoding and NSCopying protocols for MGLTilePyramidOfflineRegion so that it can be used more fluidly by client code.
2016-03-29 11:46:26 -07:00
Minh Nguyễn
ad3bbd9c11 [ios, osx] Clarified documentation
Updated MGLTilePyramidOfflineRegion documentation to note that local files can’t be used as style URLs. Added documentation for private offline methods.
2016-03-29 11:46:26 -07:00
Minh Nguyễn
e36f31c503 [ios, osx] Allow creating invalid offline packs
Removed NS_UNAVAILABLE attribute from -[MGLOfflinePack init]. Packs initialized with this initializer are doomed to invalidity.

Fixes #4421.
2016-03-29 11:46:26 -07:00
Minh Nguyễn
55f1ad11c4 [ios, osx] More accurate KVO, private delegate, descriptive fallback name, fewer reloads
Made MGLOfflineStorage.packs strong rather than copy so that KVO notifications on that key path include index paths. Replaced custom KVO mutable collection methods with calls to -mutableArrayValueForKey:, avoiding redundant casts.

Privatized MGLOfflinePackDelegate and made its methods required, since MGLOfflineStorage is the only conforming implementation. Require a pack to be explicitly invalidated before deallocation by its owner (MGLOfflineStorage). Added a method to reload the canonical collection of packs.

Previously, if the user adds an offline pack without specifying a name in the alert, the pack would be named “Untitled n” for the nth pack created since the application was launched. This logic could result in identically named packs (for example, if the user relaunches and creates another unnamed pack). Instead, use the visible coordinate bounds as a placeholder and fallback name.

Resume a pack upon successful addition. Removed an extraneous weakSelf/strongSelf dance. When possible, update individual labels in a cell instead of reloading the entire cell. That way, if the user swipes to the left to reveal the Delete accessory button while the pack is actively downloading, the accessory button remains on screen as progress updates come in.
2016-03-29 11:46:26 -07:00
Minh Nguyễn
a1e5701fa3 [ios, osx] Centralized offline pack management
MGLOfflineStorage now maintains a centralized, strongly held, KVO-compliant collection of all extant offline packs. MGLOfflineStorage issues notifications for progress updates. Client code can now react to the successful addition of an offline pack either via the completion block or via a KVO insertion.

Fixes #4287.
2016-03-29 11:46:25 -07:00
Minh Nguyễn
2e01da1d71 [ios] Define C nullability block type qualifiers for Xcode 6.4
This change fixes the build in Xcode 6.4.
2016-03-25 10:25:08 -07:00
Minh Nguyễn
ac54129060 [ios, osx] Allow null completion handlers in MGLOfflineStorage
Cherry-picked from f6c21a0efe.
2016-03-14 12:54:02 -07:00
Minh Nguyễn
ff9c3a57b0 [ios, osx] Renamed MGLOfflineTask to MGLOfflinePack
“Offline pack” more effectively communicates the persistent nature of the downloaded content.
2016-03-10 17:14:14 -08:00
Minh Nguyễn
77d99584ce [ios, osx] Distinguish between unknown and inactive state 2016-03-10 17:08:58 -08:00
Minh Nguyễn
c335847451 [ios, osx] Invalidate task immediately upon removal 2016-03-10 17:08:58 -08:00
Minh Nguyễn
8824237e2d [ios, osx] Documented offline APIs
Also categorized offline symbols for jazzy and moved styleURL from MGLOfflineRegion to MGLTilePyramidOfflineRegion, since you never know if there will be a region type not constrained by a style in the future.
2016-03-10 17:08:58 -08:00
Minh Nguyễn
f5ac63dfec [ios, osx] Renamed offline classes
Renamed SDK classes related to offline viewing to more closely match the terminology used by mbgl and the Android SDK while remaining consistent with Cocoa naming principles.
2016-03-10 17:08:58 -08:00
Minh Nguyễn
e36218a866 [osx] Added OS X support for offline downloads 2016-03-10 17:08:58 -08:00
Minh Nguyễn
77657b3896 [ios] Implemented offline API in iOS SDK
Fixes #3892.
2016-03-10 17:08:58 -08:00
Jason Wray
64b163ee5d [ios] Add description strings to constituent classes 2016-03-10 13:48:00 -05:00
Tom MacWright
14f81dbed5 Fix coordinate bounds documentation.
4-space indentation was being intepreted as a Markdown code block
2016-02-15 12:43:04 -05:00
John Firebaugh
13e2acbc75 [ios, osx] Consolidate remaining files in platform/{ios,osx} 2016-02-12 14:53:52 -08:00