Commit Graph

468 Commits

Author SHA1 Message Date
Maciej Swic
c1f425731c Fixed incorrect notification 2015-09-21 11:33:54 +02:00
Jason Wray
7782802f37 [iOS] Remove unneccessary pitch check
Fix case where moving the tilted dot off-screen, changing the pitch to 0, and then moving the dot back on screen would not reset the pitch of the dot.
2015-09-11 11:36:32 -07:00
Jason Wray
2a300bd425 [iOS] Pitch the dot, add faux 3D effect to tilted dot and puck
This exposes the naïveté of the current pitch transform: accuracy ring sizing stays constant, despite vertical screen movement. Still, it looks better pitched than not.
2015-09-11 11:36:32 -07:00
Jason Wray
c34d62aca2 [iOS] Move radians/degrees conversion functions to MGLGeometry.h 2015-09-11 11:36:32 -07:00
Jason Wray
c8e80595d8 [iOS] Initial user location puck 2015-09-11 11:36:32 -07:00
Minh Nguyễn
7b93107869 Corrected roundtripping altitude with rotation 2015-09-07 09:22:53 -07:00
Minh Nguyễn
0a172a21fd CameraOptions
Plumbed camera options all the way through to MGLMapView. Added a method that lets you specify a direction in addition to center point and zoom level.

Added Map::jumpTo() for parity with mapbox-gl-js. Replaced usage of Map::setLatLng() and Map::setLatLngZoom() with Map::jumpTo() or Map::easeTo() within MGLMapView. Replaced MGLMapView.pitch with MGLMapCamera for setting all supported degrees of freedom simultaneously. Simultaneously move and rotate with course.

Support customizable timing functions on iOS.

iosapp now persists an archived MGLMapCamera instead of separate viewpoint properties and also synchronizes user defaults on termination. This change implements persistence entirely in Objective-C, eliminating the use of the Objective-C++ implementation.

Fixes #1643, fixes #1834. Ref #1581.
2015-09-07 09:22:52 -07:00
Justin R. Miller
cb730d3973 assert() -> NSAssert() for user-facing annotation API 2015-09-04 09:16:26 -07:00
Justin R. Miller
790e8a345c refs #2039: add passthroughs for adding/removing overlays 2015-09-04 09:16:26 -07:00
Bruno de Oliveira Abinader
0b501e0566 Substitute nudgeTransitions with async view invalidation 2015-09-02 23:20:46 +03:00
Mike Morris
322e1aa2c3 Merge pull request #2179 from mapbox/node
Node bindings
2015-09-02 15:46:43 -04:00
Jason Wray
9c1c40b3e5 Add iOS resources README, reminder to minimize image sizes
Ref #2227
2015-09-02 13:17:53 -04:00
Jason Wray
4d5a4d27f1 Optimize bundled images' file sizes
Saves 8KB, because we care.
2015-09-01 13:38:52 -04:00
John Firebaugh
abc1c84fb8 Merge branch 'master' into node 2015-08-31 16:45:21 -07:00
Minh Nguyễn
c6e3ed8c66 Updated title of attribution action sheet 2015-08-28 16:15:51 -07:00
Jason Wray
42dc5336db iOS perspective gesture support
Drag two fingers upward to tilt the map.

Implements #2116
2015-08-26 11:23:03 -07:00
Minh Nguyễn
2f30dfe97d Disable heading updates for .FollowWithCourse
Fixes #2180.
2015-08-26 10:10:49 -07:00
Jason Wray
92d9308eb8 Ask for 'always' location permissions, too 2015-08-25 14:59:17 -07:00
Mike Morris
4540c3c0e8 View::swap -> View::beforeRender View::afterRender
To be able to resize the framebuffer on the map thread
in HeadlessView.
2015-08-25 14:39:49 -04:00
Justin R. Miller
c6aee1aadd update iOS first steps guide URL 2015-08-24 13:18:24 -07:00
Justin R. Miller
92dd26c8be iOS app/framework fixes for v8
- Mapbox Streets -> Streets
 - style version from string to integer
 - 7 -> 8
2015-08-24 11:34:03 -07:00
Justin R. Miller
3f99f5e712 GL is the library, SDK is the product 2015-08-21 11:01:07 -07:00
Minh Nguyễn
bfd17e2d27 Avoid deprecated CLLocationManagerDelegate method
Fixes #2097.
2015-08-18 09:30:30 -07:00
Justin R. Miller
d3160ca4db fixes #1907: skip MGLPolyline/MGLPolygons with zero points 2015-08-17 12:22:41 -07:00
Minh Nguyễn
dfeb479011 MGLUserTrackingModeFollowWithCourse
Added course-tracking. However, rotation has to happen atomically without animation until #1834 is fixed.

Fixes #1605.
2015-08-14 10:09:43 -07:00
Justin R. Miller
772238a229 fixes #2044: add -showAnnotations:animated: 2015-08-12 14:45:37 -07:00
Justin R. Miller
01b5636df0 fixes #1951: check for support of title before querying 2015-08-11 15:10:55 -07:00
Jason Wray
dc11b8132b Improve accuracy ring update checks 2015-08-10 17:36:23 -04:00
Jason Wray
26d300b4f4 Refactor user location annotation
Adds:
- Accuracy ring
- Heading indicator

Fixes:
- Pulse sync
- Visual appearance (removes slight aliasing)

Closes #1222 (squashed)
2015-08-10 17:36:22 -04:00
Bruno de Oliveira Abinader
fa4636ffe4 Map::nudgeTransitions no longer depends on client information
Clients no longer need to provide data (eg. if gesturing or in a custom
animation) to Map::nudgeTransitions().

Upon MapContext::renderSync(), a new atomic bool 'needsRepaint' in MapData
allows thread-safe communication between Map and MapContext.
2015-08-05 15:19:00 +03:00
Minh Nguyễn
807d87f0f5 Ignore redundant initial reachability notification on iOS 9
Fixes #1911.
2015-07-28 21:21:31 -07:00
Minh Nguyễn
3a310c916b Update the user dot when the user moves
Rolled back part of ed04e6d9f7 for #1852.

Fixes #1933.
2015-07-27 14:23:59 -07:00
Bruno de Oliveira Abinader
5e2f3b1323 Avoid nudging transitions if a gesture is in progress #2
Following the same steps from #1548 and #1912 for GLFW and iOS ports.
Also removed a redundant check if transform state is changing since
we're already dealing with that.
2015-07-27 21:57:51 +03:00
Minh Nguyễn
32c7805740 Ignore invalid location updates
Avoid passing invalid locations along to the map view delegate or user location annotation.

Also, If the user wants to visit the Prime Meridian or Equator, that’s their prerogative. Mapbox GL should show them where they’re at. Null Island is a different story.

Fixes #1912.
2015-07-24 15:53:10 -07:00
Bruno de Oliveira Abinader
784eb35512 Revert "Revert "split renderSync and transition nudging to allow client view syncing""
This reverts commit 263f9fad30.
2015-07-20 21:59:13 +03:00
Justin R. Miller
fad241f8cf Merge pull request #1831 from mapbox/set-collision-debug-too
Set collision debug with -[MGLMapView setDebugActive:], too
2015-07-20 11:21:17 -07:00
Bruno de Oliveira Abinader
263f9fad30 Revert "split renderSync and transition nudging to allow client view syncing"
This reverts commit b8388168dd.

It seems 'nudgeTransitions()' is no longer necessary as #1548 has fixed the update issues.
2015-07-20 17:07:55 +03:00
Minh Nguyễn
1f78d28516 Merge branch 'release-v0.5.0' 2015-07-14 10:49:52 -07:00
Minh Nguyễn
f96fef8292 Create GLKView before binding it and resuming
Or: don’t resume the map until the application has entered the foreground.

UIApplicationWillEnterForegroundNotification is posted before UIApplicationDidBecomeActiveNotification, while the application is still in the background. That caused -createGLView to bail but did not cause the rest of -wakeGL: to bail. We would create the GLKView only after attempting to bind it (a no-op), resulting in a black view.

Fixes #1855.
2015-07-11 15:38:59 -07:00
Minh Nguyễn
06fd6d5c1e Cherry-picked part of 987d961e5b to fix the build 2015-07-10 11:42:46 -07:00
Justin R. Miller
2df80af3d3 Revert "Defer initialization until app enters foreground"
This reverts commit 0fd9fe78db.
2015-07-09 13:41:42 -07:00
Justin R. Miller
00f9a477b7 abbreviate syntax for unused parameters 2015-07-08 22:58:50 -07:00
Minh Nguyễn
0fd9fe78db Defer initialization until app enters foreground
Defer the creation of EAGLEContext and GLKView and the loading of OpenGL ES extensions. It is GLKView that drives the background crash, and Apple documentation specifically warns not to initialize an EAGLContext in the background. All the while, it should be safe for client code to avail itself of any public methods on MGLMapView.

Fixes #1460.
2015-07-08 15:40:15 -07:00
Minh Nguyễn
1a3ae88786 Defer initialization until app enters foreground
Defer the creation of EAGLEContext and GLKView and the loading of OpenGL ES extensions. It is GLKView that drives the background crash, and Apple documentation specifically warns not to initialize an EAGLContext in the background. All the while, it should be safe for client code to avail itself of any public methods on MGLMapView.

Fixes #1460.
2015-07-08 14:53:11 -07:00
Minh Nguyễn
49fe6df0db Assert if -mapView:symbolNameForAnnotation: is implemented
Fixes #1851.
2015-07-08 14:39:27 -07:00
Minh Nguyễn
b3ea068e5d Assert if -mapView:symbolNameForAnnotation: is implemented
Fixes #1851.
2015-07-08 13:49:02 -07:00
Justin R. Miller
a67e80219f refs #1125, 1813: update user dot tracking in one place
Now that we have cleanup around the map viewport change notifications,
this only needs to happen in one place: the GL frame draw loop.
2015-07-08 12:55:39 -07:00
Justin R. Miller
ed04e6d9f7 refs #1125, 1813: update user dot tracking in one place
Now that we have cleanup around the map viewport change notifications,
this only needs to happen in one place: the GL frame draw loop.
2015-07-08 12:21:40 -07:00
Justin R. Miller
b8388168dd split renderSync and transition nudging to allow client view syncing 2015-07-08 12:10:12 -07:00
Justin R. Miller
fb230dda51 clean up remainder of sprite removal for now 2015-07-08 19:46:04 +02:00