Commit Graph

6974 Commits

Author SHA1 Message Date
John Firebaugh
bbfd2c3d5a [android] Route exceptions in HTTPRequest constructor to onFailure 2016-03-10 10:38:00 -05:00
Bruno de Oliveira Abinader
1a4b8f3e2f [core] Fix screen coordinates when crossing the antimeridian
If the center and point coordinates are not in the same side of the
antimeridian, we need to unwrap the point longitude to make sure
it can still be seen from the visible side of the antimeridian that is
opposite to the center side.

Fixes #4155.
2016-03-10 14:00:42 +02:00
Bruno de Oliveira Abinader
7dde622db1 [core] Extra checks in Transform 2016-03-10 03:36:47 +02:00
Bruno de Oliveira Abinader
b33b2f1515 [core] Check for NaNs in EdgeInsets 2016-03-10 03:36:46 +02:00
Bruno de Oliveira Abinader
e8d1276bb1 [core] Added Transform::getScreenCoordinate 2016-03-10 03:36:46 +02:00
Bruno de Oliveira Abinader
d300f341bc [core] Remove _validPoint from Transform code
vec2<T>::operator bool() checks for NaNs already.
2016-03-10 03:36:46 +02:00
Bruno de Oliveira Abinader
dc2853533f [core] Fixes point annotations misplaced on maximum scale 2016-03-10 03:36:45 +02:00
Bruno de Oliveira Abinader
026b6d4c01 [core] Coordinate wrapping fixes
- Make returning LatLngs unwrapped by default.
- PointAnnotation and ShapeAnnotation are always wrapped so they can be
  selected via intersection from the visible tile boundaries.
- Fixes LatLng::wrap() calculation.
- Fixes LatLng::unwrapForShortestPath() calculation.

The new unwrapForShortestPath algorithm unwraps the start coordinate
either forwards or backwards depending on the end coordinate value, so
we can always cross the antimeridian when needed and still obtain a
wrapped end coordinate in the end.

Fixes #4214.
2016-03-10 03:36:45 +02:00
Tobrun
808bf7004a [android] #4076 - MapboxMapOptions fix 2016-03-09 17:46:00 -05:00
John Firebaugh
7cceca4b45 [core] Deactivate OfflineDownload when the tile count limit is hit
This is a better behavior than sending hundreds or thousands of tileCountLimitExceeded notifications.
2016-03-09 13:40:00 -08:00
Tobrun
be00dfd367 [android] #4253 - remove MapboxMapActivity 2016-03-09 16:30:29 -05:00
Tobrun
3679dc254f [android] #4076 - MapboxMapOptions initial version 2016-03-09 16:00:35 -05:00
Brad Leege
9c4192411a [android] #4183 - Moving QuickZoom event recording to single finger, double tap, and drag processing 2016-03-08 16:27:05 -06:00
Minh Nguyễn
c2cd9335e9 [ios] Non-embedded static framework
Added a new ifabric Make target for packaging up a static framework similar to the one released as 3.0.1. Place artwork and certificate assets inside Mapbox.bundle inside Mapbox.framework. Link SystemConfiguration in the umbrella header.

Distinguish between the framework bundle and the resources bundle. For the dynamic frameworks and embedded static frameworks, the two are the same; for the non-embedded static framework, the latter resides inside the former.
2016-03-08 11:20:12 -08:00
John Firebaugh
e49c1e3da3 [core] Fix offline status reporting regressions
The core of the change is ensuring that ensureResource doesn't release Zalgo: it should be consistently async, rather than async in the case that the resource doesn't exist in the database, but sync if it does.

This ensures that status is reported in a more consistent sequence, regardless of the database state.
2016-03-08 10:28:33 -08:00
John Firebaugh
8fee0f33c0 [core] Fix RunLoop::run() behavior when called a second time 2016-03-08 10:28:01 -08:00
Thiago Marcos P. Santos
aaf9e8256f [tests] Add utest for NetworkStatus::Online/Offline 2016-03-08 10:31:01 -03:00
Thiago Marcos P. Santos
672727f773 [core] Make OnlineFileSource respect the NetworkStatus
The user can now force the Offline mode and set it back
to Online, triggering the requests waiting for network connection.
2016-03-08 10:31:01 -03:00
Thiago Marcos P. Santos
b8b283588f [core] Remove goOffline() from DefaultFileSource
Use the newly added NetworkStatus::Set().
2016-03-08 10:31:01 -03:00
Thiago Marcos P. Santos
fa7c40c37f [core] Add client defined network status
This API will let the client force a network status. If set
to Offline, we won't make network requests.

When set make to Online, it will trigger the pending requests
and try to fetch tiles from the network.
2016-03-08 10:31:01 -03:00
Tobrun
20c3706536 [android] #4240 - add flag to resize only when needed. 2016-03-08 08:06:55 -05:00
Konstantin Käfer
15bc11ab23 [core] cancel TileID::overscaling() 2016-03-08 13:34:17 +01:00
John Firebaugh
12993531c0 [bin] Add explicit ^C handling to bin/offline, to test deactivation 2016-03-07 21:09:46 -08:00
John Firebaugh
a3791b2325 [core] Ensure OfflineRegionStatus::downloadState is accurately reported 2016-03-07 19:08:03 -08:00
Dan Swick
c5f85bf9e7 Update TooManyIconsException.java 2016-03-07 21:53:03 -05:00
Dan Swick
e54ceec950 Update IconBitmapChangedException.java 2016-03-07 21:53:03 -05:00
Tobrun
0306a94e53 [android] #4078 - improved instructions of exception message 2016-03-07 21:53:03 -05:00
Cameron Mace
6a31aa2910 [android] #4078 Gave help directly in logcat instead of refering to install.md 2016-03-07 21:51:05 -05:00
Tobrun
e9b7cd724f [android] #3631 - resize fix issue 2016-03-07 21:47:40 -05:00
Tobrun
46986c665e [android] #2996 - test workaround for device not sharing context 2016-03-07 21:46:11 -05:00
Brad Leege
30c753e7c4 [android] #4220 - Removing WAKE_LOCK from TestApp. Lowering log level to debug for Telemetry Location and Send to Server log lines. 2016-03-07 17:38:48 -06:00
Thiago Marcos P. Santos
fe811bd38e [android] Do not reach native if the HTTPContext was invalidated
Native will get destroyed before the Java HTTPRequest and asynchronous
requests might still get answered.

If the request gets canceled, we now clear the reference to the native
code and it will never reach it.

Lock is needed because OkHTTP replies on its own thread, so we need to
guard the access to the variable we use for checking if the Request was
canceled. In the future we could remove the lock and use Runnable when
we move Android main loop to Looper instead of libuv.

Like the other implementations of HTTPRequest on Mapbox GL Native, the
request is destroyed synchronously on ::cancel().
2016-03-07 19:13:56 -03:00
Tobrun
12fa5679ac [android] #4217 - fix build warning casting a varargs 2016-03-07 16:27:02 -05:00
Antonio Zugaldia
ecbe99ecec [android] Reporting is no longer an issue
Part of #4200
2016-03-07 15:05:15 -05:00
Antonio Zugaldia
e920a272e1 [android] Remove GSON From Offline Example TestApp
Fixes #4172
2016-03-07 13:32:24 -05:00
John Firebaugh
b318903ab9 [android] Don't crash if someone tries to use OfflineRegion after delete 2016-03-07 09:31:16 -08:00
John Firebaugh
c8b100ffe4 [android] Remove redundant arguments from offline native methods
`this` is automatically provided as the first argument to a native method.
2016-03-07 09:31:16 -08:00
John Firebaugh
6aa8be56f6 [android] destroyOfflineRegion must not delete an already-deleted peer 2016-03-07 09:31:16 -08:00
John Firebaugh
0386aeea22 [android] Don't call util::toString() on a null exception_ptr 2016-03-07 09:31:16 -08:00
Tobrun
d39ba766e5 [android] #4206 - property animation example 2016-03-06 14:23:47 -05:00
Tobrun
4a3beeddba [android] #4211 - avoid crashes when NativeMapView is being destroyed 2016-03-06 13:29:26 -05:00
Minh Nguyễn
0875a066cb [ios] Cleaned up NSLocalizedString usage
The format string would be localized, not the string resulting from expanding its placeholders. Also unindented a wildly indented block of code.
2016-03-05 21:49:57 -08:00
Minh Nguyễn
2d2ba3a482 [ios] Use MGLErrorDomain for errors 2016-03-05 21:44:22 -08:00
John Firebaugh
cce49c147d [android] Don't leak global references to OfflineRegionObservers 2016-03-04 18:45:38 -08:00
Konstantin Käfer
8112ac3371 [core] explicitly initialize a few fields to null 2016-03-04 16:01:41 -08:00
Sascha Peilicke
661e9e7f49 Add package 'offline' to proguard keeps
To avoid release build crashes at runtime due to missing classes.
2016-03-04 16:00:13 -08:00
John Firebaugh
dbffe1dfab [android] Use jni.hpp low-level wrappers 2016-03-04 15:33:32 -08:00
John Firebaugh
068998cf8a [android] Remove JNI_OnUnload; it is in practice never called
http://bleaklow.com/2006/02/18/jni_onunload_mostly_useless.html
2016-03-04 15:33:32 -08:00
John Firebaugh
edbd4284f2 [android] Remove JNICALL; it's a no-op macro 2016-03-04 15:33:32 -08:00
John Firebaugh
f321bf2514 [android] Remove unnecessary declarations from jni.hpp 2016-03-04 15:33:32 -08:00