Commit Graph

506 Commits

Author SHA1 Message Date
Andrew Kitchen
b2f06677a7 [darwin, ios, macos] Introduces an MGLRendererConfiguration class
Instructions for enabling client-side rendering of CJK glyphs live in
this header, and this class provides the rest of the values needed for
instantiating the renderer on iOS and macOS.
2017-12-11 10:43:00 -08:00
Andrew Kitchen
3713102005 [ios, macos] Adds support for specifying an ideographic font family name
Adding a MGLIdeographicFontFamilyName to the containing app's Info.plist
will result in CJK glyphs being rasterized on demand (#10522)
2017-12-11 10:43:00 -08:00
Jason Wray
c0ad7be388 [ios] Long-press attribution button to show SDK version 2017-12-07 19:01:04 -05:00
Jordan Kiley
8f3cc3dbc4 [ios, macos] Rename the iOS and macOS SDKs (#10610) 2017-12-04 16:40:14 -08:00
Konstantin Käfer
2eec5a1980 [core] move HeadlessBackend extension initialization code into Impl 2017-11-29 15:48:51 +01:00
Andrew Kitchen
a2817ff5ed [darwin, macos, ios] Renames CGImage creation function to imply +1 retain count (#10570) 2017-11-27 16:47:58 -08:00
Asheem Mamoowala
246417ef24 [ios, macos] Implement MGLComputedShapeSource binding for CustomGeometrySource 2017-11-22 13:56:38 -08:00
Jesse Crocker
b2925e71ac [darwin] Abstract ShapeSource interface 2017-11-22 13:56:38 -08:00
Fredrik Karlsson
dda87bbecd [ios] update constraints when updating content inset 2017-11-20 21:07:14 +01:00
Tobrun
225fba8a0a Merge branch 'release-agua' into tvn-merge-release 2017-11-10 06:16:35 +01:00
Jordan Kiley
91dabd01df [ios] Silence smart invert warnings (#10425) 2017-11-09 13:09:16 -08:00
Minh Nguyễn
2955fb594c Make places and roads accessible to VoiceOver (#9950)
* [ios] Summarize places, roads after zooming with VoiceOver

After zooming, MGLMapView’s accessibility value now indicates the number of visible roads and lists out a few places visible in the current viewport, starting with the features at the highest z-index (not necessarily the largest or the closest to the center of the view). Avoid saying that no annotations are visible.

* [ios] Allow VoiceOver to navigate among place features

Split out a separate header for the various accessibility elements tied to MGLMapView. Wrap place features in accessibility elements and insert them into the narration order after the visible annotations but before the attribution button. Refactored MGLMapView’s accessibility code to rely on ranges to avoid off-by-one errors.

* [ios] Post layout change notification when fully rendered

Post a layout change notification when fully finishing a map render.

* [ios, macos] Moved MGLVectorSource+MGLAdditions to more specific group

* [ios] Localize accessibility feature names

* [ios] Find place feature accessibility elements by identifier

* [ios] Refactored accessibility traits

Also created a new MGLPlaceFeatureAccessibilityElement class.

* [ios] Sort accessibility elements by screen distance from center

Sort annotation accessibility elements by screen distance, not the hypotenuse of coordinates, which can yield incorrect results when the map is rotated or tilted or when the user is located at high latitudes. Sort place feature accessibility elements by screen distance as well.

* [ios] Create a place feature accessibility element, not an abstract feature accessibility element

* [ios] Only query for visible place features once per camera

Improved accessibility performance after changing the map camera. MGLMapView no longer queries the map for place features once per place feature.

* [ios] Made roads accessible

Wrap visible road features in accessibility elements described by the road name, route number, and general direction of travel.

* [ios] Cleaned up radian conversions

* [ios] Thickened road accessibility elements

* [ios] Made unioned roads accessible

* [ios] Consistently sort accessibility elements

Also fixed an issue causing road feature accessibility elements to get treated like place feature accessibility elements.

* [ios] Announce direction of divided roads

Announce the direction of a divided road based on the direction of its first polyline.

* [ios] Refined announced elevation units

* [ios] Romanize feature names

* [ios] Updated changelog

* [ios] Delay zoom announcement

A 100-millisecond delay is enough for the post-zooming announcement to reflect the new zoom level rather than the previous zoom level.

* [ios] Consolidated geometry functions

Adopted MGLGeometry_Private.h in the accessibility code, forcing a conversion to Objective-C++. Avoid inlining some of the more complex geometric functions.

* [ios] Fixed feature name romanization in accessibility labels

NSLocale.scriptCode is only set when the locale identifier explicitly specifies a script. Use NSOrthography to identify the dominant orthography regardless of locale.

Also added a unit test of feature accessibility element labels.

* [ios] Added tests for place, road accessibility values

* [ios] Announce one-way roads

A road feature’s accessibility value now indicates whether the road is a one-way road.
2017-11-03 12:17:45 -07:00
Bruno de Oliveira Abinader
1262659b8d [core] Move GLContextMode to its own Renderer header 2017-11-01 17:45:37 +02:00
Fabian Guerra Soto
63f7963a93 [ios, macos] Center shape annotation's callout when offscreen. (#10255)
* [ios, macos] Center annotation's anchor to tap point when coordinate center is offscreen.

* [ios, macos] Update changelogs.
2017-11-01 08:20:48 -04:00
Fabian Guerra Soto
372698aa23 [ios, macos] Iterate over point and shape annotations. (#10262) 2017-10-27 10:24:12 -04:00
Jesse Bounds
91eb595463 [ios] Move scale bar content size invalidation to map view 2017-10-25 14:31:55 -07:00
Jesse Bounds
aad26419b4 [ios] Move scale bar content size invalidation to map view 2017-10-25 12:44:41 -07:00
Jason Wray
2857090cf6 [ios] Fix iOS 8 incompatibility in scale bar RTL check 2017-10-20 17:05:41 -04:00
Jason Wray
817e5c109f [ios] Fix scale bar label alignment 2017-10-19 11:03:15 -04:00
Jason Wray
cabf5d2970 [ios] Avoid drawing view annotations across pixel boundaries 2017-10-19 11:03:15 -04:00
Jason Wray
6523b16c61 [ios] Slightly round the corners of the puck arrow 2017-10-19 11:03:14 -04:00
Fabian Guerra Soto
b7b8baef9d [ios, macos] Add selection support to MGLMultiPoint annotations. (#9984)
* [ios, macos] Add selection support to MGLMultiPoint annotations.

* [ios, macos] Update changelogs.
2017-10-18 15:18:54 -04:00
Jason Wray
5cefa51511 [ios] Rename SMCalloutView and stop using submodule 2017-10-11 12:21:27 -07:00
Jason Wray
b7879d5a37 [ios] Update MGLUserLocation.heading for showsUserHeadingIndicator 2017-10-11 10:06:30 -07:00
Asheem Mamoowala
98a47884f0 [ios, macos] Use CLLocationDirection for direction parameter in -[MGLMapView cameraThatFitsShape:shape direction: edgePadding:] 2017-10-09 17:12:27 -07:00
Asheem Mamoowala
24bd336b88 [android][ios][macOS] Implement bindings for Map::cameraForGeometry. On macOS, also added -[MGLMapView setCamera: withDuration: animationTimingFunction: edgePadding: completionHandler:] for parity with iOS 2017-10-09 13:58:11 -07:00
Asheem Mamoowala
9e79659007 [android][ios][macOS] Implement bindings for Map::cameraForGeometry. On macOS, also added -[MGLMapView setCamera: withDuration: animationTimingFunction: edgePadding: completionHandler:] for parity with iOS 2017-10-09 11:42:37 -07:00
Fabian Guerra Soto
f01588cac7 [ios, macos] Improve snap shotter documentation. (#10020)
* [ios, macos] Improve snap shotter documentation.

* [macos] Save snapshots in correct format

* [macos] Renamed snapshot item to Export Image

* [ios, macos] Clarify Snapshotter documentation.

* [ios] Fix snapshot scale

* [macOS] Fix snapshotter 4x scaling.

* [ios] Fix snapshotter final image scale.

* [ios, macos] Update snapshotter size documentation.

* [ios, macos] Throw an exception when the snapshotter has already started.

* [ios, macos] Add snapshotter header example.

* [ios, macos] Use one of the predefined Foundation's exception names.
2017-10-04 10:03:03 -04:00
Jason Wray
076af14b90 [ios] Undocument deprecated style class methods 2017-10-02 12:38:25 -07:00
Jason Wray
1326a21ddd [ios] Expose -showAttribution: publicly as an IBAction 2017-10-02 12:38:00 -07:00
Jason Wray
201b7d4811 [ios] Don't disable user tracking when selecting an annotation 2017-09-29 12:14:05 -04:00
Minh Nguyễn
093d9da6ef [ios] Define user dot constants in implementation file 2017-09-28 19:10:06 -07:00
Fabian Guerra
6d1fdf2ca3 Merge branch 'release-ios-v3.6.0-android-v5.1.0' into master.
# Conflicts:
#	circle.yml
#	platform/android/CHANGELOG.md
#	platform/android/MapboxGLAndroidSDK/gradle.properties
#	platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/maps/AnnotationManager.java
#	platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/maps/MapView.java
#	platform/android/dependencies.gradle
#	platform/default/mbgl/storage/offline_database.cpp
#	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/ios/app/Main.storyboard
#	platform/ios/src/MGLMapView.mm
#	src/mbgl/programs/attributes.hpp
#	src/mbgl/renderer/painter_fill.cpp
#	src/mbgl/tile/geometry_tile.hpp
#	src/mbgl/tile/geometry_tile_worker.cpp
#	src/mbgl/tile/raster_tile.cpp
#	src/mbgl/tile/raster_tile.hpp
#	src/mbgl/tile/raster_tile_worker.cpp
#	test/tile/annotation_tile.test.cpp
#	test/tile/geojson_tile.test.cpp
#	test/tile/raster_tile.test.cpp
#	test/tile/vector_tile.test.cpp
2017-09-27 12:08:24 -04:00
Lauren Budorick
a9ddf5b7fd Preserve depth buffer between 3D layers + optimize render order (#9931)
Port of https://github.com/mapbox/mapbox-gl-js/pull/5101: adds a new render pass `Pass3D` before any other rendering wherein we render layers with 3D passes (fill-extrusion layers) to offscreen framebuffers, sharing a depth renderbuffer between those layers in order to render 3D space correctly. Those framebuffers are saved on the RenderLayers and copied back to the map during the translucent pass. Rendering to offscreen framebuffers before we do any clear + draw means we can avoid expensive framebuffer restores.
2017-09-21 14:26:48 -07:00
Jason Wray
9613582417 [ios] Be sure to get a BOOL value for nullable dict keys
Otherwise it errors with, "cannot initialize a variable of type 'BOOL' (aka 'signed char') with an rvalue of type 'id _Nullable'."

This doesn't seem like it should be necessary.
2017-09-15 19:00:32 -04:00
Jesse Bounds
a6224abc33 [ios] Use constraints to manage ornament view placement (again) (#9995)
This reverts the manual layout triggered by KVO approach in favor of a constraints based approach that the KVO method had previously replaced. Although the manual layout approach worked well in most cases and was cleaner in that it did not manipulate any containing views in the app space, using KVO on UIViewControllers has proven to be dangerous.

This also updates the gitshas for KIF and OHHTTPStubs to unbreak UI tests that verify these related changes are working.

This also adds an ornament constraint system for iOS 11+
2017-09-14 13:51:05 -07:00
Jordan Kiley
73c633e22b [ios] Ignore Smart Invert (#9876) 2017-09-13 11:09:49 -07:00
Jason Wray
59076c8300 [ios] Disable implicit animation of heading indicators
The update steps for the heading indicator are typically small, so animations tend to pile up and cause performance issues. Disabling actions is a slight regression when it comes to large steps (they're not animated now, where they previously were) and this should eventually be addressed.

Also consistently use provided API for disabling CATransaction actions.
2017-09-07 19:23:30 -04:00
Jason Wray
cb1309a253 [ios] Implicitly enable showsUserLocation when enabling the heading indicator 2017-09-07 19:23:30 -04:00
Jason Wray
63250baa4e [ios] Make user heading indicator property IBInspectable
Rename it to `showsHeading` to fit in the tiny label column of the utilities panel.
2017-09-07 19:23:29 -04:00
Jason Wray
e1ff826d20 [ios] Change user location heading filter to 1°
The default is 1.
2017-09-07 19:23:29 -04:00
Jason Wray
218c720e9e [ios] Add setShowsUserHeadingIndicator and validateUserHeadingUpdating 2017-09-07 19:23:29 -04:00
Jason Wray
99616e6627 [ios] Introduce MGLUserLocationHeadingIndicator protocol 2017-09-07 19:23:29 -04:00
Jason Wray
c35b1cd56b [ios] Set a heading indicator update threshold 2017-09-07 19:23:29 -04:00
Jason Wray
5db97ed96e [ios] Introduce MGLUserLocationHeadingArrowLayer class 2017-09-07 19:23:20 -04:00
Jason Wray
c6708442c9 [ios] Refactor user location heading indicator into its own class 2017-09-06 18:21:38 -04:00
Ivo van Dongen
b3b9ef5c6c [ios] snapshotter 2017-09-05 16:29:33 +03:00
Ivo van Dongen
6d47471767 [ios] extend ui image additions with init from premultiplied image 2017-09-05 16:29:33 +03:00
Jason Wray
87348234d1 [ios] Guard against nil user location when setting tracking mode 2017-08-30 17:28:14 -04:00
Fabian Guerra Soto
c8dc77f06f [ios, macos] Make minimumZoomLevel and maximumZoomLevel IBInspectable. (#9729)
* [ios, macos] Make minimumZoomLevel and maximumZoomLevel IBInspectable.

* [ios, macos] Update changelogs.
2017-08-30 16:25:57 -04:00