Commit Graph

7122 Commits

Author SHA1 Message Date
Minh Nguyễn
e5fa7093da [ios] Fixed hang observing user defaults on background queue
Fixed a deadlock that could occur if the host application attempts to set user defaults on a background queue. Now we observer user defaults changes synchronously.

Cherry-picked from d76ef6e53b.
2016-04-20 14:43:45 -07:00
Jesse Bounds
b8ecbf6b35 ios-v3.2.0
Update podspec files for version 3.2.0
2016-04-05 11:34:59 -04:00
Minh Nguyễn
a70928c995 ios-v3.2.0-rc.1
Switched away from the -symbols build but added a new podspec that still uses it.
2016-04-04 10:54:57 -07:00
John Firebaugh
7b5a1ca167 [core] Localize and simplify state for MapChangeDidFinishLoadingMap event
Only Map needs to track this state, and it can simply be set when beginning to load a style and reset when finished.
2016-03-30 13:53:31 -07:00
Brad Leege
7c036fb618 [android] #4535 - Enabling 4.1.0-SNAPSHOT 2016-03-30 15:16:21 -05:00
Brad Leege
66ffa453f0 [android] #4535 - 4.0.0 Changelog 2016-03-30 15:04:51 -05:00
Brad Leege
c4dbde3d59 [android] #4535 - Setting version to 4.0.0 for release 2016-03-30 15:04:51 -05:00
Minh Nguyễn
a143918116 Merge branch 'release-ios-3.2.0-android-4.0.0' of https://github.com/mapbox/mapbox-gl-native into release-ios-3.2.0-android-4.0.0 2016-03-29 14:02:13 -07:00
Tobrun
fc8215ecbd [android] #4500 - OnMapReady not invoked for offline maps 2016-03-29 14:56:21 -05:00
Minh Nguyễn
e84c937dc0 ios-v3.2.0-beta.3 2016-03-29 12:50:28 -07:00
Jason Wray
593f3d511a [ios] Make showAnnotations default padding proportional at smaller frame sizes 2016-03-29 15:17:04 -04:00
Jason Wray
d20795b891 [ios] Don't use negative content insets
When a map view was smaller than the entire viewport, negative content insets would be applied. Negative content insets would only be valid if the map view extended outside of its frame, which cannot happen.

Fixes #4440.
2016-03-29 15:17:04 -04:00
Tobrun
8262846294 [android] #4487 - ArrayInOutOfBoundsException fix for polyline and polygon 2016-03-29 14:07:52 -05:00
Tobrun
f8b6e1f7da [android] #4487 - ArraysInOfBoundsException fix for addMarkers 2016-03-29 14:07:52 -05:00
Minh Nguyễn
9a556bf24a [osx] Fixed tests
The previous change includes an additional salient change: a newly minted offline pack’s state is inactive initially, not unknown.
2016-03-29 11:46:28 -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
78f93708d6 [osx] Offline pack manager in osxapp
Added an offline pack download manager to osxapp to demonstrate the use of MGLOfflineStorage with Cocoa Bindings. Like the Offline Packs view controller in iosapp, new packs are added based on the foremost map view’s current state. Double-clicking a complete offline pack opens a new map window to the pack’s bounds.
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
aff1196d02 [ios, osx] Updated jazzy categories 2016-03-29 11:46:27 -07:00
Minh Nguyễn
b248e43112 [osx] Offline unit tests
Added unit tests for MGLTilePyramidOfflineRegion, MGLOfflinePack, and MGLOfflineStorage.

Fixes #4426.
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
f02bdb8fbb [osx] Fixed build error
Fixed an incomplete variable renaming. Don’t bother creating intermediate directories to the legacy cache path. When the main bundle lacks a bundle identifier, as is the case when the SDK runs in the test bundle, fall back on the SDK’s bundle.
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
ec72faa789 [ios, osx] Invalidate packs upon reload 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
Tobrun
bbab5a5b5e [android] #4510 - clean up test app with onStart/onStart references. 2016-03-29 13:41:36 -05:00
Justas Medeisis
af4871f7bf [android] #4510 - Remove onStart() and onStop() lifecycle methods from MapView. 2016-03-29 13:41:36 -05:00
Ansis Brammanis
fb15582d53 [core] fix background-pattern rendering in perspective view
fix #3801
2016-03-29 11:19:47 -07:00
Jesse Bounds
1d6ce5e809 [ios] Make more adjustments to the pod readme for the static framework case 2016-03-29 10:10:34 -07:00
Minh Nguyễn
5adb102d98 [ios] Copyedited changelog
Corrected a few Xcode terms in the changelog entry about static framework installation fixes. Merged that entry with the one above it because they discuss the same fixes. Also moved the combined entry to the top, because it’s about as close to a breaking change as we can get without incurring a major version bump.
2016-03-29 10:10:34 -07:00
Jesse Bounds
c4d435ce71 [ios] Update the pod-README and changelog regarding static lib changes 2016-03-29 10:10:34 -07:00
John Firebaugh
5c45ffccb2 Remove failing clang-tidy row from build matrix 2016-03-29 09:50:16 -07:00
Minh Nguyễn
4df8136188 Relative paths to platform-specific changelogs 2016-03-28 19:20:52 -07:00
John Firebaugh
13882a31e4 [core] Set schema version to 3 after upgrading
The migration was upgrading the schema, but not the schema version. As a result, the (expensive) migration was running every time an OfflineDatabase was constructed with a v2 database.

Fixes #4501
2016-03-28 17:28:44 -07:00
Minh Nguyễn
635aebbb89 [ios, osx] Exclude offline cache from backups
Avoid backing up the offline cache onto iCloud, because it can be redownloaded and would easily take up a significant portion of a standard iCloud account. Ideally, we’d even put ambiently cached resources in Caches, so it can be reclaimed by the system when disk space runs low. But unfortunately it has to live in the same file as offline resources.
2016-03-28 12:27:20 -07:00
Minh Nguyễn
2bd9b4a591 [ios] Nixed duplicate changelog entry from bad merge 2016-03-28 11:32:33 -07:00
Jesse Bounds
62f636f0c0 [ios] Fix issues with static lib signing and app store submission
Fix issues with static build configuration that caused it to be
problematic for host applications when they were installed on device.
Also fixes issues that broke the iTunes Connect validation and upload
process. This also updates the `binary` instructions in INSTALL.md to reflect
these changes.
2016-03-28 09:52:36 -07:00
Minh Nguyễn
71f6773208 [ios] Copyedited changelog
Changes are generally arranged by descending developer or user impact.
2016-03-26 22:08:30 -07:00
Brad Leege
1b842ca823 [android] #4478 - Returning to 4.0.0-SNAPSHOT 2016-03-25 20:35:23 -05:00
Brad Leege
616a77202d [android] #4478 - Updating CHANGELOG for 4.0.0-rc.1 2016-03-25 17:24:27 -05:00
Brad Leege
75d18dac65 [android] #4478 - Updating version to 4.0.0-rc.1 2016-03-25 17:04:01 -05:00
Brad Leege
7a9a58f4fb [android] #4475 - Only wrapping when needed in LatLng.wrap(). Making Javadoc more clear. Making tests consistent. 2016-03-25 16:55:07 -05:00
Brad Leege
464c29f043 [android] #4475 - Dialing down logs 2016-03-25 16:55:07 -05:00
Brad Leege
01dfd3c15d [android] #4475 - Only wrap Telemetry longitude when it's outside bounds 2016-03-25 16:55:07 -05:00
Brad Leege
ef90e2286f [android] #4475 - Wrap all Longitude Telemetry data 2016-03-25 16:55:07 -05:00
Brad Leege
335e346ed1 [android] #4475 - Introducing LatLng.wrap() and removing usage of wrap() in JNI's nativeLatLngForPixel() 2016-03-25 16:55:07 -05:00
Minh Nguyễn
8cdb4f74e1 [ios] Fixed changelog processing
Fixed a regression introduced in #4466 in which the changelog is essentially empty.

Fixes #4469.
2016-03-25 12:24:14 -07:00
Brad Leege
75913a5dae [android] #4473 - Fixing toString() tests for LatLng.toString() 2016-03-25 14:22:21 -05:00