Commit Graph

674 Commits

Author SHA1 Message Date
Jason Wray
29140f5b11 [ios] Enable SKU tokens for all requests
Removes conditional code that relied on a plist flag. Other small cleanups.
2019-05-20 22:49:50 -07:00
Jason Wray
6e92ca5de3 [ios] Update to libmbxaccounts 0.0.5 (#14683) 2019-05-16 09:43:42 -04:00
Sam Fader
163c085c38 [ios, macos] clarified documentation for newCamera param of the shouldChangeFromCamera delegate (#14680)
* [ios, macos] clarified documentation for newCamera in shouldChangeFromCamera

* [ios, macos] clarified documentation for newCamera param of the shouldChangeFromCamera delegate part 2
2019-05-15 18:30:28 -07:00
Thiago Marcos P. Santos
06f1dc48a2 [core] Make the BackgroundScheduler a singleton
- Do not carry it over everywhere as parameter, it is a shared
  instance anyway and the lifecycle is pretty much the app lifecycle
  from the moment we instantiate a map.
- Rename to BackgroundScheduler because it is a Scheduler that will
  do tasks in the background, we don't make assumptions if it is a
  thread pool or a single thread.
- Most importantly, remove the dependency from `core` on `platform`.
2019-05-10 14:20:38 +03:00
Jason Wray
49b8e0a626 [ios] Remove obsolete telemetry gesture events 2019-05-09 14:52:44 -07:00
Minh Nguyễn
e69efb996d [ios] Interpret negative direction as unchanged when setting visible coordinates (#14575)
* [ios] Fixed negative direction when setting visible coordinates

* [ios] Document behavior of negative direction
2019-05-03 09:02:03 -07:00
Julian Rex
f7915fdc51 [ios] Static analysis fix tweaks - part 2 (#14572) 2019-05-02 14:08:48 -04:00
Julian Rex
9bd59bf041 [ios, macos] Fixes for static analyzer warnings (#14453) 2019-04-30 17:08:37 -04:00
Julian Rex
b15b78346f [ios] Check for valid superview to avoid crash on iOS 9 (#14529) 2019-04-30 16:11:14 -04:00
Julian Rex
43553c37e9 [ios] Enable/Disable sku token handling (#14467) 2019-04-24 14:40:45 -04:00
Jason Wray
d5569f4b01 [ios] Add SKU tokens to all Mapbox requests (#14421) 2019-04-17 18:27:54 -07:00
Julian Rex
dfb88e3541 [ios] Consider anchored UIView callouts when deciding whether to enable presentsWithTransaction (#14445) 2019-04-17 15:06:46 -04:00
Julian Rex
425553646b [ios] Ensure glFinish is called when going into the background, and block rendering in the background (#14439) 2019-04-16 22:49:34 -04:00
Nadia Barbosa
2ee967a036 [ios, macos] Premultiply color values for mgl_color
Fixes https://github.com/mapbox/mapbox-gl-native/issues/14329
2019-04-12 11:07:46 -07:00
Konstantin Käfer
e95bf4dd9b [ios] run glFlush when reducing memory and don't reduce memory while in background (#14383) 2019-04-11 09:57:35 -04:00
Lloyd Sheng
8c5c4dd565 [ios] Fix issue wrong position of attribution dialog after rotation (#14185)
* Fix issue #12897
2019-04-11 16:48:53 +08:00
Fabian Guerra Soto
2f0af0e8f4 [ios] Deactivate MGLMapView IBDesignable (#14379)
Removed MGLMapView's IBDesignable attribute. The map's view render attributes
uses GL, making changes through the inspectables were not reflected in the storyboard
and were causing IB crashes.

* [ios] Deactivate MGLMapView IBDesignable.

* [ios] Remove IBDesignable agent code.

* [ios, macos] Remove NSProcessInfo category from iOS.
2019-04-10 13:01:59 -07:00
Fabian Guerra Soto
8389e746b6 [ios, macos] Add Mapbox Maps SDK metrics manager. (#13997)
Added MGLSDKMetricsManager to keep track of SDK related events such as tile download times.

* [ios, macos] Add tile download performance event.

* [ios, macos] Modify the performance event format.

* [ios, macos] Add Mapbox Maps SDK events manager.

* [ios, macos] Remove events delegate.

* [ios, macos] Remove deprecated macro.

* [ios, macos] Rename MGLEventsManager to MGLMetricsManager.

* [ios, macos] Make MGLMetricsDelegate follow delegate convention.

* [ios, macos] Remove mbgl-filesource target dependency on MGLMetricsManager.

* [ios, macos] Update metrics manager documentation.

* [ios, macos] Add device metadata.

* [ios, macos] Rename MGLMetricsManager to MGLSDKMetricsManager.
2019-04-09 16:10:14 -07:00
Konstantin Käfer
1d58850d0c [core] remove Renderer::flush 2019-04-05 11:49:17 +02:00
Konstantin Käfer
5cc3d7a733 [core] move GLContextMode to RendererBackend 2019-04-05 11:49:17 +02:00
Konstantin Käfer
66c020034e [core] refactor RendererBackend 2019-04-05 11:49:17 +02:00
Konstantin Käfer
a782a6d15b [core] move BackendScope to gfx namespace 2019-04-05 11:49:17 +02:00
Jordan Kiley
1aa705c2f6 [ios] Add iOS bindings and example for missing icons event. (#14302)
Added a new mapView delegate method that allows reload a style icon in case it couldn't load it from the style.

Added an iosapp test example.
2019-04-03 12:37:56 -07:00
Julian Rex
c7b709c5af [ios] Enable/disable presentsWithTransaction to address #14232 (#14307) 2019-04-03 11:50:11 -04:00
Sudarsana Babu Nagineni
7af00a404f [core] Include pixelRatio property in MapOptions
Move pixelRatio property from Map constructor to MapOptions.
2019-03-28 16:41:15 +02:00
Sudarsana Babu Nagineni
1cc1d4ea08 [core] Add setter/getter for size property in MapOptions 2019-03-28 16:41:15 +02:00
Sudarsana Babu Nagineni
e639087c91 [core] Add getter for Map options
Instead of having individual getter for each Map option,
add a common getter for all Map options.
2019-03-28 16:41:15 +02:00
Julian Rex
c7d53676d0 [ios, core] Updates project for iOS SDK 12.2 / Always use vendored optional (#14241) 2019-03-27 09:58:41 -04:00
Bruno de Oliveira Abinader
ac6855a473 [core] Fix signature of fluent interface setters 2019-03-23 09:12:44 +02:00
Jason Wray
07845b1208 [ios] Nitpicky style edits of recent changes 2019-03-21 14:26:11 -07:00
Bruno de Oliveira Abinader
d5868d3da8 [core] Remove file source from public Map ctor 2019-03-20 21:30:08 +02:00
Bruno de Oliveira Abinader
8ac73254c1 [darwin] [MGLOfflineStorage mbglFileSource] is now a shared_ptr 2019-03-20 21:30:08 +02:00
Fabian Guerra Soto
174c8fa7e4 [ios, macos] Add text-color support to format expressions. (#14146)
Added the possibility of overriding paint properties inside the format expression.

Added an example of how to create an MGLAttributedExpression object and documented the attributes keys and value types.

Fixed a bug that ignored the font names.
2019-03-19 14:53:35 -07:00
Fabian Guerra Soto
7939ff213a [ios, macos] Add format expression convenience methods support. (#14094)
Added the ios/macos format expression bindings.

The equivalent is mgl_attributed: or mgl_attributed({}) when making an expression using the expressionForFormat selector.

A new constructor called mgl_expressionForAttributedExpressions:(NSArray<NSExpression*>*)attributedExpressions was added to NSExpression+MGLAdditions category.

Updated the symbol style layer text test to use the bindings.

Updated the Predicates and Expressions.md and For Style Authors.md.ejs template with the bindings.
2019-03-15 16:10:27 -07:00
Ander Conselvan de Oliveira
5733440747 [core] Group Map LatLngBounds, min and max zoom methods
Group bounds, minimum and maximum zoom related methods together using
the new BoundOptions.

v2: Document that getBounds() initializes all optional fields.
  - Add test for getBounds() on a map with default values.
2019-03-14 18:33:11 +02:00
Bruno de Oliveira Abinader
8cc100bfd5 [core] Get FileSource via UpdateParameters in Renderer::Impl 2019-03-13 17:56:44 +02:00
Ander Conselvan de Oliveira
7d19115720 [core] Don't use exceptions in MapObserver::onDidFailLoadingMap
Using different exception pointers to specify the loading failure makes
an awkward API. Most users rethrow the exception only to figure out what
type of error happened so it can be reported properly. So replace the
exception pointer with a enum an string description of the failure.
2019-03-13 11:58:27 +02:00
Jason Wray
fb1b601038 [darwin] Fix MGLMapView.direction wrapping
Re-adds the 0-to-360° wrapping for MGLMapView.direction. Without this wrapping, we’d get ±180° from core, which results in invalid CLLocationDirection for the negative half of the rotational spectrum.
2019-03-12 14:49:49 -07:00
Lloyd Sheng
60ceac5efc [iOS] Enable developers to change position of ornaments (#13911)
* APIs for change position of ornaments

* Use anchors APIs and emove iOS8 layout code

* Add ornaments layout tests
2019-03-11 23:06:16 +08:00
Sudarsana Babu Nagineni
5e2b6bf636 [core] Add MapOptions to define properties of Map
To simplify the Map constructor, introduce MapOptions
interface to define the properties that can be set on
a Map.
2019-03-08 18:20:55 +02:00
m-stephen
383fde6804 Add option to prefetch low-resolution tiles (#14031)
* Add option to prefetch low-resolution tiles
2019-03-06 12:02:31 +08:00
Bruno de Oliveira Abinader
586b22c0df [core] Remove map coordinate setters/getters 2019-03-04 14:45:32 +02:00
Bruno de Oliveira Abinader
ba7427b4ac [core] Transform{State}: s/angle/bearing/ 2019-03-04 14:45:32 +02:00
Bruno de Oliveira Abinader
73ac3c784f [core] Remove map bearing setters/getters 2019-03-04 14:45:32 +02:00
Bruno de Oliveira Abinader
21a39306da [core] Remove map pitch setters/getters 2019-03-04 14:45:32 +02:00
Bruno de Oliveira Abinader
f5f10ec119 [core] Remove map zoom setters/getters 2019-03-04 14:45:32 +02:00
Julian Rex
405e20e3c8 [ios] CADisplayLink method now takes a parameter as required. (#14018) 2019-03-01 16:04:37 -05:00
Minh Nguyễn
26e1c925f2 [ios, macos] Expose MGLMapView OpenGL context to OpenGL style layers
Added a property to MGLOpenGLStyleLayer that contains the map view’s underlying OpenGL rendering context.
2019-02-25 10:44:43 -08:00
Fabian Guerra Soto
1fc7a9b82e [ios, macos] Expose the url session configuration object. (#13886)
The `MGLNetworkConfiguration` class was make public, and added `sessionConfiguration` property to let developers customize the `NSURLSessionConfiguration` object that is used to make HTTP requests in the SDK.
2019-02-18 13:16:20 -08:00
Julian Rex
2deebc0efe [ios] Check supported interface orientations when rotating device/view layout (#13900) 2019-02-11 23:07:15 -05:00