Commit Graph

7032 Commits

Author SHA1 Message Date
Jesse Bounds
cb9054f9ec Update package script to reflect file path change 2016-02-27 06:58:31 -08:00
Jesse Bounds
ca82ae4be1 Update podspec, changelog for 3.2.0-pre.1-symbols 2016-02-27 06:13:51 -08:00
Tobrun
826849a6dc [android] #4126 - make zoom package private 2016-02-27 08:48:39 +01:00
Jesse Bounds
09c9100891 Introduce MGLLocation Manager
https://github.com/mapbox/mapbox-gl-native/pull/4115

This change makes background data gathering more efficient by disabling
standard location updates when the device has been stationary for at
least five minutes. It also establishes region monitoring and
significant location change monitoring so that if the device appears to
be in motion again then background telemetry data collection can resume.
All of this reduces the amount of time required for telemetry data
collection to the time the device is in motion only. It also only
applies to host apps that already run in the background and have the
always location permission from their users.

This also includes some changes to make the internal pause/resume API of
the MGLMapboxEvents class less complex and autonomous. The side effects
of the map view waking or sleeping are no longer required for mapbox
events to work as intended.
2016-02-26 14:19:04 -08:00
Brad Leege
b3adb96e4a [android] #4066 - Implementing flush events when app terminates functionality 2016-02-26 15:26:47 -06:00
Antonio Zugaldia
3ed9f4336c [android] Use the new camera api instead of hardcoded values
Fixes #4124
2016-02-26 15:05:55 -05:00
Minh Nguyễn
fe7b52e792 [ios] Clarified schemes and destinations 2016-02-26 10:23:40 -08:00
Brad Leege
1ff9073b4d [android] #3888 - Setting SHA1 Certificate Pins for Staging, Prod Geotrust, and Prod DigiCert 2016-02-26 10:11:11 -06:00
Antonio Zugaldia
11d3eff173 [android] Remove invoke to DeleteGlobalRef to avoid client crash
See #4121
2016-02-26 10:05:47 -05:00
Antonio Zugaldia
01e55f183e # This is a combination of 8 commits.
# The first commit's message is:
# This is a combination of 2 commits.
# The first commit's message is:

# This is a combination of 3 commits.
# The first commit's message is:
# This is a combination of 2 commits.
# The first commit's message is:

# This is a combination of 21 commits.
# The first commit's message is:
[android] - Implements Android bindings for offline API
Fixes #3891

# The 2nd commit message will be skipped:

#	[android] #3891 - rename OFFLINE_MAX_CACHE_SIZE to DEFAULT_MAX_CACHE_SIZE and adjust value

# The 3rd commit message will be skipped:

#	[android] #3891 - makes de documentation more relevant to the current android implementation

# The 4th commit message will be skipped:

#	[android] #3891 - rename isRequiredResourceCountIsIndeterminate() to isRequiredResourceCountPrecise()

# The 5th commit message will be skipped:

#	[android] #3891 - rename complete() to isComplete()

# The 6th commit message will be skipped:

#	[android] #3891 - rename OfflineRegionDefinition to OfflineTilePyramidRegionDefinition and make OfflineRegionDefinition an interface. Docs for corresponding classes updated.

# The 7th commit message will be skipped:

#	[android] #3891 - make reason a more idiomatic ErrorReason Android IntDef and remove unnecessary constructor

# The 8th commit message will be skipped:

#	[android] #3891 - reuse the calling object instead of creating a new manager

# The 9th commit message will be skipped:

#	[android] #3891 - location, location, location

# The 10th commit message will be skipped:

#	[android] #3891 - simpler list regions iteration

# The 11th commit message will be skipped:

#	[android] #3891 - proper indeterminate -> precise transition

# The 12th commit message will be skipped:

#	[android] #3891 - improve description for DEFAULT_MAX_CACHE_SIZE

# The 13th commit message will be skipped:

#	[android] #3891 - delete global refs for obj and listCallback

# The 14th commit message will be skipped:

#	[android] #3891 - simplify metadata conversion and fix metadata object

# The 15th commit message will be skipped:

#	[android] - Implements Android bindings for offline API
#	Fixes #3891

# The 16th commit message will be skipped:

#	[android] #3891 - avoid exposing the int reason value in the public API

# The 17th commit message will be skipped:

#	[android] #3891 - delete global refs for remaining callbacks and observer

# The 18th commit message will be skipped:

#	[android] #3891 - remove unused offlineManagerClassConstructorId together with unnecessary private java constructor

# The 19th commit message will be skipped:

#	[android] #3891 - remove non-relevant line

# The 20th commit message will be skipped:

#	[android] #3891 - handle requiredResourceCountIsIndeterminate -> requiredResourceCountIsPrecise rename

# The 21st commit message will be skipped:

#	[android] #3891 - revert map changes to allow rebase

# The 2nd commit message will be skipped:

#	[android] #3891 - avoid exposing the int reason value in the public API

# The 2nd commit message will be skipped:

#	[android] #3891 - rename complete() to isComplete()

# The 3rd commit message will be skipped:

#	[android] #3891 - rename OfflineRegionDefinition to OfflineTilePyramidRegionDefinition and make OfflineRegionDefinition an interface. Docs for corresponding classes updated.

# The 2nd commit message will be skipped:

#	[android] #3891 - location, location, location

# The 2nd commit message will be skipped:

#	[android] #3891 - improve description for DEFAULT_MAX_CACHE_SIZE

# The 3rd commit message will be skipped:

#	[android] #3891 - delete global refs for obj and listCallback

# The 4th commit message will be skipped:

#	[android] #3891 - simplify metadata conversion and fix metadata object

# The 5th commit message will be skipped:

#	[android] #3891 - delete global refs for remaining callbacks and observer

# The 6th commit message will be skipped:

#	[android] #3891 - remove unused offlineManagerClassConstructorId together with unnecessary private java constructor

# The 7th commit message will be skipped:

#	[android] #3891 - remove non-relevant line

# The 8th commit message will be skipped:

#	[android] #3891 - handle requiredResourceCountIsIndeterminate -> requiredResourceCountIsPrecise rename
2016-02-26 09:13:17 -05:00
Thiago Marcos P. Santos
f683b10e10 [core] Build fix
Fix no viable conversion on OSX.
2016-02-26 04:21:28 +02:00
Thiago Marcos P. Santos
c8b7066d2e [tests] Unit tests for clock skew retry timeout 2016-02-26 03:52:02 +02:00
Thiago Marcos P. Santos
59a45b8400 [core] Add timeout for clock skew
If the server keeps sending replies considered from the client in the
past (there is no way to tell if the server or client clock is wrong),
the client will try to interpolate a valid expiration time based
on the delta of the expiration intervals sent by the server.

If the intervals are always the same, exponential backoff kicks in
until we get a different expiration time from what we already have.
2016-02-26 03:52:02 +02:00
Thiago Marcos P. Santos
c20b99f9a4 [tests] Add a test for the retry delay on expired response 2016-02-26 03:20:51 +02:00
Thiago Marcos P. Santos
843cad04fb [core] Add retry delay on expired tiles
When we receive an expired tile, we don't immediately retry
because in case the server keeps serving an expired tile, that
would cause an infinite retry cycle.

Now we add an exponential delay, similarly to what we do for
connection errors.
2016-02-26 03:20:51 +02:00
Brad Leege
e5e1fa8139 [android] #4077 - Documenting 2016-02-25 14:22:56 -06:00
Brad Leege
3ee6fd7a35 [android] #4077 - Creating configureAndStartMapboxEventManager() to minimize paramaters needs on getMapboxEventManager() 2016-02-25 14:19:37 -06:00
Konstantin Käfer
f9fd748547 [core] abort searching children when lower bound has different w
When looking for child tiles that cover a parent tile, we're computing the lower bound of the child tile in the set of tiles. Three things can happen:
- all remaining tiles are sorted before the child tile we're looking for. in that case, there can not be a child tile.
- the lower bound is the child tile; in this case, we want to continue checking the other children of the parent tile.
- the lower bound isn't the child tile we're looking for, but there are still tiles sorted after the tile we were looking for. these could be four children of the child tile we're looking for, so we're recursively descending.

what the current algorithm didn't take into account so far is that tiles with a higher w number (i.e. tiles that are outside the "main" tile pyramid of 0/0/0) were always sorted *after* the current w number. this meant that we thought there were still remaining children to be checked, so continued our recursive descent until eventually the number overflowed and we aborted our search. unfortunately, on Android this recursive descent and accompanying overflow caused a crash.

this patch fixes this by making sure that before we're continuing to descent, we're sure that the w numbers match: all tiles with a different (= higher) w number essentially mean the same as "all remaining tiles are sorted before the child tile we're looking for" for the purpose of finding covering children
2016-02-25 15:24:45 +01:00
Tobrun
a5b39f5ae1 [android] #4063 - fix update point annotation broken 2016-02-25 11:40:07 +01:00
Tobrun
c7285b0368 [android] #4021 - fix up library resource prefix 2016-02-25 10:51:30 +01:00
Tobrun
467d103b9a [android] #4097 - update javadoc maps package
[android] #4097 - update visibility compassclickclistener fix
2016-02-25 10:26:47 +01:00
Brad Leege
5cdd30b159 [android] #4071 - Android Telemetry Initial Implementation 2016-02-24 17:39:05 -06:00
Tobrun
0e0b096945 [android] #4083 - rename locationservice 2016-02-24 17:14:45 -06:00
Jesse Bounds
9a97a4d34f [ios] Introduce API Client
Addresses https://github.com/mapbox/mapbox-gl-native/issues/3704

This introduces a new utility class that wraps networking via
NSURLSession. All related code that used to live inside the telemetry
MGLMapboxEvents class has been pulled into the new MGLAPIClient.
An API client instance is used as a service by telemetry and can be
reused in the future when and if our networking needs grow or become
more complex.
2016-02-24 14:45:42 -08:00
John Firebaugh
96cd22efa0 [core] Set initial offline tile count limit to 768 2016-02-24 13:38:14 -08:00
John Firebaugh
065cda83fa [core] Limit total number of offline Mapbox tiles 2016-02-24 13:38:14 -08:00
John Firebaugh
5cefaeb857 [core] Enforce foreign key constraints in the offline database 2016-02-24 13:38:14 -08:00
John Firebaugh
1bdeddab2c [core] Fix subtle bug in OfflineDatabase with updated resources
SQLite REPLACE is *not* UPSERT. If a conflict occurs, it first deletes the existing row, then inserts a new row. This means that AUTOINCREMENT primary keys change. This will break foreign keys to that value, which we use.

Instead we must try an UPDATE, and fall back to an INSERT if the UPDATE changes zero rows.
2016-02-24 13:38:14 -08:00
John Firebaugh
65c06e6270 [core] status.requiredResourceCountIsIndeterminate ⇢ status.requiredResourceCountIsPrecise
Change the name and reverse the sense. Naming things in the positive is better than naming them in the negative.
2016-02-24 13:38:14 -08:00
John Firebaugh
5a6cee0dd0 [core] Add a descriptive comment about maximumCacheSize 2016-02-24 13:38:14 -08:00
Minh Nguyễn
d8c066ce0a [ios] Deleted redundant certificates
These certificates were copied to platform/default/resources/ in 4719b73ac7 but remained here, producing build warnings about duplicate build rules.
2016-02-24 12:24:08 -08:00
Jesse Bounds
f3ff38d125 [ios] Reduce async complexity 2016-02-24 09:32:26 -08:00
Minh Nguyễn
17f44d7bd9 Merge branch 'release-ios-v3.1.0' 2016-02-24 09:06:43 -08:00
Konstantin Käfer
662edea020 [ios] fix benchmark app 2016-02-24 16:49:05 +01:00
Konstantin Käfer
9557cd8d93 [core] use a store enum instead of RTTI
RTTI is pretty slow, in particular in iOS devices
2016-02-24 15:58:56 +01:00
Konstantin Käfer
f4bf961622 [core] fix uninitialized member variable 2016-02-24 15:57:54 +01:00
Tobrun
6679e7835d [android] #4094 - bring back view package 2016-02-24 15:40:50 +01:00
Thiago Marcos P. Santos
46557874ec [node] Add test that explicitly doesn call map.release()
Make sure mbgl.Map is not holding any references to the node's main
loop and thus preventing the node from exit.
2016-02-24 14:31:11 +02:00
Thiago Marcos P. Santos
63982e0010 Revert "[node] Destroy the RunLoop with the last Map object"
This reverts commit 3633fd7ebd.
2016-02-24 14:31:11 +02:00
Thiago Marcos P. Santos
931ac77af4 Revert "[core] libuv unref() not really needed"
This reverts commit 8a53c1a881.
2016-02-24 14:31:11 +02:00
Tobrun
72c2f5a95b [android] #4089 - remove mapboxmapsettings integration 2016-02-24 13:11:04 +01:00
Tobrun
896a62e589 [android] #3755 - fix package visibility issue with camera package, added javadoc and general cleanup 2016-02-24 13:06:56 +01:00
Tobrun
79609b7ff5 [android] #4083 - relax permissions check + renamed location services + code clean + javadoc 2016-02-24 13:05:13 +01:00
Tobrun
7b40cbcfd9 [android] #4038 - fix crash on polygons and polylines with empty points + formatting commit 2016-02-23 13:17:27 +01:00
Thiago Marcos P. Santos
18380708cd [android] Fix crash on HTTP 200 with no data 2016-02-23 00:21:57 +02:00
Thiago Marcos P. Santos
2b44c4b096 [tests] Add utests for HTTP 200 with no data
The implementation should return a valid empty string.
2016-02-23 00:21:57 +02:00
Minh Nguyễn
f74900e704 ios-v3.1.2 2016-02-22 10:47:09 -08:00
Minh Nguyễn
7bed2cebd2 [ios] Restored framework dependencies to static installation instructions
Backed out documentation about #4029 because it doesn’t apply when using a storyboard, and the installation instructions use a storyboard.
2016-02-22 10:44:49 -08:00
Minh Nguyễn
d836638407 [ios] Fixed zoom level for map feedback tool
The map feedback tool uses mapbox.js, so its zoom levels are one off the zoom levels used by Mapbox GL.
2016-02-22 09:44:43 -08:00
Tobrun
565f4eff63 [andriod] #4051 - add callback to move camera api 2016-02-22 11:10:12 +01:00