Commit Graph

165 Commits

Author SHA1 Message Date
Minh Nguyễn
a91b1d73e2 Merge pull request #1611 from friedbunny/1519-actionsheet-metrics-squash
[squash] Add action sheet shortcut to Settings.app metrics opt-out
2015-05-21 01:55:17 -07:00
Jason Wray
911a8ffc60 Add action sheet shortcut to Settings.app metrics opt-out
Only applicable to iOS 8+. Checks if metrics setting has been declared to be offered in app, if not: adds ℹ️ action to open the app's Settings.app section.

Fixes #1519. Squash of #1529.
2015-05-21 00:12:49 -07:00
Minh Nguyễn
256b748458 Merge branch '1ec5-plist-1535' 2015-05-20 14:38:36 -07:00
Minh Nguyễn
90a50c0c41 Observe access token changes
The singleton `MGLAccountManager` wants to be the sole arbiter of the access token, but each instance of `mbgl::Map` (`mbgl::DefaultFileSource` in #1607) has its own copy of the access token. Now `MGLMapView` observes for changes to the `MGLAccountManager`’s access token and synchronizes `mbgl::Map` with it.
2015-05-20 11:49:59 -07:00
Minh Nguyễn
9a57464f82 Removed accessToken from MGLMapView public API
With helpful instructions for migrating to Info.plist or the `MGLAccountManager` API.
2015-05-20 10:45:26 -07:00
Minh Nguyễn
b7b4515d48 Marked unused parameters with __unused
Replaced haphazard usage of pragmas and `(void)` expressions with the `__unused` keyword.
2015-05-18 17:11:12 -07:00
Minh Nguyễn
2c7d0567fa Privatized MGLMapboxEvents
`-pauseMetricsCollection` and `-resumeMetricsCollection` were originally introduced to mitigate concerns around battery usage, but `MGLMapboxEvents` has since evolved to tread much lighter on the battery. There’s no longer any need for the client to call these methods directly. The iOS test project now includes MGLMapboxEvents.h explicitly to avoid having to package a header that will go unused.
2015-05-18 11:55:54 -07:00
Minh Nguyễn
563fed5ca9 Properly fail to load the map
A typo in a selector literal meant that `-[MGLMapViewDelegate mapViewDidFailLoadingMap:withError:]` would never be sent to delegates even if `MGLMapView` had called it. Along for the ride, create a proper `NSError` to pass into that callback, and an error domain for that error.
2015-05-16 20:26:28 -07:00
Jason Wray
03a129176c Rotate compass on device orientation changes 2015-05-14 13:13:24 -07:00
John Firebaugh
7d4f12434e Ensure call-once semantics inside InitializeExtensions 2015-05-13 19:01:58 -07:00
John Firebaugh
a2344c36c3 Extensible GL extension support 2015-05-13 19:01:58 -07:00
John Firebaugh
0f7c6b0b52 Remove unused GL feature flags
These were used only for prerendered textures, which were removed.
2015-05-13 19:01:57 -07:00
Minh Nguyễn
164ff72297 Fall back on MGLAccountManager access token
Makes IB designables aware of access tokens set via Info.plist.
2015-05-13 16:33:40 -07:00
Minh Nguyễn
54a703bcb2 Consolidated logic for pausing/resuming MGLMapboxEvents
`MGLMapboxEvents` automatically recreates its location manager when the host app is reauthorized for Location Services. Added some redundancy to ensure that there is no location manager when either Location Services or Mapbox Metrics is off.
2015-05-12 01:38:04 -07:00
Minh Nguyễn
f860169f35 Refactored MGLMapboxEvents for better data management
The shared `MGLMapboxEvents` now owns the only instance of `MGLMetricsLocationManager`. It also owns a `MGLMapboxEventsData` object, to which all user-specific data has been relegated. This object can be built up and torn down on the fly, whenever the opt-out preference is toggled. `MGLMapboxEvents` has also given up knowledge of the access token and now queries `MGLAccountManager` for that information, which `MGLMapView` keeps up-to-date.
2015-05-12 01:36:56 -07:00
Brad Leege
d4fcb5bb98 Merge pull request #1469 from mapbox/1435-android-gl-crash
Android GL Crash
2015-05-11 11:42:21 -05:00
Minh Nguyễn
965bc41d43 Round zoom level for Map Feedback tool
The Map Feedback tool is still using mapbox.js, so it doesn’t support fractional zoom levels yet.
2015-05-10 23:34:47 -07:00
Minh Nguyễn
7da7f65579 Dismiss attribution popover on rotation
Constraints go invalid when rotating an iPad while the popover is visible and anchored to the ℹ️.
2015-05-10 23:32:38 -07:00
Jason Wray
fbafa15395 Add long/lat/zoom to feedback URL 2015-05-10 23:14:16 -07:00
Minh Nguyễn
4de7f89f47 Turned copyright notices into action buttons 2015-05-10 04:19:01 -07:00
Minh Nguyễn
965f90c449 Attribute Mapbox and OpenStreetMap in-app
ℹ️ now pops up an action sheet with explicit attribution and a direct link to the Map Feedback tool.
2015-05-10 03:53:24 -07:00
Leith Bade
703e0bc2ee Ignore deactivate when no valid EGL display. Fixes #1435
Initialise NativeMapView's EGL variables before Map

Fix hang

Add check for double pause

Add test for double pause
2015-05-09 12:02:39 +10:00
Konstantin Käfer
f96580de61 catch NaN values from UIPinchGestureRecognizer 2015-05-08 20:25:43 +02:00
Justin R. Miller
68ff978cd6 fix lingering backgrounding crashes & add debug mode 2015-05-06 15:13:51 -07:00
Minh Nguyễn
61523d50b8 Merge branch 'master' into 1ec5-analyzer 2015-05-06 12:04:19 -07:00
Brad Leege
acd27fc386 Merge pull request #1329 from mapbox/1225-start-token
MapboxGL Startup Infrastructure
2015-05-05 13:00:25 -05:00
Brad Leege
804c092c81 #1225 - Simplifying MGLAccountManager for initial setup and access to AccessToken 2015-05-05 11:50:01 -05:00
Minh Nguyễn
fc576ddef6 Suppressed an uninitialized value warning from the static analyzer
While tracking the user’s location, a double tap not near the user dot now turns off location tracking instead of bouncing between the tapped location and the user location.
2015-05-05 12:02:47 -04:00
Konstantin Käfer
691c305467 add Map::isFullyLoaded()
returns whether the Map is still loading/parsing any assets or whether everything is there and a render will likely be complete
2015-05-05 11:47:23 +02:00
Konstantin Käfer
286338c978 [iOS] send map rendering notifications 2015-05-05 11:47:22 +02:00
Brad Leege
4ce4e979ff Updating from master 2015-05-04 17:04:46 -05:00
Brad Leege
7f6cc6cc6d #1225 - Renaming getAccessToken method to sharedAccessToken to avoid any iOS get naming conventions 2015-05-04 16:52:41 -05:00
Brad Leege
0e36bf1c8d #1225 - Restoring MapboxGL.h as an Umbrella header file by splitting the singleton code into MGLAccountManager.h and .m 2015-05-04 16:13:18 -05:00
Konstantin Käfer
914b6f01f8 add gl::groups back for easier debugging in Xcode 2015-05-04 17:33:05 +02:00
Minh Nguyễn
5e6bf19144 Fixed build errors from merge
Follow-up to cf33edf16d.
2015-05-01 00:37:51 -04:00
Justin R. Miller
cf33edf16d Merge branch 'master' into 1266-slippy 2015-05-01 00:06:47 -04:00
Justin R. Miller
c69e985fa5 fixes #1102: implement reference-counted shared file cache vendor 2015-04-30 17:52:42 -04:00
Justin R. Miller
8192d2ed10 Merge pull request #1386 from mapbox/1103-no-clobber-pointers
fixes #1103: allow multiple maps by not using global pointers
2015-04-30 17:27:38 -04:00
Justin R. Miller
858bb5dbe4 fixes #1103: allow multiple maps by not using global pointers 2015-04-30 14:08:46 -04:00
Minh Nguyễn
87c61657a1 Objective-C niceties
Added macro for main thread assertions based on `NSAssert()`. Reworded Boolean property per Objective-C conventions.
2015-04-30 11:35:52 -04:00
John Firebaugh
bbcc7c26d9 Merge pull request #1065 from mapbox/1065-separate-ui-from-map-thread
Better separation between UI thread and Map thread
2015-04-30 10:22:06 -04:00
Justin R. Miller
c48962ebf2 Merge pull request #1296 from mapbox/1258-deadpan
Cancel animations on touch down
2015-04-29 16:24:43 -04:00
Justin R. Miller
42b59eb655 fixes #1363: centrally & better address GL demo/third-party resource bundle issues 2015-04-28 15:03:35 -04:00
John Firebaugh
a625ba8a09 Remove Map::start/stop
Both Android and iOS now use pause/resume. The map thread is
always running, and be able to receive messages. When paused,
it will just refuse to render.
2015-04-28 14:32:24 -04:00
John Firebaugh
6c7a01a503 Following kkaefer's view changes 2015-04-28 14:32:22 -04:00
John Firebaugh
7bd735220d Fix build 2015-04-28 14:32:21 -04:00
Konstantin Käfer
b0a30943b4 move most private Map code to MapContext 2015-04-28 14:32:20 -04:00
Konstantin Käfer
89167cbf8c move Transform into MapData and make source unaware of the Map object 2015-04-28 14:32:18 -04:00
Minh Nguyễn
5ffa52cab5 Automatically find view controller for layout guides
Find the managing view controller by traversing the responder chain.
2015-04-27 15:52:30 -07:00
Brad Leege
50fecb916d #1345 - Adding app build number to user agent. Updating gl test app build number to be different from build version. 2015-04-27 11:43:23 -04:00