Commit Graph

627 Commits

Author SHA1 Message Date
Minh Nguyễn
807d87f0f5 Ignore redundant initial reachability notification on iOS 9
Fixes #1911.
2015-07-28 21:21:31 -07:00
Bruno de Oliveira Abinader
3c43171bc0 s/AssetContext/AssetContextBase/ 2015-07-28 19:27:13 +03:00
Bruno de Oliveira Abinader
0cc69b368d s/HTTPContext/HTTPContextBase/ 2015-07-28 19:27:13 +03:00
Bruno de Oliveira Abinader
e42a903bba Replaced 'override' with 'final' for non-public interfaces 2015-07-28 19:27:13 +03:00
Bruno de Oliveira Abinader
590d9ab95c Created HTTPRequestBase as base for HTTP requests
- Added HTTPRequestBase (inherits from RequestBase)
- retry() is now a pure virtual in HTTPRequestBase
- Moved cancelled bool to HTTPRequestBase
- HTTPContext now handles only HTTPRequestBase*
- Renamed HTTPNSURLRequest, HTTPCURLRequest
2015-07-28 19:27:13 +03:00
Bruno de Oliveira Abinader
785b34df2e Moved ResponseStatus to its own header 2015-07-28 19:27:13 +03: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
0b8cd02c19 GLFW port now uses nudgeTransitions() 2015-07-20 21:59:13 +03: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
Thiago Marcos P. Santos
938165de17 Re-enable the Satellite style on the Linux/OSX app 2015-07-14 14:26:40 +03: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
Thiago Marcos P. Santos
00308be140 Make one arg ctors explicit 2015-07-11 12:42:45 +03:00
Thiago Marcos P. Santos
bd8210d5a1 Remove unused function: elapsed() 2015-07-11 12:42:45 +03:00
Thiago Marcos P. Santos
67554cae41 Remove unused function: uv_zip_open() 2015-07-11 12:42:45 +03: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
Justin R. Miller
c7011345c9 remove logging 2015-07-08 19:46:04 +02:00
Justin R. Miller
e0da13dbfd fixes for runtime Cocoa imagery 2015-07-08 19:46:04 +02:00
Justin R. Miller
5f9e675ee0 stub annotation symbol cleanup 2015-07-08 19:46:03 +02:00
Justin R. Miller
5ab58deb44 Cocoa custom marker imagery API 2015-07-08 19:46:03 +02:00
Konstantin Käfer
62ac43a85b add ability to add random custom markers to test app 2015-07-08 19:46:02 +02:00
Konstantin Käfer
55ef14f3a8 compress_png: void* => const void* 2015-07-08 19:45:59 +02:00
Konstantin Käfer
675ddddee7 Make pixelRatio constant across a Map object lifetime
also moves framebuffer size out of TransformState into its own object
2015-07-08 10:40:05 +02:00
Minh Nguyễn
a22efd4e80 Fixed compass overspinning
Rely on mbgl to drive compass rotation for simplicity. Eliminated fall-through from mbgl::MapChangeRegionIsChanging to mbgl::MapChangeRegionDidChange, because is-changing should not cause did-change to be fired.
2015-07-06 13:08:50 -07:00
Minh Nguyễn
78126f3b6b Refactored -[MGLMapView direction]
Fixed a bug in which -[MGLMapView direction] could return 360 instead of 0. Switched to mbgl::util::wrap() for clarity. -updateCompass now relies on -direction to avoid code duplication.
2015-07-06 13:07:34 -07:00
Thiago Marcos P. Santos
ec1b4c43fd Do not force uv_loop_t as the first parameter for a threaded object ctor 2015-07-06 16:01:59 +03:00
Minh Nguyễn
ec93fba84a Fixed crash on launch on iOS 7
In #1793, I conflated the compass container’s constraints to its parent view with the compass container’s content size constraints, but only in the iOS 7 code path. The result was a crash on launch due to an unprepared view hierarchy.

Fixes #1818.
2015-07-05 01:35:04 -07:00
Jason Wray
2bb1812ae4 Add collision check to isDebugActive 2015-07-02 22:41:26 -04:00
Jason Wray
505d1cdbf7 Set collision debug with setDebugActive:
Forgot this when collision was added to toggleDebug. isDebugActive still relies soley on plain getDebug().
2015-07-02 22:25:30 -04:00
Jason Wray
dba1e44f55 Add collision box debugging to the global debug toggle 2015-07-02 10:10:32 -07:00
John Firebaugh
fc64e97bce Simplify RunLoop
Instead of transforming between return value and callback, pass
the wrapped callback on to the invoked function as the last argument.

This eliminates the need for multiple invokeWithArgument overloads
and permits invoked functions to be asynchronous.
2015-07-01 16:12:12 -07:00
John Firebaugh
5fadda53e5 Move WorkerTask functionality into RunLoop core
As a byproduct, this makes FileCache get requests properly
cancelable.
2015-07-01 15:21:10 -07:00
Justin R. Miller
424629d7fc Merge pull request #1815 from mapbox/expose-ios-subviews
fixes #1770: rename & expose compass, logo, and attribution
2015-07-01 12:30:23 -04:00
Justin R. Miller
76333dfc0c fixes #1770: rename & expose compass, logo, and attribution 2015-07-01 12:09:33 -04:00
Jason Wray
81d88755df Remove tracking mode reset from resetNorthAnimated 2015-07-01 11:16:43 -04:00
Minh Nguyễn
b6a0450ef6 Go dormant before termination
Speculative fix for #1460 per https://github.com/mapbox/mapbox-gl-native/issues/1460#issuecomment-99959434.
2015-06-30 15:35:04 -07:00