Commit Graph

734 Commits

Author SHA1 Message Date
Fabian Guerra Soto
76f58c5385 Fix root.plist flag conversion. (#288)
* Fix root.plist flag conversion.

* Update changelog.
2020-04-30 13:54:31 -05:00
Minh Nguyễn
50d067f4ad [ios, macos] Allow specifying multiple fonts or font families for local font rendering
Removed MGLIdeographicFontFamilyName validation from MGLRendererConfiguration, since mbgl::LocalGlyphRasterizer performs more robust validation. Removed C++ from MGLRendererConfiguration interface, implementation, and tests for simplicity.

Pass all the specified font and font family names into mbgl so that mbgl::LocalGlyphRasterizer can form a full font cascade list.
2020-04-24 18:31:29 -07:00
ystsoi
47f1d7bb94 Fix an issue that the heading indicator does not rotate if Settings > Privacy > Location Services > System Services > Compass Calibration is off (#247)
* Fix an issue that the heading indicator does not rotate if Settings > Privacy > Location Services > System Services > Compass Calibration is off.

* Update CHANGELOG.md

Co-authored-by: Nishant Karajgikar <nishant-karajgikar@users.noreply.github.com>
Co-authored-by: Minh Nguyễn <mxn@1ec5.org>
2020-04-24 17:38:23 -04:00
Nishant Karajgikar
6c764cbe31 Fixing issue where UIColor with alpha < 1 was being rendered incorrectly (#266)
* Expose new method to get color for pre-multiplied alpha

* Call new method to get pre-multiplied color values

* Fix tests

* Apply fix for macOS

* Update changelogs

* Rever submodule changes

* Add test

* Review comment

* Update platform/ios/CHANGELOG.md

Co-Authored-By: Minh Nguyễn <mxn@1ec5.org>

* Update platform/macos/CHANGELOG.md

Co-Authored-By: Minh Nguyễn <mxn@1ec5.org>

Co-authored-by: Minh Nguyễn <mxn@1ec5.org>
2020-04-21 10:04:13 -04:00
Minh Nguyễn
1a9ab40801 [ios] Avoid removing annotations from torn-down map
If the underlying mbgl::Map has been torn down, so has the mbgl annotation, so don’t worry about the mbgl::Map but keep unregistering KVO and other SDK-side annotation resources.
2020-04-02 07:42:30 -07:00
Minh Nguyễn
74f5a64035 [ios, macos] Wrap map in unique pointer
Also removed unused method declarations.
2020-04-02 07:42:30 -07:00
Julian Rex
171ff9484a Adds delegate to MGLNetworkConfiguration (#228) 2020-03-27 10:28:21 -04:00
Minh Nguyễn
63bf91125a [ios, macos] Snapshotter (runtime styling) delegates
Added a protocol and property for MGLMapSnapshotter’s delegate, which it uses for runtime styling. Generalized MGLStyle to be usable in the absence of MGLMapView. Moved MGLOpenGLStyleLayer code around to compile.
2020-03-26 15:29:33 -07:00
Minh Nguyễn
75f2681c19 [ios, macos] Minimum and maximum pitch
Added computed properties to MGLMapView for further restricting the map’s camera’s pitch.
2020-03-12 17:07:06 -07:00
Minh Nguyễn
dc3470b993 [ios, macos] Only set stretchable regions for stretch resizing mode 2020-03-11 16:55:18 -07:00
Minh Nguyễn
a18d5211a6 [ios, macos] Roundtrip resizable image cap insets 2020-03-11 16:55:18 -07:00
Minh Nguyễn
9c4b5ee557 [ios, macos] Nine-part resizable images
The MGLSymbolStyleLayer.iconTextFit property now respects the cap insets of any nine-part stretchable image passed into the -[MGLStyle setImage:forName:] method.

The “Manipulate Style” command in macosapp demonstrates the stretchable image feature by adding a single Ohio state route shield image, which has cap insets defined in the asset catalog, and labeling each Ohio state route with that image, stretched to fit the route number without widening the icon’s stroke.
2020-03-11 16:55:18 -07:00
Minh Nguyễn
5b4fb6c216 mapbox-gl-native v1.3.0 2020-02-28 11:45:09 -08:00
Julian Rex
ca85ea2b28 Add private property to determine whether the snapshotter logo is displayed. (#159) 2020-02-11 15:11:36 -05:00
Julian Rex
e62a7cade3 Updates mapbox-gl-native submodule to release-unicorn branch (#151)
* Update submodule

* [ios] Ignore patches

* Use new FileSourceManager interface

* Remove filesource-files.json

* Update submodule

* Remove http_file_source.mm from this repo for clarity.

* Adds set of MGLNativeNetworkManager (via MGLMapView and MGLOfflineStorage); includes tests.

* - Create testing methods, so that we don't need to export MGLNativeNetworkManager in GL
- Singleton accessors now set the delegate with each call; tests modified accordingly.

* Add test for expected properties

* [ios] Update MGLResourceTests for SKU changes

Co-authored-by: Alexander Shalamov <alexander.shalamov@mapbox.com>
Co-authored-by: Jordan Kiley <jmkiley@users.noreply.github.com>
2020-01-22 15:09:18 -08:00
Nadia Barbosa
309e226f74 Introduce limited axis scrolling (#108)
MGLUserScrollingMode -> MGLPanScrollingMode

Add changelog entry

Remove NSLog
2020-01-10 10:04:07 -08:00
Lloyd Sheng
58aa0015e9 Add ornaments position asserts (#124)
* add ornaments position asserts
2020-01-06 18:09:25 +08:00
Julian Rex
fcc68b1c90 Updated release URL (#127) 2020-01-02 12:21:44 -05:00
Randall Lee
f08955e2ce Switch to KVO for configuration values (#95) 2019-12-12 11:16:40 -05:00
Julian Rex
5e31b8fc36 Integrate Telemetry SDK as framework dependency (#60) 2019-11-25 17:44:36 -05:00
m-stephen
763fd5879c [ios] Fix ornaments' view constraints bug in bold-text mode (#57)
* [ios] fix bold text reset view's bounds issue

* [ios]add change log
2019-11-15 10:37:25 +08:00
Fabian Guerra Soto
5c565a5e51 [ios] Fixes an issue that caused the ornaments ignore contentInset property. (#15584)
* [ios] Add mapView content inset tests.

* [ios] Fix an issue that caused the ornaments ignore the contentInsets.

Fixed an issue that caused ornaments ignore the contentInset. Added a new property automaticallyAdjustContentInset that has the same purpose as UIViewController. automaticallyAdjustsScrollViewInsets. This was changed due to the latter being deprecated.

* [ios] Fix automaticallyAdjustsScrollViewInsets legacy behavior.

The property automaticallyAdjustsScrollViewInsets overrode automaticallyAdjustsScrollViewInsets which caused a breaking change. This is fixed to consider the legacy property when calculating the content insets and added tests for both cases.

* [ios] Fix the contentInset value after adding padding to the camera.

Fixed an issue that caused a discrepancy between the contentInset in MGLMapView and the padding in the transformation state.

When padding is passed through methods such as setCamera it’s persisted. This fix resets the contentInsets.

* [ios] Fix pinch test.

* [ios] Update automaticallyAdjustsScrollViewInsets name and documentation.

* [ios] Update changelog.
2019-10-04 17:13:00 -07:00
Julian Rex
cab756374f [ios] Fix layout of Scale bar components (#15703)
* [ios] Add failing tests for scale bar updates.

* [ios] Remove borderLayer

* [ios] Ensure bar sections have non-fractional width

* [ios] Add RTL override

* [ios] Update constraints/layout

* [ios] Invalidate scalebars size, after the parent's layout has happened (to ensure the view dimensions are correct when re-laying out the scale bar.

* [ios] Refactor layout

* [ios] Update changelog / remove commented code.

* [ios] Remove whitespace

* [ios] Stop integration tests asserting (when scale bar is hidden). Also reduces the # of calculations (since updateConstraints and layoutSubviews can be called outside of our control).

* [ios] Moves declaration of properties for testing.

* [ios] Removes redundant property attribute

* [ios] Updated change log
2019-10-04 11:15:20 -04:00
m-stephen
8128d709b6 [ios]Add errors reporting (#15391)
* add errors reporting

* [ios] report error if rendering takes > 1 second. (#15633)
2019-09-20 10:14:44 +08:00
Thiago Marcos P. Santos
1304502f81 [build] Fix iOS nits
- Hardcoded the bundle identifier on Info.plist, CMake is not
  picking it up.
- Do not use installed headers when building the framework.
2019-09-17 12:28:55 +03:00
Mikhail Pozdnyakov
8af78ddbb9 [core] Update MapObserver::onDidFinishRenderingFrame() API 2019-09-12 00:40:08 +03:00
Jason Wray
45140af7cb [ios] Refactor way location permissions are requested 2019-09-09 17:25:42 -07:00
Jordan Kiley
39af6b48c5 [ios] Remove feature flag for rotation threshold (#15562) 2019-09-04 14:35:56 -07:00
Fabian Guerra Soto
74d6fdb533 [ios, macos] Fix content inset documentation. (#15552) 2019-09-04 12:18:22 -07:00
m-stephen
b07217bbdd [ios] Fix compass font weight being too light on iOS 13 2019-09-04 11:29:05 -07:00
Nadia Barbosa
2984535804 [ios] Allow MGLScaleBar to support dark mode on iOS 13
Add changelog PR link
2019-08-30 13:48:05 -07:00
Ander Conselvan de Oliveira
21632a66f8 [core] Remove programCacheDir parameter from ProgramParameters
Binary shader support has been removed in commit c2f974f2a5 ([core]
Remove binary shader support). This left-over parameter is not used
anywhere anymore.
2019-08-27 16:23:48 +03:00
Julian Rex
4010b1d256 [ios] Added pending completion blocks (#15122) 2019-08-25 01:02:29 -04:00
Fabian Guerra Soto
5c066f874c [ios] Improve tilt gesture recognizer detection. (#15349)
* [ios] Improve tilt gesture recognizer detection.

* [ios] Update tilt gesture detection angles.

* [ios] Fix a delay at the beginning of the drag gesture.

* [ios] Update tilt gesture recognizer tests.

* [ios] Update changelog.

* [ios] Add horizontal tilt gesture test.

* [ios] Addresses review feedback.

* [ios] Add comments to clarify the tilt gesture initialization.
2019-08-23 17:59:38 -07:00
Mikhail Pozdnyakov
ef3d04dee5 [core] Export symbol placement update status from MapObserver 2019-08-23 10:56:05 +03:00
Nadia Barbosa
7b25cb1092 [ios, macos] Clarify current best practices with animated camera changes 2019-08-22 21:54:05 -07:00
Jason Wray
0e57c7de44 [ios] Refactor NSUserDefaults key variable names 2019-08-21 12:14:20 -07:00
Jordan Kiley
6f78560f24 [ios] Add threshold for triggering the rotate gesture recognizer (#14929) 2019-08-20 22:12:08 -07:00
Jordan Kiley
5d1ed5d941 [ios] Fix bug where scale bar shows 0 mm instead of 0 (#15381) 2019-08-20 10:48:26 -07:00
Julian Rex
90e26244a5 [ios] Removes mismatched function declaration. (#15423) 2019-08-20 11:55:18 -04:00
Julian Rex
c0cd8d021d [ios] Adds annotation selection tests with rotation & scaling of the map (#15123) 2019-08-20 10:51:14 -04:00
Jordan Kiley
acfcd5c29c [ios] Document how scale bar visibility is determined (#15304)
* [ios] document scale bar visibility

* [ios] finished trailing sentence
2019-08-05 10:48:54 -07:00
Heather Stenson
5f6f20e667 [ios, macos] Change "map ID" to "tileset ID" (#15116)
* map id --> tileset id

* styles map id -> style url

* update changelog
2019-07-16 18:36:07 -07:00
Aleksandar Stojiljkovic
d968cbba15 [ios][macos] Fix center coordinate incorrect after pinch gesture
To changelog:
Fixed incorrect center coordinate after pinch regression caused by edge insets fix (#14664).

While working on #14664, missed to understand the logic used in

```
                CLLocationCoordinate2D centerCoordinate = _previousPinchCenterCoordinate;
                mbgl::EdgeInsets padding { centerPoint.y, centerPoint.x, self.size.height - centerPoint.y, self.size.width - centerPoint.x };
                self.mbglMap.jumpTo(mbgl::CameraOptions()
                                        .withCenter(MGLLatLngFromLocationCoordinate2D(centerCoordinate))
                                        .withPadding(padding));

```

Replacing this code by moveBy achieves the required translation.

Fixes: #14977, #15082
2019-07-14 22:20:56 +03:00
Jason Wray
5b488225fb [ios] Add MGLCompassButton and MGLOrnamentVisibility 2019-07-11 16:06:54 -07:00
Fabian Guerra Soto
12e0a6b0c6 [ios] Add removeStyleImage to MGLMapView (#14769)
* [ios] Add shoulRremoveStyleImage to MGLMapViewDelegate.

* [ios] Changelog update.

* [ios, macos] Update shouldRemoveStyle method documentation.
2019-07-02 16:33:09 -07:00
Jason Wray
e26a60d0c9 [ios] Remove previously deprecated unavailable methods and properties 2019-06-26 13:36:30 -07:00
Jason Wray
8a9567e072 [ios, macos] Deprecate methods in favor of new completion handler versions 2019-06-26 12:18:22 -07:00
Minh Nguyễn
f7f74a6deb [ios, macos] Added completion handlers to animated MGLMapView methods 2019-06-21 17:45:36 -07:00
Jason Wray
b98dbd2121 [ios] Require two fingers for duration of tilt gesture 2019-06-20 10:33:32 -07:00