Commit Graph

1076 Commits

Author SHA1 Message Date
Justin R. Miller
efc4bb4ef6 add header docs for new MGLAccountManager; reorg 2015-05-12 16:44:26 -07:00
Justin R. Miller
18b96ec4fd fix spacing, ordering, imports 2015-05-12 16:33:32 -07:00
Minh Nguyễn
b1992a4516 Merge branch 'master' into 1ec5-metrics-opt-way-out 2015-05-12 16:09:10 -07:00
Brad Leege
8548ab0346 #1516 - Adding public setter method to MGLAccountManager.h. Fixing example signal opt out in MBXAppDelegate. 2015-05-12 11:37:40 -05:00
Brad Leege
3391d8f6d8 Merge pull request #1520 from mapbox/1516-opt-out-checking
Explicit Opt Out Checking
2015-05-12 11:04:14 -05:00
Brad Leege
87551c6d0e #1516 - Renaming setShowsOptOutInApp to setMapboxMetricsEnabledSettingShownInApp for app consistency. Implementing wordsmith edits to NSAssert text. Removing technical debt. 2015-05-12 10:50:46 -05: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
2f02a6538e Folded MGLMetricsLocationManager into MGLMapboxEvents
`MGLMetricsLocationManager` was nothing but overhead for `CLLocationManager`. Also removed an unused method.
2015-05-12 01:36:56 -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
48e21ae6e9 #1516 - Adding explicit checks for developer implementation of user Opt Out functionality 2015-05-11 23:31:22 -05: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
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
Dane Springmeyer
768c259495 fix division by zero conditions 2015-05-08 15:19:41 -07:00
Thiago Marcos P. Santos
0819628fea Fix Linux GCC Debug build
Compiler was complaining about shadowed variable after
macro expansion.
2015-05-08 15:54:17 +03:00
Konstantin Käfer
7dbe768ffc change the window title to indicate the current style 2015-05-07 11:01:15 +02:00
Thiago Marcos P. Santos
769364c117 Make all GLFWView attributes private 2015-05-07 11:01:15 +02:00
Thiago Marcos P. Santos
168d7c4f17 Add style change functionality to the Linux test app
Makes the life of people using Linux as development environment way
easier.

Just press 's' to cycle through 3 different styles.
2015-05-07 11:01:15 +02:00
Justin R. Miller
8cb146fa02 don't doc or package private headers 2015-05-05 15:13:39 -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
Thiago Marcos P. Santos
19881f8b24 Cancel all pending requests before leaving
This still has the unwanted side effect off blocking the Map thread
waiting for the workers to return (because they hold a reference
to the Map thread main loop).

Maybe the only way to solve this would be having a I/O thread for
dispatching messages.

The Request is not bound anymore to the invoker thread because the workers
will request for glyphs, but the reply will arrive at the Map thread.
2015-05-05 18:35:40 +03: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
307ad680ba [iOS] allow calling invalidate() on MGLMapView 2015-05-05 11:47:16 +02:00
John Firebaugh
00a1f44cfc Ensure no GL commands are executed after pause 2015-05-04 18:27:48 -07:00
Justin R. Miller
af8f060a0d missing docs tuneups 2015-05-04 16:07:16 -07: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
27d8e82e1c lower thread priority of worker threads 2015-05-04 17:33:05 +02:00
Konstantin Käfer
72964f5bef only update GL state when it actually changed 2015-05-04 17:33:05 +02:00
Konstantin Käfer
914b6f01f8 add gl::groups back for easier debugging in Xcode 2015-05-04 17:33:05 +02:00
John Firebaugh
b713930c7f Merge branch 'uv_leak' 2015-05-01 18:24:58 -04:00
John Firebaugh
36f695b411 Write SQLite tests in terms of Impl 2015-05-01 14:31:39 -04:00
Dane Springmeyer
74604af9c5 fix compile with clang-3.6 2015-05-01 11:00:01 -07:00
Minh Nguyễn
6790a09a08 Turned class methods into instance methods
Avoids unnecessary steps to access singletons. Now `MGLMapboxEvents` and `MGLMetricsLocationManager` instances can message themselves directly.
2015-04-30 11:48:56 -04:00
John Firebaugh
4ccf246c10 Rewrite Worker in terms of Thread<> 2015-04-28 14:32:26 -04:00
John Firebaugh
8bb7fc64ff Move Environment to MapContext 2015-04-28 14:32:25 -04:00
John Firebaugh
3bf0bf9538 Remove unused includes 2015-04-28 14:32:25 -04:00
John Firebaugh
f8db45f19a Move still image callback to MapContext 2015-04-28 14:32:25 -04:00
John Firebaugh
f0b229730f Move style info to MapContext 2015-04-28 14:32:25 -04:00
John Firebaugh
b5b58086a8 Combine update and triggerUpdate 2015-04-28 14:32:25 -04:00
John Firebaugh
230027e514 Resize view from map thread 2015-04-28 14:32:24 -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
75ae956b0e WIP: Use Thread<MapContext> 2015-04-28 14:32:22 -04:00
John Firebaugh
025eb013d7 Privatize remaining MapContext members 2015-04-28 14:32:21 -04:00
John Firebaugh
424dae0a2c Move run() to MapContext 2015-04-28 14:32:21 -04:00
John Firebaugh
d67f862400 #include <atomic> 2015-04-28 14:32:21 -04:00
Konstantin Käfer
dae18cc7bc remove some unused includes 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