Commit Graph

16768 Commits

Author SHA1 Message Date
Minh Nguyễn
0525fd1e4a [ios, macos] Unwrap coordinate bounds
Updated coordinate bounds conversion methods to use the beyond-±180 method to indicate that the bounds extends beyond the antimeridian. Also copyedited conversion documentation.
2018-02-21 10:05:30 -08:00
Osana Babayan
c2d9d6a423 [android] jni clean up - missing a couple DeleteLocalRef 2018-02-21 11:01:56 -05:00
Tobrun
c6537adbd1 [android] - don't disable zoom button controller zooming whem zooming gestures are disabled 2018-02-21 08:34:09 +01:00
Julian Rex
25629c81a6 [ios] Podspec bump 4.0.0-beta.2 (#11263)
* [ios] Podspec bump 4.0.0-beta.2

* [ios] Improved change log messaging.
2018-02-20 15:46:35 -05:00
Asheem Mamoowala
054d4d5ad6 [core] Support a range of zooms in TileRange. Accounts for TilePyramid requesting parent tiles of ideal zoom tiles. 2018-02-20 14:23:42 -05:00
Jason Wray
c2be33fa41 [ios] Bump podspecs for 3.7.5 2018-02-20 14:23:42 -05:00
Jason Wray
00abd2eaa6 [ios] Fix loop when first asking for location permission (#11229) 2018-02-20 14:23:42 -05:00
Jason Wray
91cd7f5aa9 [ios] Disable -[MGLExpressionTests testConditionalExpressionObject] on iOS 8
Temporarily disable this test until iOS 8 compatibility is added.
2018-02-20 14:23:42 -05:00
Jason Wray
b981713f3a [ios] Bump testMGLMapSnapshotter timeout to 5s
Timing based tests are inherently flakey and prone to failure on slow CI:

> Test case 'MGLDocumentationExampleTests.testMGLMapSnapshotter()' failed on 'iPhone X' (3.375 seconds)
> Test case 'MGLDocumentationExampleTests.testMGLMapSnapshotter()' failed on 'iPhone 8' (3.413 seconds)
> Test case 'MGLDocumentationExampleTests.testMGLMapSnapshotter()' failed on 'iPhone 7' (2.944 seconds)
2018-02-20 14:23:42 -05:00
Jason Wray
7e51e52f0c [ios] Fix iOS 8's broken pluralization in MGLCoordinateFormatterTests 2018-02-20 14:23:42 -05:00
Jason Wray
aa6e063929 [ios] Fix type conversion warnings in MGLFeatureTests
Fixes: object of type 'MGLPointAnnotation/MGLPolyline *' is not compatible with array element type 'MGLShape<MGLFeature> *' [-Wobjc-literal-conversion]
2018-02-20 14:23:42 -05:00
Jason Wray
f6d652dddd [ios] Fix safeAreaInsets availability warning in MGLMapViewLayoutTests
Fixes: 'safeAreaInsets' is only available on iOS 11.0 or newer [-Wunguarded-availability-new]
2018-02-20 14:23:42 -05:00
Tobrun
e5810536bc [android] - decouple map padding from overlain views 2018-02-20 17:04:55 +01:00
Tobrun
d9e4c61923 [android] - remove camera api from MapboxMap, refactor test app code to CameraUpdateFactory api 2018-02-20 16:22:09 +01:00
Jesse Bounds
2e3145db47 Replace embedded telem implementation with mapbox-mobile-events library (#10698)
* [ios] Introduce mobile events dependency

This adds the mobile events dependency including the events library's namespaced header file so that the related compiled symbols are prefixed to make them specific to the maps SDK. A pre-compiled header file is added so that the namespaced header file is added in all places where it is needed (most importantly every events library file).

* [ios] Use new events library for telemetry events

This makes the following significant changes:

Refactors the MGLMapboxEvents singleton to delegate internally to an instance of MMEEventsManager that it keeps for itself. The MGLMapboxEvents public API is refactored to reflect this. Note: MGLMapboxEvents continues to handle checking for opt out

Uses that new events API in MGLMapboxEvents to send all telem events (and turnstile)

All embedded certs are removed since the new telem library uses public key info pinning

Legacy telemetry utility classes for location and networking are removed since those are implemented in the telem library

* [ios] Update submodules initialized by cmake

We no longer bring in SMCalloutView as a submodule so it is removed.
We now vendor the telemetry events library as a submodule so it is added.

* Update mapbox-mobile-events

* Update mobile events lib

* Set events options with MGL user defaults values

For options that historically could be set with user defaults in the Maps SDK, collect them and set the appropriate property values in the new events library.

Also, check the existence of two new optional configuration values MGLTelemetryAccessToken and MGLTelemetryBaseURL so that the events endpoint and access token can be configured and the access token can easily be set dynamically and apart from the access token for the maps API.

MGLTelemetryBaseURL replaces the legacy MGLTelemetryTestServerURL. This is ok because this value was never intended to be used by client applications. The new name better reflects the fact that the URL can be changed to any backend stack, not just a test server.

Because it is possible for the configuration values to be read from user defaults before the events manager is fully set up, this also adds a local cache for the baseURL and accessToken values so that they can be stored and applied once it is time to setup the the events manager.

* Update mapbox-mobile-events

mapbox-mobile-events was forced pushed to include https://github.com/mapbox/mapbox-events-ios/pull/28

* Rename MGLMapboxEvents singleton access method

Manager is not in the name of the class. Just call it an instance.

* Update mapbox-mobile-events

* Add comments about config value loading

* Guard against creating events for IB

* Refactor user defaults update handler

This updates the handling logic for user defaults to break apart config changes that require a check for pausing or resuming the events lib’s telemetry collection from config changes that can happen with no update to the pause/resume state.

It also ports the optimization from https://github.com/mapbox/mapbox-gl-native/pull/10803 so that the call to pause and resume is not performed unless the user defaults store has new values that have not yet been applied to the events library.

* Update mapbox-mobile-events

* Rename events submodule folder

* Fix incorrect events library refs

* Update mapbox-mobile-events

* Update user user agent id value

This value aligns with our schme of {source-sdk-platform} and will be used by the events library in the user agent and vendorid.

* Update mapbox-mobile-events

Pin to v3.0.0 (d522b18)

* Improve code comments

* [ios] Fixed a broken file reference to MGLTelemetryConfig.
2018-02-20 09:54:11 -05:00
Tobrun
06213d9145 [android] - add instrumentation tests for FileSource activation/deactivation 2018-02-20 15:42:17 +01:00
Tobrun
17e5ae84af [android] - check if hosting Activity isn't finishing before showing an dialog 2018-02-20 15:40:12 +01:00
Langston Smith
2e0377b02e method name typo fix (#11245) 2018-02-20 08:28:56 -06:00
Osana Babayan
dd822e8fde [android] missing DeleteLocalRef 2018-02-20 09:23:24 -05:00
Jason Wray
374bad18c0 Merge tag 'ios-v3.7.5' into master 2018-02-19 14:21:15 -05:00
Asheem Mamoowala
2cef23e3ff [core] Support a range of zooms in TileRange. Accounts for TilePyramid requesting parent tiles of ideal zoom tiles. 2018-02-19 11:07:54 -08:00
Osana Babayan
d0f66b132f [android] added missing delete local references 2018-02-19 12:08:35 -05:00
Osana Babayan
4be4b4bfed [android] incorrect latlngBounds in the VisibleRegion with map is rotated
smallest bounding box for 4 points cannot (#11226)
be created using LatLngBounds.fromLatLngs()
as the order matters in that method and that does not work for rotated map
2018-02-19 10:25:11 -05:00
Jason Wray
9a30e252b5 [ios] Bump podspecs for 3.7.5 2018-02-16 20:06:32 -05:00
Jason Wray
9989e71e3f [ios] Fix loop when first asking for location permission (#11229) 2018-02-16 20:01:03 -05:00
Jordan Kiley
9459cf6a91 [ios, macos] Mark deprecated methods as unavailable (#11205)
Fixes #10735
2018-02-16 16:20:08 -08:00
Chris Loer
d3e6fc5eff [test] Native ignore for GL JS issue #6160 2018-02-16 14:07:33 -08:00
Chris Loer
e771210d13 [test] Native expression test support for:
- Round-tripping expressions through serialization and checking that outputs don't change
 - Checking expression serialization against expected value from fixture
2018-02-16 14:07:33 -08:00
Chris Loer
8635dab4c3 [core] Implement Expression::serialize()
Issue #10714
- Each expression stores its operator as a string, and default serialization is [operator, serialize(child1), ...]
- Custom implementations of `serialize` for Expression types that don't follow the pattern
- expression::Value -> mbgl::Value converter
- node_expression bindings to expose `serialize`
2018-02-16 14:07:33 -08:00
Pablo Guardiola
604931247e [android] initialize events when creating mapbox instance (#11211) 2018-02-16 22:12:45 +01:00
Fabian Guerra
12103c95c0 [ios, macos] Remove the duplicated entries in changelogs. 2018-02-16 13:25:28 -05:00
Fabian Guerra
b630dbc357 [android] Reverted master changes that doesn't apply to boba. 2018-02-16 12:42:01 -05:00
Osana Babayan
341eb7645f [android] incorrect LatLngBounds for the VisibleRegion for rotated map
smallest bounding box for 4 points cannot 
be created using LatLngBounds.fromLatLngs()
as the order matters in that method and that does not work for rotated map
2018-02-16 09:36:56 -05:00
Fabian Guerra
c2fe888155 [ios, macos] Added missing files 2018-02-15 13:15:33 -05:00
Jason Wray
63eb511d83 [ios] Disable -[MGLExpressionTests testConditionalExpressionObject] on iOS 8
Temporarily disable this test until iOS 8 compatibility is added.
2018-02-15 12:21:36 -05:00
Jason Wray
47d96dddc4 [ios] Bump testMGLMapSnapshotter timeout to 5s
Timing based tests are inherently flakey and prone to failure on slow CI:

> Test case 'MGLDocumentationExampleTests.testMGLMapSnapshotter()' failed on 'iPhone X' (3.375 seconds)
> Test case 'MGLDocumentationExampleTests.testMGLMapSnapshotter()' failed on 'iPhone 8' (3.413 seconds)
> Test case 'MGLDocumentationExampleTests.testMGLMapSnapshotter()' failed on 'iPhone 7' (2.944 seconds)
2018-02-15 12:20:41 -05:00
Jason Wray
2c69b99859 [ios] Fix iOS 8's broken pluralization in MGLCoordinateFormatterTests 2018-02-15 12:20:41 -05:00
Jason Wray
709164e75a [ios] Fix type conversion warnings in MGLFeatureTests
Fixes: object of type 'MGLPointAnnotation/MGLPolyline *' is not compatible with array element type 'MGLShape<MGLFeature> *' [-Wobjc-literal-conversion]
2018-02-15 12:20:40 -05:00
Jason Wray
fdbcd47002 [ios] Fix safeAreaInsets availability warning in MGLMapViewLayoutTests
Fixes: 'safeAreaInsets' is only available on iOS 11.0 or newer [-Wunguarded-availability-new]
2018-02-15 12:20:40 -05:00
Osana Babayan
e4a40fe797 [android] bounds can go over the antimeridian / date line. (#10892) 2018-02-15 12:02:00 -05:00
Fabian Guerra
903e7989ec Merge branch 'master' into release-boba
# Conflicts:
#	platform/android/CHANGELOG.md
#	platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/Mapbox.java
#	platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/maps/widgets/CompassView.java
#	platform/android/scripts/exclude-activity-gen.json
#	platform/ios/CHANGELOG.md
#	platform/ios/Mapbox-iOS-SDK-nightly-dynamic.podspec
#	platform/ios/Mapbox-iOS-SDK-symbols.podspec
#	platform/ios/Mapbox-iOS-SDK.podspec
#	platform/macos/CHANGELOG.md
2018-02-15 11:54:51 -05:00
Vladimir Agafonkin
82de856c94 [core, ios, macos, android, node] Heatmap layer (#11046)
Co-Authored-By: Konstantin Käfer <mail@kkaefer.com>
Co-Authored-By: Anand Thakker <anandthakker@users.noreply.github.com>
Co-Authored-By: Minh Nguyễn <1ec5@users.noreply.github.com>
2018-02-15 17:38:23 +02:00
Ansis Brammanis
1fdec7a5c1 [core] fix opacity of duplicate labels with -allow-overlap: true 2018-02-15 09:36:29 -05:00
Molly Lloyd
8a283b0306 [core] add support for mapzen terrarium (#11154)
* add support for mapzen terrarium

* Encoding --> DEMEncoding, avoid if statement when unpacking elevation values

* add Terrarium test

* update submodule

* remove redundant checks
2018-02-14 13:17:55 -08:00
Molly Lloyd
a386cac452 [core] add maxzoom uniform for raster-dem tilesets (#11134)
* add maxzoom uniform to support external tilesets

* update git sha for gl-js

* try and fix android crash

* name default maxzoom constant
2018-02-14 11:28:51 -08:00
Chris Loer
d4df044ffe [ios] Release cached tiles on entering background.
Retain current render tiles for fast restart.
Waiting for a memory warning doesn't work because we can't make GL release calls once we're in the background.
2018-02-14 10:55:16 -08:00
Chris Loer
a11b277bc1 [core] Rename "onLowMemory" to "reduceMemoryUse".
Android still calls "reduceMemoryUse" only while handling a low memory event.
iOS, on the other hand, calls "reduceMemoryUse" every time it enters the background.
2018-02-14 10:55:16 -08:00
Chris Loer
f721779963 [core] fix onLowMemory to release GL buffers
Context cleanup must be called _after_ render sources release tiles.
2018-02-14 10:55:16 -08:00
Fabian Guerra
7081c9dfdb Merge branch 'fabian-merge-3.7.4-master' 2018-02-14 12:14:34 -05:00
Tobrun
eddcefb3c8 [android] - update changelog for 6.0.0-beta.2 2018-02-14 12:50:52 +01:00