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
Minh Nguyễn
0e8b496d31
Merge branch 'master' into 1ec5-constraints-1327
2015-04-24 09:21:46 -07:00
Justin R. Miller
7e335cafdc
tighten up compass alpha adjustments & remove dupe
2015-04-23 16:19:45 -07:00
Brad Leege
7e145780eb
#1225 - Initial conversion of Mapbox GL app to set access token in AppDelegate and exposing MGLMapView.initWithFrame to support it
2015-04-23 18:15:01 -05:00
Minh Nguyễn
fec1cf0e23
RTL-friendly constraints
...
Use leading/trailing instead of left/right for subview constraints for eventual right-to-left flippedness.
2015-04-23 15:02:06 -07:00
Minh Nguyễn
9b8b072d28
Cleaned up subview layout
...
No need to set the frames manually since we set up constraints as soon as the `MGLMapView` is added to the view hierarchy. Set proper edge insets on the logo bug rather than fudging constraint constants.
2015-04-22 15:33:56 -07:00
Minh Nguyễn
8ab22c11a2
Clip MGLMapView to its bounds
...
Fixes #1300 .
2015-04-22 12:48:15 -07:00
Minh Nguyễn
e1cf6d1515
Refactored constraints
...
The existing Visual Format Language usage necessitated various ternaries and over-wide lines that made the code harder to grok. Now it’s just plain ol’ Objective-C, mostly column-80-compliant. This change also adds additional constraint relations so that the various subviews respect the `MGLView`’s frame when it’s smaller than the view controller’s root view.
Fixes #1327 .
2015-04-22 12:45:09 -07:00
Minh Nguyễn
87409b1234
Constrain user dot to superview margins
...
When the screen changes orientation, the user dot should always appear at the correct location.
Fixed #1313 .
2015-04-21 15:58:55 -07:00
Minh Nguyễn
0aadbedecb
Lower threshold for rotation drift
...
It’s pretty darn hard to get up to 5 rad/s with the same two fingers.
2015-04-20 11:15:29 -07:00
Minh Nguyễn
261b6161f2
Cancel animations on touch down
...
Cancel any map animations as soon as a finger is set upon the screen.
Fixes #1258 .
2015-04-18 23:01:42 -07:00
Minh Nguyễn
fae0c4c8b3
Simplified math for drift-rotation
...
fmodf() would conflict with the fix for #1199 .
2015-04-18 22:02:15 -07:00
Minh Nguyễn
33aeecef22
Added drift-rotation effect after rotation gesture
2015-04-18 20:50:35 -07:00
Minh Nguyễn
41d28e7203
Added drift-zooming effect after pinch gesture
...
Apply a subtle animated zoom after a pinch gesture completes. Lots of magic numbers involved. Avoid drifting when the pinch is near-static, and when the scale factor would go below the minimum. There is more resistance to pinching outward than pinching inward, because it’s far easier to lose your place when you accidentally zoom out. Disabled two-finger pan, which is typically reserved for changing pitch; otherwise, it’s easy to accidentally pan while intending to pinch.
2015-04-18 19:47:52 -07:00